:root {
    --app-ink: #17202a;
    --app-muted: #667085;
    --app-line: #e6e9ef;
    --app-bg: #f4f7fb;
    --app-accent: #0f766e;
    --app-accent-dark: #115e59;
    --app-danger: #c2410c;
    --app-warning: #b45309;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--app-bg);
    color: var(--app-ink);
    font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--app-accent);
}

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

.bg-gradient-dark {
    background: #111827;
}

.auth-shell {
    background: #fff;
    color: var(--app-ink);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .08) 0, rgba(15, 118, 110, 0) 15rem),
        #fff;
    min-height: 100vh;
}

.auth-shell .card,
.welcome-panel {
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}

.auth-shell .card {
    overflow: hidden;
}

.auth-shell .card-header {
    background: var(--app-ink) !important;
    border: 0;
    padding: 1rem 1.25rem;
}

.auth-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 4.5rem);
    position: relative;
}

.auth-page::before {
    background: #0f766e;
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.auth-panel {
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .1);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .78fr);
    margin: 0 auto;
    max-width: 1080px;
    overflow: hidden;
    width: 100%;
}

.auth-brand-panel,
.auth-form-panel {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.auth-brand-panel {
    background:
        linear-gradient(145deg, rgba(15, 118, 110, .1), rgba(15, 118, 110, 0) 54%),
        #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: space-between;
}

.auth-brand-panel h1 {
    color: var(--app-ink);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

.auth-copy {
    color: #475467;
    font-size: 1.12rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 540px;
}

.auth-product-strip {
    justify-content: flex-start;
    margin-top: 0;
}

.auth-form-panel {
    align-self: center;
}

.auth-form-heading {
    margin-bottom: 1.5rem;
}

.auth-form-heading h2 {
    color: var(--app-ink);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0;
}

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

.auth-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 1.5rem;
}

.auth-form-actions .landing-button {
    border: 0;
}

.auth-form-actions .landing-button i {
    margin-right: .5rem;
}

.auth-forgot-link {
    color: var(--app-accent);
    font-weight: 900;
}

.auth-forgot-link:hover {
    color: var(--app-accent-dark);
}

#wrapper,
#content-wrapper {
    background: var(--app-bg);
}

.sidebar {
    background: #f8fafc !important;
    border-right: 1px solid #d9e2ec;
    box-shadow: 10px 0 28px rgba(15, 23, 42, .08);
}

.sidebar .sidebar-brand {
    background: #fff;
    border-bottom: 1px solid #e6e9ef;
    color: var(--app-ink) !important;
    height: 5rem;
    letter-spacing: 0;
    text-transform: none;
}

.sidebar .sidebar-brand-icon {
    background: var(--app-accent);
    border-radius: 8px;
    display: grid;
    height: 2.5rem;
    place-items: center;
    transform: none !important;
    width: 2.5rem;
}

.sidebar .sidebar-heading {
    color: var(--app-accent);
    letter-spacing: 0;
    padding-top: 1rem;
}

.sidebar-light .nav-item {
    margin: .1rem 0;
}

.sidebar-light .nav-item:hover,
.sidebar-light .nav-item.active {
    background: #dff7ef;
}

.sidebar-light .nav-item .nav-link {
    background: transparent;
    border-radius: 0;
    color: #475467;
    font-weight: 800;
    margin: 0;
    padding: .85rem 1rem;
}

.sidebar-light .nav-item .nav-link:hover,
.sidebar-light .nav-item.active .nav-link {
    background: transparent;
    color: var(--app-accent-dark);
}

.sidebar-light .nav-item .nav-link i {
    color: var(--app-accent);
    margin-right: .35rem;
}

.sidebar-light .nav-item .nav-link:hover i,
.sidebar-light .nav-item.active .nav-link i {
    color: var(--app-accent-dark);
}

.sidebar .collapse-inner {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px !important;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .1);
}

.sidebar-light hr.sidebar-divider {
    border-top: 1px solid #d9e2ec;
}

