:root {
    --primary-green-strong: #39a347;
    --surface-0: #050805;
    --surface-1: #0b120c;
    --surface-2: #101811;
    --surface-3: #162118;
    --surface-4: #1c2920;
    --border-soft: rgba(143, 165, 144, 0.14);
    --border-strong: rgba(92, 175, 102, 0.32);
    --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.28);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.3);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --content-width: 1180px;
}

html {
    scroll-behavior: smooth;
    --header-offset: 78px;
}

body {
    padding-top: var(--header-offset);
    line-height: 1.65;
    color: var(--text-light);
    background:
        radial-gradient(circle at top left, rgba(57, 163, 71, 0.16), transparent 34%),
        radial-gradient(circle at 80% 10%, rgba(33, 96, 43, 0.14), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(19, 52, 24, 0.32), transparent 42%),
        linear-gradient(180deg, #071007 0%, #050805 52%, #080d08 100%);
}

body::before,
body::after {
    animation: none;
}

body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 92%);
    opacity: 0.34;
}

body::after {
    background:
        radial-gradient(circle at 12% 15%, rgba(46, 125, 50, 0.1), transparent 28%),
        radial-gradient(circle at 85% 30%, rgba(46, 125, 50, 0.08), transparent 24%);
    opacity: 0.52;
}

a {
    color: #a9efab;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: #ffffff;
}

