:root {
    --primary: #2e7d32;
    --primary-light: #4caf50;
    --secondary: #1b5e20;
    --accent: #ffb300;
    --bg-dark: #0a0f0a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-light: #e0e0e0;
    --text-muted: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(46, 125, 50, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(27, 94, 32, 0.1) 0%, transparent 40%);
    min-height: 100vh;
}

/* Glassmorphism utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #0d120d;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-logo span {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2rem;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 900;
}

.sidebar-logo {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(46, 125, 50, 0.15);
    color: var(--primary-light);
}

.sidebar-menu a svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-info .name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info .role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Adjustments for non-sidebar pages (auth) */
.full-width-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: white;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.logo-text {
    background: linear-gradient(to right, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-center {
    justify-content: center !important;
}

.logo-large {
    font-size: 2.2rem !important;
    gap: 16px !important;
}

.logo-large .logo-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
}

.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select option {
    background-color: #1a1a1a;
    color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.4);
    filter: brightness(1.1);
}

.btn-white {
    background: white;
    color: var(--bg-dark);
}

.btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.card {
    padding: 1.5rem;
}

.production-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.stat-item {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-label {
    color: var(--text-muted);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 179, 0, 0.2);
    color: #ffb300;
}

.status-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-completed {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.status-suspended {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}