.sidebar-light #sidebarToggle {
    background: #ecfdf5;
}

.sidebar-light #sidebarToggle::after {
    color: var(--app-accent-dark);
}

.sidebar-light #sidebarToggle:hover {
    background: #d1fae5;
}

.topbar {
    border-bottom: 1px solid var(--app-line);
    box-shadow: none !important;
}

.app-topbar-title {
    color: var(--app-ink);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.container-fluid,
.container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.page-kicker {
    color: var(--app-accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.page-title {
    color: var(--app-ink);
    font-weight: 900;
    letter-spacing: 0;
}

.page-subtitle {
    color: var(--app-muted);
    margin-bottom: 0;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.btn {
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0;
}

.btn-primary {
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--app-accent-dark);
    border-color: var(--app-accent-dark);
}

.btn-warning {
    background: var(--app-warning);
    border-color: var(--app-warning);
    color: #fff;
}

.btn-danger {
    background: var(--app-danger);
    border-color: var(--app-danger);
}

.card {
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07) !important;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--app-line);
    color: var(--app-ink);
    font-weight: 900;
}

.metric-card {
    border-left: 0 !important;
    min-height: 8.75rem;
    overflow: hidden;
    position: relative;
}

.metric-card::after {
    background: var(--metric-color, var(--app-accent));
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 5px;
}

.metric-label {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.metric-value {
    color: var(--app-ink);
    font-size: 1.9rem;
    font-weight: 900;
}

.metric-icon {
    align-items: center;
    background: #ecfdf5;
    border-radius: 8px;
    color: var(--metric-color, var(--app-accent));
    display: flex;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.workflow-card {
    height: 100%;
}

.workflow-card .card-body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    justify-content: space-between;
}

.table-responsive {
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--app-line);
    color: var(--app-muted);
    font-size: .76rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.table-bordered,
.table-bordered td,
.table-bordered th {
    border-color: var(--app-line);
}

.form-control {
    border-color: #d0d5dd;
    border-radius: 8px;
    min-height: 2.75rem;
}

.form-control:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

.searchable-select {
    position: relative;
}

.searchable-select-native {
    height: 1px !important;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 1px !important;
}

.searchable-select-input {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .9rem center / 12px 8px no-repeat;
    padding-right: 2.4rem;
}

.searchable-select-list {
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
    display: none;
    left: 0;
    margin-top: .35rem;
    max-height: 15rem;
    overflow-y: auto;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1060;
}

.searchable-select.is-open .searchable-select-list {
    display: block;
}

.searchable-select-option,
.searchable-select-empty {
    border-radius: 8px;
    color: var(--app-ink);
    display: block;
    padding: .65rem .75rem;
    text-align: left;
    width: 100%;
}

.searchable-select-option {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option:focus,
.searchable-select-option[aria-selected="true"] {
    background: #ecfdf5;
    color: var(--app-accent-dark);
    outline: 0;
}

.searchable-select-empty {
    color: var(--app-muted);
}

label {
    color: #344054;
    font-weight: 800;
}

.permission-group {
    border-top: 1px solid var(--app-line);
    padding: 1rem 0;
}

.permission-group h6 {
    color: var(--app-ink);
    font-weight: 900;
    margin-bottom: .75rem;
}

.permission-grid {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.permission-check {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    display: flex;
    gap: .55rem;
    margin: 0;
    padding: .75rem;
}

.permission-check input {
    margin-top: .2rem;
}

.permission-check span {
    color: var(--app-ink);
    font-weight: 800;
    line-height: 1.3;
}

.sticky-footer {
    border-top: 1px solid var(--app-line);
}

.landing-page {
    background: #fff;
    color: var(--app-ink);
    min-height: 100vh;
}

.landing-hero {
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .08) 0, rgba(15, 118, 110, 0) 15rem),
        #fff;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    overflow: hidden;
    padding: 1.5rem clamp(1rem, 4vw, 4.5rem);
    position: relative;
}

.landing-hero::before {
    background: #0f766e;
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.landing-nav {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.landing-brand {
    align-items: center;
    color: var(--app-ink);
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 900;
    gap: .75rem;
}

.landing-brand:hover,
.landing-link:hover {
    color: var(--app-ink);
    text-decoration: none;
}

.landing-brand img {
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    height: 3.15rem;
    object-fit: contain;
    padding: .3rem;
    width: 3.15rem;
}

.landing-nav-actions,
.landing-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.landing-link {
    color: var(--app-ink);
    font-weight: 800;
}

.landing-content {
    align-self: center;
    justify-self: center;
    max-width: 860px;
    padding: clamp(3rem, 10vh, 7rem) 0;
    text-align: center;
}

.landing-logo-mark {
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
    height: clamp(5.5rem, 12vw, 8rem);
    margin-bottom: 1.35rem;
    object-fit: contain;
    padding: .55rem;
    width: clamp(5.5rem, 12vw, 8rem);
}

.landing-kicker {
    color: var(--app-accent);
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.landing-content h1 {
    color: var(--app-ink);
    font-size: clamp(3.2rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
    max-width: 13ch;
}

.landing-copy {
    color: #475467;
    font-size: 1.3rem;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    max-width: 620px;
}

.landing-button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    min-height: 2.9rem;
    padding: .82rem 1.35rem;
    text-decoration: none;
}

.landing-button:hover {
    text-decoration: none;
}

.landing-button-primary {
    background: #0f766e;
    box-shadow: 0 14px 28px rgba(15, 118, 110, .22);
    color: #fff;
}

.landing-button-primary:hover {
    background: #115e59;
    color: #fff;
}

.landing-button-outline,
.landing-button-light {
    border: 1px solid #d0d5dd;
    color: var(--app-ink);
}

.landing-button-outline:hover,
.landing-button-light:hover {
    background: #f8fafc;
    border-color: #98a2b3;
    color: var(--app-ink);
}

.landing-button-light {
    background: #fff;
}

.landing-product-strip {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    justify-content: center;
    margin-top: 2.1rem;
}

.landing-product-action {
    min-height: 4rem;
}

.landing-product {
    align-items: center;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    color: var(--app-ink);
    display: inline-flex;
    font-weight: 900;
    gap: .7rem;
    min-height: 4rem;
    padding: .7rem .95rem;
}

.landing-product img {
    border-radius: 8px;
    height: 2.65rem;
    object-fit: cover;
    width: 2.65rem;
}

.landing-product i {
    align-items: center;
    background: #ecfdf5;
    border-radius: 8px;
    color: var(--app-accent);
    display: inline-flex;
    font-size: 1.25rem;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

@media (max-width: 767.98px) {
    .container-fluid,
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .quick-actions .btn,
    .card-header .btn {
        width: 100%;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .landing-hero {
        background:
            linear-gradient(180deg, rgba(15, 118, 110, .1) 0, rgba(15, 118, 110, 0) 14rem),
            #fff;
        min-height: 100svh;
        padding: 1rem;
    }

    .landing-nav,
    .landing-nav-actions,
    .landing-actions {
        align-items: stretch;
    }

    .landing-brand span {
        max-width: 9rem;
    }

    .landing-content {
        padding: 2.5rem 0;
        text-align: left;
    }

    .landing-content h1,
    .landing-copy {
        margin-left: 0;
        margin-right: 0;
    }

    .landing-logo-mark {
        height: 5rem;
        width: 5rem;
    }

    .landing-copy {
        font-size: 1.05rem;
    }

    .landing-button {
        width: 100%;
    }

    .landing-product-strip {
        justify-content: flex-start;
    }

    .landing-product {
        width: 100%;
    }

    .auth-page {
        padding: 1rem;
    }

    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel,
    .auth-form-panel {
        padding: 1.25rem;
    }

    .auth-brand-panel {
        gap: 1.4rem;
    }

    .auth-brand-panel h1 {
        font-size: 2.75rem;
    }

    .auth-form-actions .landing-button,
    .auth-forgot-link {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}
