:root {
    --primary-color: #004e92;
    --secondary-color: #000428;
    --accent-color: #ffffff;
    --text-color: #2d3748;
    --text-muted: #718096;
    --bg-color: #f7fafc;
    --gradient-bg: linear-gradient(135deg, #000428, #004e92);
    --gradient-hover: linear-gradient(135deg, #004e92, #000428);
    --card-shadow: 0 10px 40px rgba(0, 4, 40, 0.08);
    --card-shadow-hover: 0 20px 60px rgba(0, 4, 40, 0.12);
    --input-bg: #fff;
    --input-border: #e2e8f0;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
}

strong, b {
    font-weight: 700;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    border: none;
    transition: var(--transition-smooth);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--gradient-bg);
    color: var(--accent-color) !important;
    box-shadow: 0 8px 30px rgba(0, 78, 146, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 78, 146, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

a.btn-primary,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:active,
.btn-primary a,
.btn-primary a:visited,
.btn-primary a:hover,
.btn-primary a:active {
    color: #ffffff !important;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 78, 146, 0.25);
}

/* Form Elements */
input,
select,
textarea {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    transition: var(--transition-smooth);
    color: var(--text-color);
}

input::placeholder,
textarea::placeholder {
    color: #a0aec0;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #cbd5e0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 78, 146, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

/* Premium Fields */
.premium-field {
    border: 2px solid var(--primary-color) !important;
    background: linear-gradient(135deg, #ffffff, #eef2ff) !important;
    box-shadow: 0 4px 20px rgba(0, 78, 146, 0.12);
    font-weight: 700 !important;
    color: var(--secondary-color) !important;
}

.premium-field:hover {
    box-shadow: 0 6px 25px rgba(0, 78, 146, 0.2);
    border-color: var(--secondary-color) !important;
}

/* Premium Date & Time */
input[type="date"].premium-field,
input[type="time"].premium-field {
    padding: 16px 20px !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ffffff, #eef2ff) !important;
    box-shadow: 0 4px 20px rgba(0, 78, 146, 0.12) !important;
    font-size: 1rem;
    font-weight: 700 !important;
    color: var(--secondary-color) !important;
    cursor: pointer;
    transition: var(--transition-smooth);
    -webkit-appearance: none;
    appearance: none;
}

input[type="date"].premium-field:hover,
input[type="time"].premium-field:hover {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 6px 25px rgba(0, 78, 146, 0.2) !important;
}

input[type="date"].premium-field:focus,
input[type="time"].premium-field:focus {
    box-shadow: 0 0 0 4px rgba(0, 78, 146, 0.1), 0 6px 25px rgba(0, 78, 146, 0.2) !important;
    border-color: var(--primary-color) !important;
}

input[type="date"].premium-field::-webkit-calendar-picker-indicator,
input[type="time"].premium-field::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(18%) sepia(90%) saturate(2000%) hue-rotate(195deg) brightness(60%);
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 6px;
}

input[type="date"].premium-field::-webkit-calendar-picker-indicator:hover,
input[type="time"].premium-field::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(0, 78, 146, 0.1);
}

/* ===== Custom Premium Select ===== */
.custom-select-wrapper {
    position: relative;
    margin-bottom: 20px;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 78, 146, 0.12);
}

.custom-select-trigger:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 6px 25px rgba(0, 78, 146, 0.2);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 78, 146, 0.1), 0 6px 25px rgba(0, 78, 146, 0.2);
    border-radius: 12px 12px 0 0;
}

.custom-select-trigger .arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.custom-select-wrapper.open .arrow {
    transform: rotate(180deg);
}

.custom-select-trigger .placeholder {
    color: #a0aec0;
    font-weight: 500;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(0, 78, 146, 0.15);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.custom-select-wrapper.open .custom-select-options {
    max-height: 280px;
    overflow-y: auto;
    opacity: 1;
}

.custom-select-option {
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary-color);
    font-weight: 600;
    padding-left: 28px;
}

.custom-select-option.selected {
    background: var(--gradient-bg);
    color: #fff;
    font-weight: 700;
}

.custom-select-option.selected:hover {
    background: var(--gradient-hover);
    color: #fff;
}

/* Scrollbar premium */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 0 0 12px 0;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.premium-field:focus {
    box-shadow: 0 0 0 4px rgba(0, 78, 146, 0.15), 0 6px 25px rgba(0, 78, 146, 0.2);
}

/* Layout Util */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.card {
    background: #fff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-bg);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 32px 0;
    margin-top: auto;
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

footer a:hover {
    color: #fff;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 16px 20px;
    background: var(--bg-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-radius: 10px;
}

table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--input-border);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: rgba(0, 78, 146, 0.02);
}

/* Hamburger menu button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 16px;
    }

    /* Mobile nav */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 1000;
        padding: 20px;
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .nav-links a::after {
        display: none;
    }

    /* Cards */
    .card {
        padding: 20px;
        border-radius: 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Tables scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    table th, table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    /* Plans grid */
    [style*="grid-template-columns: repeat(auto-fit, minmax(300px"] {
        grid-template-columns: 1fr !important;
    }

    /* Premium plan scale fix */
    [style*="transform: scale(1.05)"] {
        transform: none !important;
    }

    /* Dashboard header stack */
    [style*="justify-content: space-between"][style*="align-items: center"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    /* Dashboard link input */
    [style*="display: flex"][style*="flex-wrap: wrap"] {
        flex-direction: column;
    }

    /* Chart container */
    canvas {
        max-height: 220px !important;
    }

    /* Form inputs */
    input, select, textarea {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    /* Service list item */
    li[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
}