p {
    color: var(--text-light-secondary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #dff0df;
    letter-spacing: 0.08em;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.main-page-content {
    padding: 1.25rem 0 3.5rem;
}

.page-flash {
    margin-bottom: 1rem;
}

.content-section {
    padding: 1.25rem 0;
}

.content-wrapper {
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.narrow-layout {
    width: min(calc(100% - 2rem), 900px);
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: #95d69d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before,
.hero-kicker::before {
    content: "";
    width: 36px;
    height: 1px;
    background: rgba(149, 214, 157, 0.6);
}

.section-shell,
.app-card,
.dashboard-shell,
.auth-card {
    background:
        linear-gradient(180deg, rgba(28, 41, 32, 0.92) 0%, rgba(11, 18, 12, 0.96) 100%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.section-shell {
    padding: clamp(1.4rem, 3vw, 2.25rem);
}

.app-card {
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-md);
}

.compact-card {
    padding: 1.2rem 1.3rem;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.6rem;
}

.section-heading.centered {
    align-items: center;
    text-align: center;
}

.section-heading p,
.page-intro {
    max-width: 720px;
    margin: 0;
    color: var(--text-muted);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    gap: 1.5rem;
    align-items: stretch;
    padding: clamp(1.6rem, 4vw, 2.6rem);
    border-radius: 30px;
    border: 1px solid var(--border-strong);
    background:
        linear-gradient(135deg, rgba(27, 43, 29, 0.96) 0%, rgba(9, 15, 10, 0.98) 72%),
        radial-gradient(circle at top right, rgba(57, 163, 71, 0.12), transparent 32%);
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34);
    overflow: hidden;
}

.hero-panel-centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.hero-panel-centered .hero-copy {
    align-items: center;
}

.hero-panel-centered .hero-title {
    max-width: 14ch;
}

.hero-panel-centered .hero-lead {
    max-width: 58ch;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
}

.hero-title {
    margin: 0;
    max-width: 12ch;
}

.hero-lead {
    max-width: 60ch;
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-light-secondary);
}

.hero-actions,
.action-row,
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.meta-pill {
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(115, 173, 121, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light-secondary);
    font-size: 0.88rem;
}

.hero-aside {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.hero-stat-grid {
    display: grid;
    gap: 0.8rem;
}

.hero-stat {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(96, 163, 102, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.hero-stat strong,
.hero-stat h3 {
    display: block;
    margin: 0 0 0.35rem;
    color: #f6fff6;
    font-family: var(--font-header);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-stat p,
.feature-card p,
.auth-note,
.support-copy {
    margin: 0;
    color: var(--text-muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    display: grid;
    gap: 0.9rem;
    padding: 1.35rem;
    min-height: 100%;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(46, 125, 50, 0.16);
    color: #b7f0ba;
    font-size: 1.2rem;
}

.pane-title {
    margin-bottom: 1.1rem;
}

.auth-page-wrapper {
    min-height: calc(100vh - var(--header-offset) - 200px);
    display: flex;
    align-items: center;
}

.auth-form-container {
    width: min(100%, 520px);
}

.auth-card {
    padding: clamp(1.5rem, 3vw, 2.1rem);
    text-align: center;
}

.auth-logo {
    width: 92px;
    height: 92px;
    margin: 0 auto 1.2rem;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.18), rgba(46, 125, 50, 0.07));
    border: 1px solid rgba(96, 163, 102, 0.18);
    color: #c5f0c7;
    font-size: 2rem;
}

.auth-logo img {
    max-width: 100%;
    border-radius: 18px;
}

.auth-divider {
    margin: 1.4rem 0;
    border: 0;
    border-top: 1px solid var(--border-soft);
}

.auth-note {
    font-size: 0.95rem;
}

.dashboard-shell {
    padding: clamp(1.35rem, 3vw, 2rem);
}

.dashboard-header-panel {
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border-soft);
}

.dashboard-header {
    display: grid;
    gap: 0.85rem;
    text-align: center;
}

.corp-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    border-radius: 24px;
    border: 1px solid rgba(96, 163, 102, 0.24);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.55rem;
}

.welcome-text {
    margin: 0;
    color: var(--text-light-secondary);
    text-align: center;
}

.application-metadata {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.92rem;
}

.form-section {
    padding: 1.35rem 1.35rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.025);
}

.section-title {
    margin-bottom: 1.15rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 1.05rem;
    color: #dff0df;
}

.optional-text {
    font-size: 0.82rem;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.15rem;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.app-form label,
.form-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #d9ead9;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-form .form-control,
.app-form input[type="text"],
.app-form input[type="email"],
.app-form input[type="password"],
.app-form textarea,
.form-control {
    width: 100%;
    padding: 0.82rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(117, 140, 118, 0.22) !important;
    background: rgba(3, 7, 4, 0.62) !important;
    color: var(--text-light) !important;
    font-family: var(--font-body);
    font-size: 0.98rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.app-form .form-control::placeholder,
.form-control::placeholder {
    color: rgba(194, 204, 194, 0.45);
}

.app-form .form-control:focus,
.app-form input[type="text"]:focus,
.app-form input[type="email"]:focus,
.app-form input[type="password"]:focus,
.app-form textarea:focus,
.form-control:focus {
    outline: none !important;
    border-color: rgba(98, 189, 108, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.18) !important;
    background: rgba(5, 10, 6, 0.85) !important;
}

.form-text,
.text-muted-alt {
    color: var(--text-muted) !important;
    font-size: 0.88rem;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(143, 165, 144, 0.24);
}

.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-label {
    color: var(--text-light-secondary);
}

.btn-cta-primary,
.btn-submit-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.85rem 1.4rem;
    border: 1px solid rgba(117, 205, 127, 0.34);
    border-radius: 14px;
    background: linear-gradient(180deg, #39a347 0%, #24672d 100%);
    color: #f7fff7 !important;
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 14px 30px rgba(13, 35, 17, 0.34);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-align: center;
}

.btn-cta-primary:hover,
.btn-submit-app:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(15, 42, 20, 0.4);
    filter: brightness(1.05);
}

.btn-subtle,
.btn-alt-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.75rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-light) !important;
    font-size: 0.93rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-subtle:hover,
.btn-alt-action:hover {
    background: rgba(46, 125, 50, 0.15);
    border-color: rgba(117, 205, 127, 0.26);
    transform: translateY(-1px);
}

.btn-secondary {
    border-radius: 12px;
    border-color: var(--border-soft);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-light);
}

.btn-secondary:hover {
    border-color: rgba(117, 205, 127, 0.26);
    background: rgba(46, 125, 50, 0.1);
    color: #ffffff;
}

.btn-danger.btn-sm {
    border-radius: 10px;
}

.btn-submit-app:disabled,
#saveDetailsButton.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#saveDetailsButton.btn-primary {
    border-radius: 12px;
    border-color: rgba(117, 205, 127, 0.34);
    background: rgba(46, 125, 50, 0.15);
    color: #f0f8f0;
    font-family: var(--font-header);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#saveDetailsButton.btn-primary:hover {
    background: rgba(46, 125, 50, 0.26);
}

.input-group > .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn-alt-action {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-soft);
    color: var(--text-light);
}

.status-message,
.alert-custom {
    padding: 1.2rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
}

