/* Base Configuration & Variables */
:root {
    /* Soft gradient blend of teal and deep blue */
    --bg-primary: #0A192F;
    --bg-secondary: #0F3B57;
    --bg-accent: #008080; /* Teal */
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --accent: #00E5FF;
    --accent-glow: 0 0 15px rgba(0, 229, 255, 0.6), 0 0 30px rgba(0, 229, 255, 0.2);
    
    --success: #00E676;
    --warning: #FFEA00;
    --danger: #FF1744;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Background Ambient Lighting (Volumetric effect) */
.background-orbs {
    position: absolute;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    top: 0;
    left: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.7;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(0, 128, 128, 0.4); /* Teal orb */
    top: -100px;
    left: -200px;
}

.orb-2 {
    width: 700px;
    height: 700px;
    background: rgba(15, 59, 87, 0.8); /* Deep blue orb */
    bottom: -150px;
    right: -200px;
    animation-delay: -10s;
}

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

/* Layout */
.dashboard-container {
    display: flex;
    width: 95vw;
    max-width: 1600px;
    height: 90vh;
    gap: 1.5rem;
    padding: 1rem;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Sidebar */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-left: 0.5rem;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.logo h2 {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.1), transparent);
    transition: width 0.4s ease;
    z-index: 0;
}

.menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item:hover::before {
    width: 100%;
}

.menu-item .icon, .menu-item .text {
    position: relative;
    z-index: 1;
}

.menu-item .icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-item:hover .icon {
    transform: scale(1.1);
}

.menu-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.1), var(--accent-glow);
}

.menu-item.active .icon {
    color: var(--accent);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding: 1rem;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Main Panel */
.main-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    overflow-y: auto;
}

/* Custom Scrollbar */
.main-panel::-webkit-scrollbar {
    width: 6px;
}
.main-panel::-webkit-scrollbar-track {
    background: transparent;
}
.main-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.main-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.page-title .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.glass-input {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0.7rem 1.2rem;
    width: 320px;
    transition: all 0.3s ease;
}

.glass-input:focus-within {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.glass-input input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    margin-left: 0.8rem;
    width: 100%;
    font-size: 0.95rem;
    font-family: inherit;
}

.glass-input input::placeholder {
    color: var(--text-muted);
}

.glass-input .material-symbols-outlined {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Content Area */
.content-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.glass-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.glass-icon.warning {
    color: var(--warning);
    background: rgba(255, 234, 0, 0.1);
}

.glass-icon.success {
    color: var(--success);
    background: rgba(0, 230, 118, 0.1);
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.trend {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 600;
}

.trend .material-symbols-outlined {
    font-size: 1rem;
}

.trend.positive {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
}

.trend.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.trend-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Table Area */
.full-width {
    grid-column: 1 / -1;
}

.table-card {
    padding: 1.5rem 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.glass-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.btn-primary {
    background: rgba(0, 229, 255, 0.2);
    color: var(--accent);
    border-color: rgba(0, 229, 255, 0.4);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Table */
.table-responsive {
    overflow-x: auto;
    padding: 0 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 0.95rem;
}

tbody tr {
    transition: background 0.3s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Badges & Progress */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge.success {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge.warning {
    background: rgba(255, 234, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 234, 0, 0.3);
}

.badge.pending {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 10px;
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.pending {
    background: transparent;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.btn-icon:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}



/* Form & Result Styles for Calculator */
.premium-form { margin-top: 1.5rem; }
.form-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    font-weight: 600;
}
.section-title .material-symbols-outlined {
    color: var(--accent);
    font-size: 1.2rem;
}
.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.split-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.inner-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.glass-input-field {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}
.glass-input-field:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 229, 255, 0.5);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}
.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.flex-grow {
    flex: 1;
}
.align-end {
    align-items: flex-end;
}
.large-btn {
    width: 100%;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.success-glow {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}


/* Responsive Mobile Layout */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
    }
    .dashboard-container {
        flex-direction: column;
        width: 100vw;
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        gap: 0;
    }
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border-top: 1px solid var(--glass-border);
        border-bottom: none;
        border-radius: 20px 20px 0 0;
        background: rgba(10, 25, 47, 0.85);
        z-index: 1000;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    }
    .logo, .user-profile {
        display: none;
    }
    .menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        margin: 0;
    }
    .menu-item {
        padding: 0.6rem 1rem;
        border-radius: 12px;
    }
    .menu-item .text {
        display: none;
    }
    .main-panel {
        padding: 1rem;
        padding-bottom: 6rem;
        border-radius: 0;
        overflow-y: visible;
    }
    .card.glass-card {
        padding: 1.2rem !important;
    }
    .form-row, .split-row, .inner-row {
        grid-template-columns: 1fr !important;
        flex-direction: column;
    }
    .result-data-grid {
        grid-template-columns: 1fr !important;
    }
    .result-header {
        flex-direction: column;
        text-align: center;
    }
    .page-title h1 {
        font-size: 1.4rem;
    }
    .page-title .subtitle {
        font-size: 0.85rem;
    }
    .glass-input-field {
        font-size: 0.95rem;
        width: 100%;
    }
}
