@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500&display=swap');

:root {
    --primary: #0F766E;
    --primary-light: #14B8A6;
    --primary-dark: #115E59;
    --secondary: #0369A1;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.4);
    
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
}

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

body {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

/* Glassmorphism Surface */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}
.navbar-brand img {
    height: 44px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.05) rotate(-2deg);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2.5rem 2rem;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}
.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

/* Feature Cards (Big Buttons) */
.feature-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 240px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(15, 118, 110, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(20, 184, 166, 0.3);
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.2);
    transition: transform 0.4s ease;
}
.feature-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}
.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}
.feature-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Standard Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    gap: 0.5rem;
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(15, 118, 110, 0.39);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
    transform: translateY(-2px);
}
.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: #f8fafc;
    color: var(--text-main);
    font-size: 1rem;
    
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

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

/* Card */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.4);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-danger {
    background-color: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FCA5A5;
}
.alert-success {
    background-color: #ECFDF5;
    color: var(--success);
    border: 1px solid #6EE7B7;
}

/* Footer text */
.footer-text {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
}
.footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.footer-text a:hover {
    text-decoration: underline;
}

/* Grid & Layout Utilities */
.grid { display: grid; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Chart.js canvas responsive fix */
canvas {
    max-width: 100% !important;
}

/* Show/Hide by breakpoint */
.desktop-only { display: block; }
.mobile-only  { display: none; }

/* Mobile Specific Tweaks */
@media (max-width: 768px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
    .desktop-only { display: none !important; }
    .mobile-only  { display: block !important; }

    /* Mobile export buttons grid */
    .mobile-export-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }
    .mobile-export-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.65rem 0.5rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.85rem;
        text-decoration: none;
    }
    .mobile-export-excel {
        background: #ECFDF5;
        border: 1.5px solid #10B981;
        color: #10B981;
    }
    .mobile-export-pdf {
        background: #FEF2F2;
        border: 1.5px solid #EF4444;
        color: #EF4444;
    }
    
    /* Responsive Table to Cards */
    .responsive-table thead {
        display: none;
    }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }
    .responsive-table tr {
        margin-bottom: 1rem;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        border: 1px solid var(--border);
    }
    .responsive-table td {
        text-align: right !important;
        padding: 0.5rem 0 !important;
        position: relative;
        border-bottom: 1px solid #f1f5f9 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    .responsive-table td:last-child {
        border-bottom: 0 !important;
        justify-content: flex-end;
    }
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
        font-size: 0.85rem;
    }
    .responsive-table td > div {
        text-align: right;
    }

    /* PWB Card & Details tweaks */
    .pwb-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 1.5rem 1rem !important;
    }
    .pwb-card h3 {
        font-size: 1rem !important;
    }
    .pwb-card p {
        font-size: 1.4rem !important;
    }
    
    .detail-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #f1f5f9;
    }
    .detail-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .detail-item .label {
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-bottom: 0.2rem;
    }
    .detail-item .value {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text-main);
    }
}

