:root {
    --gold-primary: #d4af37;
    --gold-secondary: #f9d976;
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-red: #f43f5e;
    --accent-green: #10b981;
    --border-radius: 16px;
    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(212, 175, 55, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(212, 175, 55, 0.05) 0%, transparent 40%);
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 3rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.grid-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.input-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.label-dual {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.label-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 0.9rem;
    opacity: 0.7;
}

input, select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* Searchable Select Custom Component */
.searchable-select {
    position: relative;
}

.search-input-field {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.options-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--dark-surface);
    border: 1px solid var(--gold-primary);
    border-radius: 0 0 12px 12px;
    z-index: 1000;
    display: none;
}

.options-dropdown div {
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.options-dropdown div:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* Slab Manager */
.slab-row {
    display: grid;
    grid-template-columns: 1fr 1fr 50px;
    gap: 15px;
    margin-bottom: 12px;
    align-items: end;
}

.btn-icon {
    background: none;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--accent-red);
    color: white;
}

.btn-add-slab {
    background: rgba(16, 185, 129, 0.1);
    border: 1px dashed var(--accent-green);
    color: var(--accent-green);
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
}

.btn-add-slab:hover {
    background: var(--accent-green);
    color: white;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--gold-gradient);
    color: var(--dark-bg);
    border: none;
    border-radius: 14px;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(212, 175, 55, 0.4);
}

/* Results */
.stat-box {
    padding: 25px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.stat-box.highlight {
    background: var(--gold-gradient);
    color: var(--dark-bg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
}

.chart-container {
    height: 350px;
    margin: 20px 0;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    padding: 15px;
    text-align: left;
    font-weight: 800;
}

td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge-yearly { background: rgba(212, 175, 55, 0.2); color: var(--gold-primary); border: 1px solid var(--gold-primary); }

/* Animation */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}
