/* Import modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #090d16;
    --bg-secondary: #121824;
    --bg-card: rgba(22, 28, 45, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-hover: #4f46e5;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.1);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.1);
    
    --info: #06b6d4;
    --info-glow: rgba(6, 182, 212, 0.1);
    
    --glass-blur: blur(16px);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

.sidebar {
    width: 280px;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem;
    min-height: 100vh;
    background: radial-gradient(circle at 70% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 45%);
}

/* Sidebar Branding */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3rem;
    padding-left: 0.5rem;
}

.brand-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-item.active a {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(99, 102, 241, 0.7) 100%);
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* Profile Summary in Sidebar */
.sidebar-profile {
    margin-top: auto;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.profile-info {
    overflow: hidden;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Card Styling */
.card-stat {
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card-stat:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
}

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

.stat-icon.primary { background-color: var(--primary-glow); color: var(--primary); }
.stat-icon.success { background-color: var(--success-glow); color: var(--success); }
.stat-icon.warning { background-color: var(--warning-glow); color: var(--warning); }
.stat-icon.info { background-color: var(--info-glow); color: var(--info); }

/* Tables */
.table-custom {
    color: var(--text-primary);
}

.table-custom th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
}

.table-custom td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge-custom {
    padding: 0.45em 0.85em;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid transparent;
}

.badge-low { background-color: var(--success-glow); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.badge-medium { background-color: var(--warning-glow); color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }
.badge-high { background-color: var(--danger-glow); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }

/* Notice Card */
.notice-card {
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease;
}

.notice-card:hover {
    transform: scale(1.01);
}

.notice-card.notice-high { border-left-color: var(--danger); }
.notice-card.notice-medium { border-left-color: var(--warning); }
.notice-card.notice-low { border-left-color: var(--success); }

/* Buttons & Forms */
.form-control-custom {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #ffffff;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.form-control-custom:focus {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    color: #ffffff;
    outline: none;
}

.btn-custom-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s;
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-custom-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-custom-secondary:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

/* Login Page Layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
                #070a13;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
}

/* Increments Timeline */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-left: 10px;
    position: relative;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary);
    left: -28px;
    top: 5px;
    border: 3px solid var(--bg-primary);
}

.timeline-item:hover .timeline-marker {
    background-color: var(--info);
    transform: scale(1.2);
    transition: all 0.2s ease;
}

/* Corporate Document Views (Offer / Relieving / Slip) */
.printable-document {
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    padding: 4rem;
    font-family: 'Times New Roman', Times, serif;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid #e2e8f0;
    max-width: 800px;
    margin: 0 auto;
}

.doc-header {
    border-bottom: 2px solid #334155;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.doc-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.doc-logo span {
    color: #6366f1;
}

.doc-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    color: #0f172a;
}

.doc-content {
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: justify;
}

.doc-footer {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature-block {
    text-align: center;
    width: 200px;
}

.signature-line {
    border-top: 1px solid #94a3b8;
    margin-top: 3rem;
    padding-top: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}

/* Invoice-Style Salary Slip layout */
.slip-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.slip-table th, .slip-table td {
    border: 1px solid #cbd5e1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.slip-table th {
    background-color: #f1f5f9;
    font-weight: 700;
    text-align: left;
}

/* Print CSS Styles override */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .sidebar, .no-print, header, footer, .btn, .btn-custom-secondary, .btn-custom-primary {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: none !important;
    }
    .printable-document {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        color: #000000 !important;
    }
    .card, .glass-panel {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    @page {
        size: A4;
        margin: 1.5cm;
    }
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
    }
    .app-container {
        flex-direction: column;
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    .sidebar-profile {
        margin-top: 1.5rem;
    }
}