.alert-custom .alert-heading,
.status-message .alert-heading {
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.alert-divider,
.section-divider {
    border-color: var(--border-soft);
    opacity: 1;
}

.alert-success,
.status-success {
    border-color: rgba(81, 178, 89, 0.25);
    background: rgba(46, 125, 50, 0.14);
}

.alert-danger,
.status-danger {
    border-color: rgba(215, 90, 90, 0.25);
    background: rgba(179, 40, 40, 0.12);
}

.alert-warning,
.status-warning {
    border-color: rgba(255, 193, 7, 0.24);
    background: rgba(255, 193, 7, 0.1);
}

.alert-info,
.status-info {
    border-color: rgba(100, 181, 246, 0.26);
    background: rgba(33, 150, 243, 0.11);
}

.status-pending {
    color: #ffd45f;
    font-weight: 700;
}

.status-approved {
    color: #87ee90;
    font-weight: 700;
}

.status-denied {
    color: #ff8787;
    font-weight: 700;
}

.status-inprogress {
    color: #88c5ff;
    font-weight: 700;
}

.table {
    --bs-table-color: var(--text-light-secondary);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(133, 150, 135, 0.14);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(46, 125, 50, 0.08);
    margin-bottom: 0;
}

.table thead th {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-bottom-color: rgba(92, 175, 102, 0.22);
    color: #d9ead9;
    font-family: var(--font-header);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.table td,
.table th {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    vertical-align: middle;
}

.alert {
    border: 1px solid var(--border-soft);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    background: rgba(18, 27, 20, 0.92);
    box-shadow: var(--shadow-soft);
}

.alert .btn-close {
    filter: invert(92%) sepia(3%) saturate(536%) hue-rotate(67deg) brightness(92%) contrast(90%);
}

.footer-custom {
    padding: 1.4rem 0 2rem;
    border-top: 1px solid rgba(143, 165, 144, 0.12);
    background: rgba(4, 8, 5, 0.72);
    backdrop-filter: blur(14px);
}

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

.navbar-custom {
    padding: 0.7rem 0;
    background: rgba(5, 8, 5, 0.86) !important;
    border-bottom: 1px solid rgba(89, 156, 96, 0.24) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24) !important;
    backdrop-filter: blur(14px);
}

.navbar-custom .navbar-brand {
    gap: 0.8rem;
    color: #f1fff2 !important;
    font-size: 1rem;
    letter-spacing: 0.12em;
}

.navbar-custom .navbar-brand .logo-img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(117, 205, 127, 0.22);
}

.navbar-custom .nav-link {
    color: var(--text-light-secondary) !important;
    margin-left: 0.15rem;
    margin-right: 0.15rem;
    padding: 0.6rem 0.9rem !important;
    border-radius: 12px;
    font-size: 0.95rem;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.045);
    text-shadow: none;
}

.navbar-custom .nav-link.banner-button-style {
    background: rgba(46, 125, 50, 0.14);
    border: 1px solid rgba(117, 205, 127, 0.24);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.navbar-custom .nav-link.banner-button-style:hover {
    background: rgba(46, 125, 50, 0.26);
}

.navbar-custom .navbar-toggler {
    border-color: rgba(117, 205, 127, 0.24) !important;
    box-shadow: none !important;
}

.navbar-custom .dropdown-menu {
    padding: 0.5rem;
    background: rgba(10, 14, 10, 0.96);
    border: 1px solid rgba(117, 205, 127, 0.18);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.navbar-custom .dropdown-item {
    border-radius: 10px;
    color: var(--text-light-secondary);
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
    color: #ffffff;
    background: rgba(46, 125, 50, 0.15);
}

.navbar-custom .dropdown-divider {
    border-color: rgba(117, 205, 127, 0.15);
}

.modal[data-bs-theme="dark"] .modal-content {
    background: rgba(11, 18, 12, 0.98);
    border: 1px solid var(--border-soft);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

.modal[data-bs-theme="dark"] .modal-header,
.modal[data-bs-theme="dark"] .modal-footer {
    border-color: var(--border-soft);
}

.modal[data-bs-theme="dark"] .form-control {
    background: rgba(3, 7, 4, 0.72);
    border-color: rgba(117, 140, 118, 0.22);
}

.accordion-button {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-light-secondary);
}

.accordion-button:not(.collapsed) {
    color: #def3df;
    background-color: rgba(46, 125, 50, 0.12);
}

.accordion-button:focus {
    border-color: rgba(98, 189, 108, 0.44);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.18);
}

.accordion-body,
.accordion-item {
    background-color: rgba(14, 20, 15, 0.92);
    color: var(--text-light-secondary);
    border-color: var(--border-soft);
}

.apply-content {
    color: var(--text-light-secondary);
    font-size: 1rem;
    line-height: 1.75;
}

.apply-content h1,
.apply-content h2,
.apply-content h3,
.apply-content h4,
.apply-content h5 {
    color: #e1f4e1;
    letter-spacing: 0.08em;
}

.apply-content blockquote {
    margin: 1.2rem 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid rgba(117, 205, 127, 0.5);
    border-radius: 0 12px 12px 0;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.apply-content strong {
    color: #f5fff5;
}

.ql-snow .ql-editor.apply-content {
    padding: 0;
    color: var(--text-light-secondary);
}

@media (max-width: 991.98px) {
    .hero-panel,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .navbar-custom .nav-link.banner-button-style {
        margin-top: 0.4rem;
        margin-bottom: 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper {
        width: min(calc(100% - 1rem), var(--content-width));
    }

    .hero-panel,
    .dashboard-shell,
    .auth-card,
    .section-shell {
        border-radius: 20px;
    }

    .hero-actions > *,
    .action-row > *,
    .dashboard-actions > *,
    .btn-cta-primary,
    .btn-submit-app,
    .btn-subtle {
        width: 100%;
    }

    .form-section {
        padding: 1.15rem 1rem;
    }
}
