:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --bg-color: #F3F4F6;
    --sidebar-bg: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 12px -3px rgba(0, 0, 0, 0.08), 0 3px 5px -2px rgba(0, 0, 0, 0.04);
    --radius-md: 0.4rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 0.9rem;
}

/* Layout Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, #4F46E5, #818CF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    padding: 0.75rem 0.5rem;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-links li {
    margin-bottom: 0.25rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-links a i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.nav-links a:hover {
    background-color: #EEF2FF;
    color: var(--primary-color);
}

.nav-links a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.nav-links .nav-submenu {
    list-style: none;
    padding-left: 1.75rem;
    margin: 0.35rem 0 0 0;
}

.nav-links .nav-submenu li {
    margin-bottom: 0.25rem;
}

.nav-links .nav-submenu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.75rem;
    color: var(--text-muted);
    background-color: transparent;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
}

.nav-links .nav-submenu a i {
    width: 18px;
    text-align: center;
}

.nav-links .nav-submenu a:hover {
    background-color: #EEF2FF;
    color: var(--primary-color);
}

.nav-links .has-submenu > a {
    justify-content: space-between;
}

.nav-links .has-submenu .submenu-caret {
    margin-left: auto;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.nav-links .has-submenu .nav-submenu {
    list-style: none;
    padding-left: 1.75rem;
    margin: 0.35rem 0 0 0;
    display: none;
}

.nav-links .has-submenu.open .nav-submenu {
    display: block;
}

.nav-links .has-submenu.open > a .submenu-caret {
    transform: rotate(180deg);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 250px);
    min-width: 0;
}

.topbar {
    height: 54px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    box-shadow: var(--shadow-sm);
}

.date-display {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), #818CF8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.content-wrapper {
    padding: 1.25rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Cards & Containers */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Form Elements */
.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* Status Badges */
.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-waiting {
    background-color: #FEF3C7;
    color: #D97706;
}

.status-processing {
    background-color: #DBEAFE;
    color: #2563EB;
}

.status-done {
    background-color: #D1FAE5;
    color: #059669;
}

/* Table styling */
.table {
    vertical-align: middle;
    font-size: 0.85rem;
}
.table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding: 0.6rem 0.4rem;
}
.table td {
    padding: 0.6rem 0.4rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Sidebar Backdrop Overlay for Mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Styles for Tablet & Mobile */
@media (max-width: 991.98px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        background-color: var(--sidebar-bg);
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .nav-links {
        padding: 0.5rem;
    }
    
    .nav-links li {
        margin-bottom: 0.25rem;
    }
    
    .nav-links a {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .main-content {
        width: 100%;
    }
    
    .topbar {
        padding: 0 1rem;
        height: 50px;
    }
    
    .content-wrapper {
        padding: 0.75rem;
    }
    
    .glass-card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }
    
    .table-responsive {
        border: 0;
    }
}
