:root {
    /* Backgrounds – Cream based figma */
    --bg-primary: #F1EEDF;
    --bg-secondary: #E2DDC8;
    --bg-tertiary: #D2CBB1;

    /* Surfaces */
    --surface-card: #FFFFFF;
    --surface-elevated: #FFFEEC;
    --surface-elevated-rgb: rgb(255, 254, 236);

    /* Accent – Sage Green figma */
    --accent-primary: #9EAF8F;
    --accent-primary-hover: #AEBFA0; /* lighter – hover / active */
    --accent-secondary: #859A78; /* slightly darker – secondary accents */
    --accent-primary-rgb: 158, 175, 143;
    --icons-bg: #C9D4B8;

    /* Text figma */
    --text-primary: #3D4F41;
    --text-secondary: #5E6F63;
    --text-muted: #8A9A8F;
    --text-dark: #B7AA7D;

    /* Nav figma */
    --nav-bg: #2B3D3D;

    /* Borders */
    --border-default: #E3DFB3;
    --border-accent: #98A869;
    --border-input: rgba(152, 168, 105, 0.35);
    --border-default-rgb: rgb(227, 223, 179);

    /* Status / Highlights */
    --success: #7FB069;
    --warning: #fac956; /* Golden */
    --error: #D9534F;

    /* Fonts */
    --font-heading: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows – soft for light theme */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.16);
}



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

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-primary);
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.88);
    z-index: -1;
    pointer-events: none;
}

body.has-navbar {
    padding-top: 0;
}

body.has-navbar .navbar-spacer {
    height: 100px;
    flex-shrink: 0;
}

body.has-navbar main.container {
    margin-top: 0;
    padding-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

.card {
    background: var(--surface-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(143, 171, 143, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(143, 171, 143, 0.4);
    color: #FFFFFF;
}

.btn-secondary {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(143, 171, 143, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 15, 15, 0.8);
    border: 2px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(15, 15, 15, 0.8) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: rgba(15, 15, 15, 0.8) !important;
    border-color: var(--accent-primary) !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    background: rgba(26, 26, 26, 0.8);
    border-color: var(--accent-primary);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(143, 171, 143, 0.15);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    border-width: 2px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-input);
    border-radius: 4px;
    background: rgba(26, 26, 26, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(26, 26, 26, 0.8);
}

input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    /* top: 2px; */
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(143, 171, 143, 0.15);
}

.form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.form-checkbox-wrapper label {
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.form-help {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-info {
    background: rgba(143, 171, 143, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--accent-primary);
    color: #FFFFFF;
}

.badge-secondary {
    background: var(--surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-default);
    padding: 10px 0;
    margin-bottom: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
}

.navbar-brand .logo-text,
.navbar-brand .logo-highlight {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 300;
    font-size: 1.1em;
    text-transform: uppercase;
}

.navbar-brand .logo-text {
    color: var(--bg-primary);
}

.navbar-brand .logo-highlight {
    color: var(--text-dark);
}

.navbar-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.navbar-link {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
    background: var(--surface-card);
    touch-action: manipulation;
    min-height: 56px;
    transition: all 0.2s ease;
}

.navbar-link:active {
    background: var(--surface-elevated);
}

.navbar-link:hover {
    background: var(--surface-hover, rgba(0, 0, 0, 0.03));
}

.navbar-link.active {
    color: var(--accent-primary);
    background: rgba(152, 168, 105, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--bg-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (min-width: 769px) {
    .navbar-menu {
        flex-direction: row;
        gap: 20px;
        align-items: center;
        flex-wrap: wrap;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-primary) transparent;
    }

    .navbar-menu::-webkit-scrollbar {
        height: 4px;
    }

    .navbar-menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .navbar-menu::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 2px;
    }

    .navbar-link {
        padding: 8px 12px;
        width: auto;
        text-align: center;
        border-bottom: none;
        background: transparent;
        min-height: auto;
        color: var(--text-secondary);
        font-size: 15px;
        white-space: nowrap;
        border-radius: var(--radius-sm, 4px);
        transition: all 0.2s ease;
    }

    .navbar-link:hover {
        color: var(--accent-primary);
        background: rgba(152, 168, 105, 0.1);
    }

    .navbar-link.active {
        color: var(--accent-primary);
        background: rgba(152, 168, 105, 0.15);
        border-left: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--surface-card);
        border-bottom: 2px solid var(--border-default);
        padding: 0;
        flex-direction: column;
        gap: 0;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(100vh - 70px);
        -webkit-overflow-scrolling: touch;
    }

    .navbar-menu.active {
        display: flex;
    }

    /* Custom scrollbar for navbar menu */
    .navbar-menu::-webkit-scrollbar {
        width: 6px;
    }

    .navbar-menu::-webkit-scrollbar-track {
        background: var(--surface-elevated);
    }

    .navbar-menu::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 3px;
    }

    .navbar-menu::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
    }
}

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

.text-secondary {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--accent-primary);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.py-2 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.py-3 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.py-4 {
    padding-top: 32px;
    padding-bottom: 32px;
}