:root {
    --primary: #D4AF37;
    --primary-hover: #C59F2D;
    --secondary: #8D6E63;
    --danger: #C62828;
    --warning: #EF6C00;
    --dark: #2D1B17;
    --gray: #5D4037;
    --light-gray: rgba(121, 85, 72, 0.1);
    --bg-color: #FCFAF2;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(121, 85, 72, 0.4);
    --glass-shadow: 0 4px 15px rgba(62, 39, 35, 0.08);
    
    --font-family: 'Inter', sans-serif;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background Blobs */
.background-blobs {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #a78bfa;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #60a5fa;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* App Container (Glassmorphism) */
.app-container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.5);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.badge {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-family);
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.notification-dot {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    right: 16px;
    font-weight: bold;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-profile .info strong {
    display: block;
    font-size: 0.9rem;
}

.user-profile .info span {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Main Content */
.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.purple { background: #E0E7FF; color: #4F46E5; }
.stat-icon.blue { background: #DBEAFE; color: #2563EB; }
.stat-icon.green { background: #D1FAE5; color: #10B981; }
.stat-icon.orange { background: #FEF3C7; color: #F59E0B; }

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-unit {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray);
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.panel {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--border-radius);
}

.panel h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

/* Alerts */
.alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-box.info-box {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.alert-box.error-box {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-box.warning-box {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* List Items (History & Manager) */
.request-list, .request-list-manager {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.req-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.req-type {
    font-weight: 600;
    color: var(--primary);
}

.req-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.status-pending { background: #FEF3C7; color: #D97706; }
.status-approved { background: #D1FAE5; color: #059669; }
.status-rejected { background: #FEE2E2; color: #DC2626; }

.req-dates {
    font-size: 0.85rem;
    color: var(--dark);
}

.req-days {
    font-weight: bold;
}

.req-reason {
    font-size: 0.85rem;
    color: var(--gray);
    background: var(--light-gray);
    padding: 8px;
    border-radius: 6px;
}

.req-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-approve, .btn-reject {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-approve { background: var(--secondary); color: white; }
.btn-reject { background: var(--danger); color: white; }

.empty-state {
    text-align: center;
    color: var(--gray);
    padding: 32px 0;
    font-size: 0.9rem;
}

/* Manager Filters */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards;
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--danger); }

@keyframes slideIn {
    to { transform: translateX(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: 100vh;
        width: 100%;
        border-radius: 0;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        justify-content: space-between;
    }
    .logo { margin-bottom: 0; }
    .menu { 
        flex-direction: row; 
        flex: 0;
    }
    .user-profile { display: none; }
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-box {
    background: var(--bg-panel, white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}
