﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg: #eef7ef;
    --surface: #ffffff;
    --text: #174a22;
    --muted: #567d5b;
    --accent: #2e7d32;
    --accent-2: #66bb6a;
    --shadow: rgba(22, 79, 42, 0.14);
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.topbar {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    padding: 18px 24px;
    border-bottom: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px var(--shadow);
}

.topbar h1, .topbar h2, .topbar h3 {
    margin: 0;
}

.container {
    padding: 22px;
    max-width: 1200px;
    margin: 0 auto;
}

.card, .table-card, .table-container {
    background: var(--surface);
    border-radius: 14px;
    box-shadow: 0 8px 22px var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}

.sidebar {
    width: 240px;
    background: #1b5e20;
    color: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.menu {
    list-style: none;
    padding: 0;
}

.menu li + li {
    margin-top: 12px;
}

.menu a {
    color: #d8f3d8;
    text-decoration: none;
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    transition: 0.25s;
}

.menu a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.logout-btn, .btn, .view-btn, button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: 0.25s;
}

.logout-btn:hover, .btn:hover, .view-btn:hover, button:hover {
    background: var(--accent-2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--accent-light);
}

th, td {
    padding: 13px 12px;
    border-bottom: 1px solid #e5f2e5;
}

th {
    color: var(--accent);
    font-weight: 700;
    text-align: left;
}

tbody tr:hover {
    background: #f1f9f1;
}

.status, .status-upcoming, .status.shipped, .status.high {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status, .status.shipped, .status.high {
    background: #c8e6c9;
    color: #1b5e20;
}

.status.low {
    background: #fff7e0;
    color: #8a6e28;
}

.status.out {
    background: #ffcdd2;
    color: #c62828;
}

@media (max-width: 992px) {
    .container { padding: 16px; }
    .sidebar { width: 100%; margin-bottom: 14px; }
    .menu a { padding: 10px; }
}

@media (max-width: 768px) {
    .container { padding: 12px; }
    th, td { padding: 10px; }
    .topbar { padding: 14px; }
}

/* Modern Login/Register Form Styles */
body {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #66bb6a 100%);
    backdrop-filter: blur(10px);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#loginSection, #registerSection {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 45px 40px;
    box-shadow: 0 20px 60px rgba(27, 94, 32, 0.3);
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#loginSection h2, #registerSection h2 {
    color: #1b5e20;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input[type="text"],
input[type="password"],
select {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #174a22;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #999;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #2e7d32;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    transform: translateY(-2px);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7d32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

form > button[type="submit"] {
    padding: 14px 24px;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

form > button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, #1b5e20 0%, #155318 100%);
}

form > button[type="submit"]:active {
    transform: translateY(-1px);
}

.toggle-btn {
    background: linear-gradient(135deg, #66bb6a 0%, #2e7d32 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
    width: 100%;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.toggle-btn:active {
    transform: translateY(0);
}

#error {
    color: #d32f2f;
    text-align: center;
    font-size: 14px;
    margin-top: 12px;
    font-weight: 500;
}

@media (max-width: 480px) {
    #loginSection, #registerSection {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    #loginSection h2, #registerSection h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    form > button[type="submit"] {
        padding: 12px 20px;
        font-size: 15px;
    }
}
