:root {
    --navy: #004b8d;
    --navy-dark: #003366;
    --navy-deeper: #00254d;
    --blue: #2b78c5;
    --light-blue: #e6f2ff;
    --border: #dbe7f3;
    --muted: #5a7a9a;
    --surface: #ffffff;
    --page-bg: #f0f5fb;
    --text: #002e56;

    --green: #0f6e56;
    --green-bg: #e1f5ee;
    --green-border: #9fe1cb;

    --red: #993c1d;
    --red-bg: #faece7;
    --red-border: #f5c4b3;

    --amber: #854f0b;
    --amber-bg: #faeeda;
    --amber-border: #fac775;

    --sidebar-width: 248px;
    --topbar-height: 64px;
}
body {
    font-family: 'Sora', sans-serif;
    background: var(--page-bg);
    font-size: 15px;
}

/* Add Employee / Department / Staff Type shared form styles */
.add-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.add-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.add-heading-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.add-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.add-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.add-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
}

.add-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

.add-card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.add-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.add-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.add-card-body {
    padding: 24px;
}

.field-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

.add-card input[type="text"],
.add-card input[type="email"],
.add-card input[type="tel"],
.add-card input[type="date"],
.add-card input[type="number"],
.add-card input[type="password"],
.add-card select,
.add-card textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.add-card select {
    background-color: #f8fbff;
    padding-right: 36px;
}

.add-card input:focus,
.add-card select:focus,
.add-card textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.add-card textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.add-card .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 12px;
    color: #a32d2d;
}

.add-footer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-save {
    flex: 1;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .15s;
}

.btn-save:hover {
    background: #003d75;
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 22px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: border-color .2s, color .2s, background .2s;
}

.btn-cancel:hover {
    border-color: var(--blue);
    color: var(--navy);
    background: var(--light-blue);
}

@media (max-width: 600px) {
    .field-grid-2,
    .field-grid-3 {
        grid-template-columns: 1fr;
    }

    .add-card-body {
        padding: 16px;
    }

    .add-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-save,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   Employee List Page
================================ */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-wrap {
    position: relative;
}

.search-wrap input {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px 9px 38px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    width: 260px;
    transition: border-color .2s, box-shadow .2s;
}

.search-wrap input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.search-wrap input::placeholder {
    color: var(--muted);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--muted);
    pointer-events: none;
}

.toolbar select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 36px 9px 12px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color .2s;
    cursor: pointer;
}

.toolbar select:focus {
    border-color: var(--blue);
}

.btn-search {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.btn-search:hover {
    background: #003d75;
    transform: translateY(-1px);
}

.btn-add {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}

.btn-add:hover {
    background: #085041;
    color: #fff;
    transform: translateY(-1px);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-add-muted {
    background: var(--navy);
}

.btn-add-muted:hover {
    background: #003d75;
}

.panel {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.emp-table {
    width: 100%;
    border-collapse: collapse;
}

.emp-table thead tr {
    background: #f0f5fb;
}

.emp-table th {
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.emp-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.emp-table tbody tr:last-child {
    border-bottom: none;
}

.emp-table tbody tr:hover {
    background: #f6faff;
}

.emp-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    color: var(--text);
    vertical-align: middle;
}

.emp-identity {
    display: flex;
    align-items: center;
    gap: 11px;
}

.emp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
    text-transform: uppercase;
}

.emp-name {
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

.emp-email {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-active {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.badge-inactive {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid #f5c4b3;
}

.badge-office {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.badge-outside {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid #fac775;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.btn-view {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 8px;
    padding: 5px 13px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.btn-view:hover {
    background: #cce3f7;
    color: var(--navy);
}

.btn-edit {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid #fac775;
    border-radius: 8px;
    padding: 5px 13px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.btn-edit:hover {
    background: #f5d99b;
    color: var(--amber);
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: var(--muted);
}

.table-scroll {
    overflow-x: auto;
}

@media (max-width: 640px) {
    .search-wrap input {
        width: 100%;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        flex-direction: column;
    }

    .toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions .btn-add {
        justify-content: center;
    }
}

/* ================================
   Shared Add/Edit Form Pages
   Used by: Add Employee, Add Department, Add Staff Type
================================ */

.add-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

/* Page heading */
.add-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.add-heading-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.add-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.add-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.add-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
}

/* Card */
.add-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

.add-card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.add-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.add-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.add-card-body {
    padding: 24px;
}

/* Field layouts */
.field-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

/* Django form widgets */
.add-card input[type="text"],
.add-card input[type="email"],
.add-card input[type="tel"],
.add-card input[type="date"],
.add-card input[type="number"],
.add-card input[type="password"],
.add-card select,
.add-card textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.add-card select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #f8fbff;
    padding-right: 36px;
}

.add-card input:focus,
.add-card select:focus,
.add-card textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.add-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--navy);
    margin-top: 2px;
}

.add-card textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Toggle row for checkbox fields */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}

.toggle-row-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.toggle-row-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* Progress steps */
.steps-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--page-bg);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
}

.step.active .step-num {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.step.active {
    color: var(--text);
}

.step-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 10px;
    min-width: 24px;
}

/* Footer */
.add-footer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-save {
    flex: 1;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .15s;
}

.btn-save:hover {
    background: #003d75;
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 22px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: border-color .2s, color .2s, background .2s;
}

.btn-cancel:hover {
    border-color: var(--blue);
    color: var(--navy);
    background: var(--light-blue);
}

/* Error display */
.add-card .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 12px;
    color: #a32d2d;
}

@media (max-width: 600px) {
    .field-grid-2,
    .field-grid-3 {
        grid-template-columns: 1fr;
    }

    .add-card-body {
        padding: 16px;
    }

    .add-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .steps-bar {
        display: none;
    }

    .add-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-save,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   Employee Detail Page
================================ */

.profile-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--light-blue);
    border: 2px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.profile-meta {
    font-size: 13.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-active {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.badge-inactive {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* Shared buttons used in detail pages */
.btn-navy {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, transform .15s;
}

.btn-navy:hover {
    background: #003d75;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, border-color .2s;
}

.btn-outline:hover {
    background: var(--light-blue);
    border-color: var(--blue);
    color: var(--navy);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, color .2s;
}

.btn-ghost:hover {
    background: var(--light-blue);
    color: var(--navy);
}

.btn-sm-blue {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 8px;
    padding: 5px 13px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-sm-blue:hover {
    background: #cce3f7;
    color: var(--navy);
}

.btn-toggle {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 9px;
    padding: 7px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}

.btn-toggle:hover {
    background: #cce3f7;
}

/* Section card */
.sec-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
}

.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.sec-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
}

.sec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.sec-body {
    padding: 24px;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

/* Salary grid */
.salary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.salary-card {
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.salary-card.total {
    background: var(--navy);
    border-color: var(--navy);
}

.salary-card.total .salary-label {
    color: rgba(255, 255, 255, .65);
}

.salary-card.total .salary-val {
    color: #fff;
}

.salary-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}

.salary-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

/* Document list */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-icon {
    font-size: 20px;
}

.doc-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.doc-type {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* Bank grid */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.bank-item {
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
}

.bank-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.bank-val {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
}

/* Collapse form panel */
.form-panel {
    background: #f8fbff;
    border-top: 1px solid var(--border);
    padding: 24px;
}

.form-panel .field-group {
    margin-bottom: 16px;
}

.form-panel label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 13px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-save-form {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.btn-save-form:hover {
    background: #003d75;
}

/* Empty notice */
.empty-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--page-bg);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--muted);
}

@media (max-width: 600px) {
    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .sec-body,
    .form-panel {
        padding: 16px;
    }
}

/* ================================
   Edit Employee Page
================================ */

.edit-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

/* Page heading */
.edit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.edit-heading-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.edit-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--light-blue);
    border: 1.5px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    flex-shrink: 0;
}

.edit-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.edit-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
}

/* Card */
.edit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

.edit-card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.edit-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.edit-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.edit-card-body {
    padding: 24px;
}

.field-full {
    grid-column: 1 / -1;
}

/* Edit page fields */
.edit-card .field-group input,
.edit-card .field-group select,
.edit-card .field-group textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.edit-card .field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #f8fbff;
    padding-right: 36px;
}

.edit-card .field-group input:focus,
.edit-card .field-group select:focus,
.edit-card .field-group textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

/* Active status toggle */
.toggle-label-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.toggle-label-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.toggle-row input[type="checkbox"] {
    width: 42px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--navy);
}

/* Footer */
.edit-footer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 600px) {
    .edit-card-body {
        padding: 16px;
    }

    .edit-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .edit-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ================================
   Payroll List Page
================================ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow .2s, transform .2s;
}

.stat-card:hover {
    box-shadow: 0 4px 20px rgba(0, 75, 141, .1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--light-blue);
}

.stat-icon.green {
    background: var(--green-bg);
}

.stat-icon.amber {
    background: var(--amber-bg);
}

.stat-icon.red {
    background: var(--red-bg);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
}

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.filter-bar select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color .2s;
}

.filter-bar select:focus {
    border-color: var(--blue);
}

.btn-filter {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}

.btn-filter:hover {
    background: #cce3f7;
    color: var(--navy);
}

.payroll-table {
    width: 100%;
    border-collapse: collapse;
}

.payroll-table thead tr {
    background: #f0f5fb;
}

.payroll-table th {
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.payroll-table th.text-end,
.payroll-table td.text-end {
    text-align: right;
}

.payroll-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.payroll-table tbody tr:last-child {
    border-bottom: none;
}

.payroll-table tbody tr:hover {
    background: #f6faff;
}

.payroll-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text);
    vertical-align: middle;
}

.employee-name {
    font-weight: 600;
    color: var(--navy);
}

.rank-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--light-blue);
    color: var(--navy);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.sl-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.staff-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.staff-office {
    background: var(--light-blue);
    color: var(--navy);
}

.staff-outside {
    background: var(--amber-bg);
    color: var(--amber);
}

.amount-gross {
    color: var(--text);
}

.amount-advance {
    color: var(--amber);
}

.amount-deduction {
    color: var(--red);
}

.amount-net {
    color: var(--green);
    font-weight: 700;
    font-size: 14px;
}

.payroll-table tfoot tr {
    background: #f0f5fb;
    border-top: 2px solid var(--border);
}

.payroll-table tfoot td {
    padding: 13px 16px;
    font-weight: 700;
    font-size: 13.5px;
}

.custom-alert {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid #9fe1cb;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================================
   Payroll Adjustment Form Page
================================ */

.adj-wrapper {
    max-width: 640px;
    margin: 0 auto;
}

/* Icon header */
.adj-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}

.adj-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 16px;
}

.adj-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.adj-sub {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* Card */
.adj-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.adj-card-body {
    padding: 32px;
}

/* Section label */
.section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Payroll adjustment fields */
.adj-card .field-group {
    margin-bottom: 20px;
}

.adj-card .field-group select,
.adj-card .field-group input,
.adj-card .field-group textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.adj-card .field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #f8fbff;
    padding-right: 36px;
}

.adj-card .field-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.adj-card .field-group select:focus,
.adj-card .field-group input:focus,
.adj-card .field-group textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .12);
}

.adj-card .field-group input.mono-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
}

/* Type toggle pills */
.type-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.type-pills-hidden {
    display: none;
}

.type-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #f8fbff;
    cursor: pointer;
    transition: all .2s;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    user-select: none;
}

.type-pill:hover {
    border-color: var(--blue);
    color: var(--navy);
    background: var(--light-blue);
}

.type-pill.active-advance {
    border-color: var(--amber-border);
    background: var(--amber-bg);
    color: var(--amber);
}

.type-pill.active-deduction {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red);
}

.pill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--border);
    transition: background .2s;
}

.type-pill.active-advance .pill-dot {
    background: var(--amber);
}

.type-pill.active-deduction .pill-dot {
    background: var(--red);
}

/* Grid layouts */
.field-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

/* Divider */
.adj-divider {
    height: 1px;
    background: var(--border);
    margin: 0 32px;
}

/* Footer */
.adj-card-footer {
    padding: 20px 32px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 600px) {
    .field-row-2,
    .field-row-3 {
        grid-template-columns: 1fr;
    }

    .type-pills {
        grid-template-columns: 1fr;
    }

    .adj-card-body,
    .adj-card-footer {
        padding: 20px;
    }

    .adj-divider {
        margin: 0 20px;
    }
}

/* ================================
   Generate Payroll Page
================================ */

.generate-wrapper {
    max-width: 560px;
    margin: 0 auto;
}

/* Icon header */
.gen-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    text-align: center;
}

.gen-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
    border: 1px solid #b5d4f4;
}

.gen-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.gen-sub {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* Card */
.gen-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.gen-card-body {
    padding: 32px;
}

/* Generate payroll fields */
.gen-card .field-group {
    margin-bottom: 22px;
}

.gen-card .field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 8px;
}

.gen-card .field-group select,
.gen-card .field-group input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 36px 11px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.gen-card .field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.gen-card .field-group select:focus,
.gen-card .field-group input:focus {
    border-color: var(--blue);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .12);
}

/* Two-column grid */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Divider */
.gen-divider {
    height: 1px;
    background: var(--border);
    margin: 0 32px;
}

/* Footer actions */
.gen-card-footer {
    padding: 20px 32px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-generate {
    flex: 1;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-generate:hover {
    background: #003d75;
    transform: translateY(-1px);
}

.btn-generate:active {
    transform: translateY(0);
}

/* Info notice */
.gen-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    border-radius: 12px;
    padding: 13px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--navy);
    line-height: 1.55;
}

.gen-notice-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 600px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .gen-card-body,
    .gen-card-footer {
        padding: 20px;
    }

    .gen-divider {
        margin: 0 20px;
    }

    .gen-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-generate,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   Dashboard Base Layout
================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--navy-deeper);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 4px;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.brand-text-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, .45);
    margin-top: 2px;
}

/* Sidebar section label */
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3);
    padding: 18px 20px 8px;
}

/* Sidebar nav */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    flex: 1;
}

.nav-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .75);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    gap: 8px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-item-link.active {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
}

.nav-item-link .nav-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item-link .nav-label {
    flex: 1;
}

.nav-chevron {
    font-size: 10px;
    color: rgba(255, 255, 255, .35);
    transition: transform .2s;
}

.nav-item-link[aria-expanded="true"] .nav-chevron {
    transform: rotate(90deg);
    color: rgba(255, 255, 255, .6);
}

/* Submenu */
.submenu {
    padding: 3px 0 3px 10px;
}

.submenu .nav-item-link {
    font-size: 13px;
    font-weight: 400;
    padding: 8px 12px 8px 16px;
    color: rgba(255, 255, 255, .6);
    border-left: 2px solid rgba(255, 255, 255, .08);
    border-radius: 0 8px 8px 0;
}

.submenu .nav-item-link:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .9);
    border-left-color: rgba(255, 255, 255, .3);
}

.submenu .nav-item-link.active {
    background: rgba(43, 120, 197, .25);
    color: #89cff0;
    border-left-color: var(--blue);
    font-weight: 600;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 12px 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
}

.sidebar-footer .nav-item-link {
    color: rgba(255, 255, 255, .5);
}

.sidebar-footer .nav-item-link:hover {
    background: rgba(255, 100, 100, .12);
    color: #f97474;
}

/* Main area */
.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Notification */
.notif-btn {
    position: relative;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .15s;
    text-decoration: none;
}

.notif-btn:hover {
    background: var(--light-blue);
}

.notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e24b4a;
    border: 2px solid var(--surface);
}

/* User pill */
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    transition: background .15s;
}

.user-pill:hover {
    background: var(--light-blue);
}

.user-thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.user-thumb-fallback {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
    text-transform: uppercase;
}

.user-info-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.user-info-role {
    font-size: 11px;
    color: var(--muted);
}

/* Content */
.content-wrapper {
    flex: 1;
    padding: 24px 28px;
}

/* Footer */
.app-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

/* HTMX indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Mobile sidebar toggle */
.mobile-topbar {
    display: none;
    background: var(--navy-deeper);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, .8);
    border-radius: 2px;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        z-index: 1000;
        transition: left .25s ease;
        width: 260px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .4);
        z-index: 999;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .mobile-topbar {
        display: flex;
    }

    .topbar {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px;
    }
}

/* ================================
   Enquiry List Page
================================ */

.enquiry-page {
    width: 100%;
}

.enquiry-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.enquiry-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow .2s, transform .2s;
}

.enquiry-stat-card:hover {
    box-shadow: 0 4px 20px rgba(0, 75, 141, .1);
    transform: translateY(-2px);
}

.enquiry-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}

.enquiry-stat-icon.blue {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.enquiry-stat-icon.green {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.enquiry-stat-icon.amber {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.enquiry-stat-icon.red {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.enquiry-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}

.enquiry-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.enquiry-stat-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.enquiry-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.enquiry-panel-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.enquiry-panel-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

.enquiry-panel-count {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.enquiry-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.enquiry-filter-left,
.enquiry-filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.enquiry-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.enquiry-no {
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;
}

.enquiry-no:hover {
    color: var(--blue);
    text-decoration: underline;
}

.enquiry-subject {
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    line-height: 1.35;
}

.enquiry-subject:hover {
    color: var(--blue);
    text-decoration: underline;
}

.enquiry-small {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.priority-low {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.priority-medium {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.priority-high {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.stage-new_inquiry,
.stage-technical_clearance,
.stage-technical_queries {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.stage-qualified_inquiry,
.stage-closed_won {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.stage-budget_bid,
.stage-actual_bid,
.stage-negotiation_review {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.stage-closed_lost,
.stage-closed_regret,
.stage-order_cancelled {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.btn-delete {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
    border-radius: 8px;
    padding: 5px 13px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.btn-delete:hover {
    background: #f5c4b3;
    color: var(--red);
}

.enquiry-empty-action {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

@media (max-width: 760px) {
    .enquiry-filter-bar {
        align-items: stretch;
    }

    .enquiry-filter-left,
    .enquiry-filter-right,
    .enquiry-search-form,
    .search-wrap,
    .search-wrap input {
        width: 100%;
    }

    .enquiry-filter-right .btn-search,
    .enquiry-filter-left .btn-add {
        width: 100%;
        justify-content: center;
    }

    .action-group {
        flex-direction: column;
        align-items: stretch;
    }

    .action-group a {
        text-align: center;
        justify-content: center;
    }
}

/* ================================
   Enquiry Add / Edit Form Page
   Uses existing o_* classes
================================ */

.o_rfq_page {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    min-height: calc(100vh - 160px);
    color: var(--text);
    overflow: hidden;
    padding: 10px;
}

/* Header / Breadcrumb */

.o_titlebar {
    min-height: 68px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: var(--surface);
}

.o_breadcrumb {
    font-size: 21px;
    font-weight: 700;
    color: var(--text);
}

.o_breadcrumb a {
    color: var(--navy);
    text-decoration: none !important;
}

.o_breadcrumb a:hover {
    color: var(--blue);
    text-decoration: underline !important;
}

.o_breadcrumb span {
    color: var(--muted);
}

.o_top_actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.o_top_actions span {
    cursor: pointer;
}

.o_top_actions span:hover {
    color: var(--navy);
}

.o_new_btn {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
}

.o_new_btn:hover {
    background: #085041;
    color: #fff;
    transform: translateY(-1px);
}

/* Action bar */

.o_actionbar {
    min-height: 58px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    background: #f8fbff;
}

.o_left_buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 24px;
    flex-shrink: 0;
}

.o_btn {
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, transform .15s;
}

.o_btn:hover {
    transform: translateY(-1px);
}

.o_btn_primary {
    background: var(--navy);
    color: #fff;
}

.o_btn_primary:hover {
    background: #003d75;
    color: #fff;
}

.o_btn_secondary {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
}

.o_btn_secondary:hover {
    background: var(--light-blue);
    color: var(--navy);
    border-color: #b5d4f4;
}

/* Stage bar */

.o_stagebar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 24px 10px 0;
}

.o_stage {
    position: relative;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.o_stage.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

/* Main sheet */

.o_sheet {
    padding: 30px 34px 0;
    background: var(--surface);
}

.o_doc_label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 6px;
}

.o_doc_title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.o_star {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    color: var(--navy);
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.o_doc_title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

/* Form layout */

.o_form_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px 46px;
    margin-bottom: 28px;
}

.o_field_row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 44px;
    margin-bottom: 8px;
}

.o_field_row.o_top {
    align-items: start;
}

.o_field_row label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.o_help {
    color: var(--blue);
    font-weight: 800;
    margin-left: 3px;
}

/* Inputs */

.o_input,
.o_rfq_page input[type="text"],
.o_rfq_page input[type="number"],
.o_rfq_page input[type="date"],
.o_rfq_page input[type="email"],
.o_rfq_page input[type="tel"],
.o_rfq_page select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    background: #f8fbff;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.o_rfq_page select,
select.o_input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #f8fbff;
}

.o_rfq_page textarea,
textarea.o_input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    min-height: 92px;
    padding: 10px 14px;
    resize: vertical;
    background: #f8fbff;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.o_input:focus,
.o_rfq_page input:focus,
.o_rfq_page select:focus,
.o_rfq_page textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.o_checkbox,
.o_rfq_page input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
    cursor: pointer;
}

.o_checkbox_wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--text);
}

/* Tabs */

.o_tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 26px;
}

.o_tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: transparent;
    color: var(--muted);
    padding: 12px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.o_tab:hover {
    color: var(--navy);
    background: #f8fbff;
}

.o_tab.active {
    background: var(--surface);
    border-color: var(--border);
    color: var(--navy);
}

.o_tab_panel {
    display: none;
}

.o_tab_panel.active {
    display: block;
}

/* Line item table */

.o_line_table {
    width: 100%;
    border-collapse: collapse;
}

.o_line_table th {
    background: #f0f5fb;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.o_line_table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    vertical-align: top;
    font-size: 13.5px;
    color: var(--text);
}

.o_line_table tbody tr:hover {
    background: #f6faff;
}

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

.o_line_table .action_col {
    width: 95px;
}

.o_remove_line {
    border: none;
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
    border-radius: 8px;
    padding: 6px 11px;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    transition: background .15s;
}

.o_remove_line:hover {
    background: #f5c4b3;
}

.o_add_line {
    border: none;
    background: transparent;
    color: var(--navy);
    padding: 14px 10px;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
}

.o_add_line:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* Bottom / total */

.o_bottom_area {
    min-height: 120px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
    padding: 26px 22px;
    background: #fbfdff;
}

.o_terms_placeholder {
    color: var(--muted);
    font-size: 13.5px;
}

.o_total_box {
    border-top: 2px solid var(--border);
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 15px;
    color: var(--muted);
}

.o_total_box strong {
    font-size: 20px;
    color: var(--text);
}

/* Other tab */

.o_other_panel {
    padding: 24px 0;
}

/* Errors */

.errorlist {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    color: #a32d2d;
    font-size: 12px;
}

.o_errors {
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 600;
}

.is-hidden {
    display: none !important;
}

/* Responsive enquiry form */

@media (max-width: 1100px) {
    .o_actionbar {
        flex-direction: column;
    }

    .o_stagebar {
        padding: 10px 24px;
    }

    .o_form_grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 720px) {
    .o_rfq_page {
        border-radius: 14px;
    }

    .o_titlebar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }

    .o_top_actions {
        flex-wrap: wrap;
    }

    .o_actionbar {
        gap: 0;
    }

    .o_left_buttons {
        padding: 12px 18px;
        flex-wrap: wrap;
    }

    .o_sheet {
        padding: 22px 18px 0;
    }

    .o_doc_title h1 {
        font-size: 25px;
    }

    .o_field_row {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 14px;
    }

    .o_tabs {
        overflow-x: auto;
    }

    .o_tab_panel.active {
        overflow-x: auto;
    }

    .o_line_table {
        min-width: 720px;
    }

    .o_bottom_area {
        grid-template-columns: 1fr;
        padding: 22px 14px;
    }
}
/* ================================
   Enquiry Detail Page
================================ */

.enquiry-detail-page {
    width: 100%;
    background: transparent;
    color: var(--text);
}

/* Header */

.enquiry-detail-page .enquiry-titlebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 24px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.enquiry-detail-page .enquiry-breadcrumb {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.enquiry-detail-page .enquiry-breadcrumb span {
    color: var(--muted);
}

.enquiry-detail-page .enquiry-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.enquiry-detail-page .enquiry-top-action {
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.enquiry-detail-page .enquiry-top-action:hover {
    color: var(--navy);
}

.enquiry-detail-page .enquiry-new-btn {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
}

.enquiry-detail-page .enquiry-new-btn:hover {
    background: #085041;
    color: #fff;
    transform: translateY(-1px);
}

/* Buttons */

.enquiry-detail-page .enquiry-btn {
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    transition: background .2s, color .2s, transform .15s;
}

.enquiry-detail-page .enquiry-btn:hover {
    transform: translateY(-1px);
}

.enquiry-detail-page .enquiry-btn-primary {
    background: var(--navy);
    color: #fff;
}

.enquiry-detail-page .enquiry-btn-primary:hover {
    background: #003d75;
    color: #fff;
}

.enquiry-detail-page .enquiry-btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
}

.enquiry-detail-page .enquiry-btn-secondary:hover {
    background: var(--light-blue);
    color: var(--navy);
    border-color: #b5d4f4;
}

.enquiry-detail-page .enquiry-btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.enquiry-detail-page .enquiry-btn-danger:hover {
    background: #f5c4b3;
    color: var(--red);
}

.enquiry-detail-page .enquiry-btn-light {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

/* Stage tracker */

.enquiry-detail-page .enquiry-actionbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 18px;
    overflow: hidden;
}

.enquiry-detail-page #stage-tracker-wrapper {
    width: 100%;
    min-width: 0;
}

.enquiry-detail-page .stage-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 18px 24px 12px;
    background: #f8fbff;
}

.enquiry-detail-page .stage-line {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
}

.enquiry-detail-page .stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 118px;
    position: relative;
}

.enquiry-detail-page .stage-label {
    min-height: 34px;
    max-width: 110px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 9px;
}

.enquiry-detail-page .stage-dot-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.enquiry-detail-page .stage-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #b5d4f4;
    background: var(--surface);
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
    position: relative;
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
}

.enquiry-detail-page .stage-dot span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    display: block;
}

.enquiry-detail-page .stage-dot:hover {
    border-color: var(--blue);
    transform: scale(1.08);
}

.enquiry-detail-page .stage-dot.active {
    border-color: var(--navy);
    background: var(--navy);
    box-shadow: 0 0 0 4px rgba(43, 120, 197, .13);
}

.enquiry-detail-page .stage-dot.active span {
    background: #fff;
}

.enquiry-detail-page .stage-item.active .stage-label {
    color: var(--navy);
}

.enquiry-detail-page .stage-connector {
    height: 2px;
    flex: 1;
    min-width: 88px;
    border-top: 2px dotted #b5d4f4;
    margin: 0 8px;
}

.enquiry-detail-page .stage-item.active .stage-dot + .stage-connector {
    border-top-color: var(--navy);
}

.enquiry-detail-page .stage-info {
    padding: 10px 24px 14px;
    font-size: 13px;
    color: var(--muted);
    background: #f8fbff;
    border-top: 1px solid var(--border);
}

.enquiry-detail-page .stage-info strong {
    color: var(--text);
}

/* Main sheet */

.enquiry-detail-page .enquiry-sheet {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 32px 0;
    overflow: hidden;
}

.enquiry-detail-page .enquiry-doc-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 8px;
}

.enquiry-detail-page .enquiry-doc-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.enquiry-detail-page .enquiry-star {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    color: var(--navy);
    font-size: 31px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enquiry-detail-page .enquiry-doc-title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

/* Detail grids */

.enquiry-detail-page .enquiry-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
    gap: 34px;
    margin-bottom: 28px;
}

.enquiry-detail-page .enquiry-detail-grid {
    display: grid;
    gap: 10px;
}

.enquiry-detail-page .enquiry-field-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    min-height: 38px;
}

.enquiry-detail-page .enquiry-field-row label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding-top: 7px;
}

.enquiry-detail-page .enquiry-field-value {
    min-height: 34px;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--text);
    word-break: break-word;
}

.enquiry-detail-page .enquiry-field-value.empty {
    color: var(--muted);
}

/* Pills */

.enquiry-detail-page .enquiry-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
}

/* Keep stage / priority colors aligned with current design */

.priority-low {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.priority-medium {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.priority-high {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.stage-new_inquiry,
.stage-technical_clearance,
.stage-technical_queries {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
}

.stage-qualified_inquiry,
.stage-closed_won {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.stage-budget_bid,
.stage-actual_bid,
.stage-negotiation_review {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.stage-closed_lost,
.stage-closed_regret,
.stage-order_cancelled {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* Tabs */

.enquiry-detail-page .enquiry-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 26px;
}

.enquiry-detail-page .enquiry-tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: transparent;
    color: var(--muted);
    padding: 12px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.enquiry-detail-page .enquiry-tab:hover {
    color: var(--navy);
    background: #f8fbff;
}

.enquiry-detail-page .enquiry-tab.active {
    background: var(--surface);
    border-color: var(--border);
    color: var(--navy);
}

.enquiry-detail-page .enquiry-tab-panel {
    display: none;
}

.enquiry-detail-page .enquiry-tab-panel.active {
    display: block;
}

.enquiry-detail-page .enquiry-tab-content {
    padding: 24px 0 0;
}

/* Tables */

.enquiry-detail-page .enquiry-line-table,
.enquiry-detail-page .enquiry-file-table {
    width: 100%;
    border-collapse: collapse;
}

.enquiry-detail-page .enquiry-line-table th,
.enquiry-detail-page .enquiry-file-table th {
    background: #f0f5fb;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.enquiry-detail-page .enquiry-line-table td,
.enquiry-detail-page .enquiry-file-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    vertical-align: top;
    font-size: 13.5px;
    color: var(--text);
}

.enquiry-detail-page .enquiry-line-table tbody tr:hover,
.enquiry-detail-page .enquiry-file-table tbody tr:hover {
    background: #f6faff;
}

.enquiry-detail-page .num {
    text-align: right;
}

.enquiry-detail-page .enquiry-muted {
    color: var(--muted);
}

/* Bottom / total */

.enquiry-detail-page .enquiry-bottom-area {
    min-height: 110px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
    padding: 26px 22px;
    background: #fbfdff;
}

.enquiry-detail-page .enquiry-terms-placeholder {
    color: var(--muted);
    font-size: 13.5px;
}

.enquiry-detail-page .enquiry-total-box {
    border-top: 2px solid var(--border);
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 15px;
    color: var(--muted);
}

.enquiry-detail-page .enquiry-total-box strong {
    font-size: 20px;
    color: var(--text);
}

/* Files section */

.enquiry-detail-page .enquiry-section-titlebar {
    min-height: 54px;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}

.enquiry-detail-page .enquiry-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* Modal */

.enquiry-detail-page .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 37, 77, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.enquiry-detail-page .modal-backdrop.show {
    display: flex;
    opacity: 1 !important;
}

.enquiry-detail-page .modal-box {
    width: 100%;
    max-width: 620px;
    background: var(--surface);
    border-radius: 18px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 18px 60px rgba(0, 46, 86, .22);
}

.enquiry-detail-page .is-hidden {
    display: none !important;
}

/* Responsive detail page */

@media (max-width: 1200px) {
    .enquiry-detail-page .enquiry-actionbar {
        flex-direction: column;
    }

    .enquiry-detail-page .stage-wrapper {
        border-top: 1px solid var(--border);
    }

    .enquiry-detail-page .enquiry-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .enquiry-detail-page .stage-wrapper {
        padding: 14px 12px 10px;
    }

    .enquiry-detail-page .stage-item {
        min-width: 96px;
    }

    .enquiry-detail-page .stage-label {
        max-width: 90px;
        font-size: 10px;
        min-height: 32px;
    }

    .enquiry-detail-page .stage-connector {
        min-width: 58px;
    }
}

@media (max-width: 720px) {
    .enquiry-detail-page .enquiry-titlebar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }

    .enquiry-detail-page .enquiry-top-actions {
        flex-wrap: wrap;
    }

    .enquiry-detail-page .enquiry-sheet {
        padding: 22px 18px 0;
    }

    .enquiry-detail-page .enquiry-doc-title h1 {
        font-size: 25px;
    }

    .enquiry-detail-page .enquiry-field-row {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 12px;
    }

    .enquiry-detail-page .enquiry-field-row label {
        padding-top: 0;
    }

    .enquiry-detail-page .enquiry-tabs {
        overflow-x: auto;
    }

    .enquiry-detail-page .enquiry-tab-panel.active {
        overflow-x: auto;
    }

    .enquiry-detail-page .enquiry-line-table,
    .enquiry-detail-page .enquiry-file-table {
        min-width: 760px;
    }

    .enquiry-detail-page .enquiry-bottom-area {
        grid-template-columns: 1fr;
        padding: 22px 14px;
    }
}
/* ================================
   Enquiry Custom Modal
   Do not use Bootstrap .modal-backdrop here
================================ */

.enquiry-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 37, 77, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.enquiry-modal-backdrop.show {
    display: flex;
}

.enquiry-modal-box {
    width: 100%;
    max-width: 620px;
    background: var(--surface);
    border-radius: 18px;
    padding: 28px 32px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 18px 60px rgba(0, 46, 86, 0.22);
}

/* Style the file upload form inside the modal */
.enquiry-modal-box h1,
.enquiry-modal-box h2,
.enquiry-modal-box h3 {
    margin: 0 0 22px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.enquiry-modal-box label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 7px;
}

.enquiry-modal-box input[type="text"],
.enquiry-modal-box input[type="file"],
.enquiry-modal-box select,
.enquiry-modal-box textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    margin-bottom: 16px;
}

.enquiry-modal-box textarea {
    min-height: 100px;
    resize: vertical;
}

.enquiry-modal-box input:focus,
.enquiry-modal-box select:focus,
.enquiry-modal-box textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, 0.1);
}

.enquiry-modal-box button[type="submit"],
.enquiry-modal-box .btn-primary {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.enquiry-modal-box button[type="button"],
.enquiry-modal-box .btn-secondary,
.enquiry-modal-box .btn-cancel {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
}

@media (max-width: 720px) {
    .enquiry-modal-backdrop {
        padding: 14px;
    }

    .enquiry-modal-box {
        padding: 22px 18px;
    }
}

/* ================================
   Quotation Form Page - Final
================================ */

.quotation-form-page {
    width: 100%;
}

.quotation-heading {
    margin-bottom: 20px;
}

.quotation-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quotation-card {
    margin-bottom: 18px;
}

.quotation-card-header-split {
    justify-content: space-between;
}

.quotation-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
}

.quotation-card-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    font-weight: 500;
}

/* Inputs inside quotation form */
.quotation-form-page input[type="text"],
.quotation-form-page input[type="number"],
.quotation-form-page input[type="date"],
.quotation-form-page select,
.quotation-form-page textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.quotation-form-page select {
    background-color: #f8fbff;
    padding-right: 36px;
}

.quotation-form-page input:focus,
.quotation-form-page select:focus,
.quotation-form-page textarea:focus {
    border-color: var(--blue);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .1);
}

.quotation-form-page textarea {
    min-height: 76px;
    resize: vertical;
    line-height: 1.45;
}

.quotation-form-page .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: #a32d2d;
    font-size: 12px;
}

/* Table wrapper */
.quotation-table-body {
    padding: 0;
}

.quotation-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.quotation-edit-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    background: var(--surface);
}

.quotation-edit-table th {
    background: #f0f5fb;
    border-bottom: 1px solid var(--border);
    padding: 13px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.quotation-edit-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    vertical-align: top;
}

.quotation-edit-table tbody tr:hover {
    background: #f8fbff;
}

.quotation-edit-table tbody tr:last-child td {
    border-bottom: 0;
}

.quotation-edit-table textarea {
    min-height: 58px;
}

.quotation-edit-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--red);
    cursor: pointer;
}

.quotation-delete-cell {
    text-align: center;
    vertical-align: middle !important;
}

/* Terms table */
.quotation-terms-table {
    min-width: 920px;
}

.quotation-terms-table textarea {
    min-height: 70px;
}

/* Footer */
.quotation-footer {
    margin-top: 6px;
}

@media (max-width: 760px) {
    .quotation-header-actions {
        width: 100%;
    }

    .quotation-header-actions .btn-save,
    .quotation-header-actions .btn-cancel {
        flex: 1;
        justify-content: center;
    }

    .quotation-card-title-wrap {
        align-items: flex-start;
    }

    .quotation-edit-table {
        min-width: 980px;
    }
}

/* ================================
   Quotation Detail / Preview - Final
================================ */

.quotation-detail-page {
    width: 100%;
}

.quotation-detail-heading {
    margin-bottom: 20px;
}

.quotation-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Override flex behavior from .btn-save only inside detail actions */
.quotation-detail-actions .btn-save {
    flex: unset;
}

.quotation-action-btn {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
}

.quotation-preview-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    overflow-x: auto;
}

/* Print-like quotation body */

.quotation-print {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.25;
}

.quotation-print table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.qtn-header-table td,
.qtn-meta-table th,
.qtn-meta-table td,
.qtn-main-table th,
.qtn-main-table td,
.qtn-terms-table th,
.qtn-terms-table td {
    border: 1px solid #000000;
    padding: 4px 5px;
    vertical-align: top;
}

.qtn-company-name {
    background: #b7cce3;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .4px;
    line-height: 1.1;
}

.qtn-company-line {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.qtn-title-cell {
    background: #b7cce3;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    padding: 5px;
}

.qtn-meta-table th {
    width: 11%;
    font-weight: 900;
    text-align: left;
    background: #ffffff;
}

.qtn-meta-table td {
    width: 39%;
    font-weight: 600;
}

.qtn-main-table th {
    background: #d9d9d9;
    text-align: center;
    font-weight: 900;
}

.qtn-main-table td {
    min-height: 24px;
}

.qtn-col-sn {
    width: 8%;
}

.qtn-col-description {
    width: 47%;
}

.qtn-col-qty {
    width: 8%;
}

.qtn-col-unit {
    width: 12%;
}

.qtn-col-price {
    width: 12%;
}

.qtn-col-total {
    width: 13%;
}

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

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

.qtn-description {
    text-align: left;
    font-weight: 500;
}

.qtn-total-row td {
    font-weight: 900;
    font-size: 14px;
}

.qtn-total-label {
    text-align: center;
    padding: 8px 5px !important;
}

.qtn-total-value {
    font-weight: 900;
}

.qtn-terms-table th {
    width: 28%;
    text-align: left;
    font-weight: 900;
}

.qtn-terms-table td {
    width: 72%;
}

/* Keep quotation print clean when browser printing */

@media print {
    .sidebar,
    .topbar,
    .mobile-topbar,
    .app-footer,
    .quotation-detail-heading {
        display: none !important;
    }

    .content-wrapper {
        padding: 0 !important;
        background: #ffffff !important;
    }

    .quotation-preview-card {
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .quotation-print {
        max-width: 100%;
        font-size: 10px;
    }
}

@media (max-width: 760px) {
    .quotation-detail-actions {
        width: 100%;
        align-items: stretch;
    }

    .quotation-detail-actions .quotation-action-btn {
        flex: 1;
        justify-content: center;
    }

    .quotation-preview-card {
        padding: 14px;
    }

    .quotation-print {
        min-width: 820px;
    }
}

/* ================================
   Home / Landing Page
================================ */

.home-hero {
    min-height: calc(100vh - 82px);
    position: relative;
    display: flex;
    align-items: center;
    padding: 56px 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(43, 120, 197, 0.55), transparent 34%),
        linear-gradient(135deg, rgba(0, 37, 77, 0.92), rgba(0, 75, 141, 0.82)),
        url("../images/ship.jpg") center/cover no-repeat;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: .55;
    pointer-events: none;
}

.home-wrap {
    position: relative;
    z-index: 1;
}

.home-shell {
    max-width: 1180px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.home-main {
    padding: 42px;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(230, 242, 255, .14);
    border: 1px solid rgba(230, 242, 255, .22);
    color: #d9ecff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.home-title {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 5vw, 2.5rem);
}

.home-subtitle {
    max-width: 820px;
    color: #d9ecff;
    font-size: 1.15rem;
    line-height: 1.75;
    margin: 0 auto 26px;
}

.home-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.home-btn-primary {
    background: #fff;
    color: var(--navy-deeper);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 13px;
    padding: 13px 24px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.home-btn-primary:hover {
    color: var(--navy-deeper);
    background: #eef7ff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.home-btn-secondary {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 13px;
    padding: 13px 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .18s, transform .18s;
}

.home-btn-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    transform: translateY(-2px);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.home-stat {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    padding: 16px;
    text-align: left;
}

.home-stat-value {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.home-stat-label {
    color: rgba(217, 236, 255, .86);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
}

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

.feature-card {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    padding: 18px;
    text-align: left;
    min-height: 168px;
    transition: transform .18s, background .18s, border-color .18s;
}

.feature-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .17);
    border-color: rgba(255, 255, 255, .28);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(230, 242, 255, .16);
    border: 1px solid rgba(230, 242, 255, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 13px;
}

.feature-card h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.feature-card p {
    color: #e8f3ff;
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}

.home-footer-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 42px;
    background: rgba(0, 37, 77, .42);
    border-top: 1px solid rgba(255,255,255,.13);
    color: rgba(217, 236, 255, .9);
    font-size: 13px;
    font-weight: 600;
}

.home-footer-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

@media (max-width: 992px) {
    .home-main {
        padding: 30px;
    }

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

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

    .home-footer-strip {
        padding: 18px 30px;
    }
}

@media (max-width: 576px) {
    .home-hero {
        padding: 28px 0;
    }

    .home-main {
        padding: 22px;
    }

    .home-stats,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: auto;
    }

    .home-footer-strip {
        padding: 16px 22px;
    }
}

/* ================================
   Login Page
================================ */

.login-section {
    min-height: calc(100vh - 82px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(43, 120, 197, .28), transparent 34%),
        linear-gradient(135deg, rgba(240, 245, 251, .96), rgba(230, 242, 255, .92)),
        url("../images/ship.jpg") center/cover no-repeat;
}

.login-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0,75,141,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,75,141,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: stretch;
}

.login-info {
    background: linear-gradient(135deg, rgba(0, 37, 77, .94), rgba(0, 75, 141, .86));
    border-radius: 28px;
    padding: 42px;
    color: #fff;
    box-shadow: 0 24px 70px rgba(0, 46, 86, .22);
    overflow: hidden;
    position: relative;
}

.login-info::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    bottom: -90px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(230, 242, 255, .13);
    border: 1px solid rgba(230, 242, 255, .22);
    color: #d9ecff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.login-info h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    font-weight: 800;
    margin-bottom: 18px;
}

.login-info p {
    color: #d9ecff;
    font-size: 1.03rem;
    line-height: 1.75;
    max-width: 620px;
    margin-bottom: 28px;
}

.login-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    position: relative;
    z-index: 1;
}

.login-point {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #eef7ff;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 46, 86, .14);
}

.login-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 14px;
}

.login-title {
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--muted);
    font-size: 13.5px;
    margin: 0;
}

.login-alert {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
    border-radius: 12px;
    padding: 11px 14px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

.login-field input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 13px 14px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #f8fbff;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.login-field input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43,120,197,.12);
}

.btn-login {
    width: 100%;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 22px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .15s;
    margin-top: 8px;
}

.btn-login:hover {
    background: #003d75;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 75, 141, .18);
}

.login-card-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .login-info {
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .login-section {
        padding: 26px 14px;
    }

    .login-info,
    .login-card {
        border-radius: 22px;
        padding: 24px;
    }

    .login-points {
        grid-template-columns: 1fr;
    }
}




    /* ── Page heading ── */
    .add-heading {
        display: flex; align-items: center; justify-content: space-between;
        flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
    }

    .add-heading-left { display: flex; align-items: center; gap: 14px; }

    .add-icon {
        width: 52px; height: 52px; border-radius: 16px;
        background: var(--green-bg); border: 1px solid var(--green-border);
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; flex-shrink: 0;
    }

    .add-title { font-size: 20px; font-weight: 700; color: var(--text); }
    .add-sub   { font-size: 13px; color: var(--muted); margin-top: 3px; }

    /* ── Card ── */
    .add-card {
        background: var(--surface); border: 1px solid var(--border);
        border-radius: 20px; overflow: hidden; margin-bottom: 16px;
    }

    .add-card-header {
        display: flex; align-items: center; gap: 9px;
        padding: 16px 24px; border-bottom: 1px solid var(--border);
        background: #f8fbff;
    }

    .add-card-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex-shrink: 0; }
    .add-card-title { font-size: 13.5px; font-weight: 700; color: var(--text); }

    .add-card-body  { padding: 24px; }

    /* ── Field layouts ── */
    .field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .field-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

    .field-group { display: flex; flex-direction: column; }

    .field-label {
        display: block; font-size: 11px; font-weight: 700; color: var(--muted);
        text-transform: uppercase; letter-spacing: .07em; margin-bottom: 7px;
    }

    /* Django renders form widgets — style all inputs/selects globally inside add-card */
    .add-card input[type="text"],
    .add-card input[type="email"],
    .add-card input[type="tel"],
    .add-card input[type="date"],
    .add-card input[type="number"],
    .add-card input[type="password"],
    .add-card select,
    .add-card textarea {
        width: 100%;
        border: 1.5px solid var(--border); border-radius: 10px;
        padding: 10px 14px; font-family: 'Sora', sans-serif;
        font-size: 14px; color: var(--text); background: #f8fbff;
        outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
        appearance: none; -webkit-appearance: none;
    }

    .add-card select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: right 14px center;
        background-color: #f8fbff; padding-right: 36px;
    }

    .add-card input:focus,
    .add-card select:focus,
    .add-card textarea:focus {
        border-color: var(--blue); background: var(--surface);
        box-shadow: 0 0 0 3px rgba(43,120,197,.1);
    }

    .add-card input[type="checkbox"] {
        width: 18px; height: 18px; cursor: pointer;
        accent-color: var(--navy); margin-top: 2px;
    }

    .add-card textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

    /* ── Toggle row for checkbox fields ── */
    .toggle-row {
        display: flex; align-items: center; justify-content: space-between;
        background: var(--page-bg); border: 1px solid var(--border);
        border-radius: 12px; padding: 14px 18px;
    }
    .toggle-row-label { font-size: 14px; font-weight: 600; color: var(--text); }
    .toggle-row-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

    /* ── Progress steps ── */
    .steps-bar {
        display: flex; align-items: center; gap: 0;
        margin-bottom: 24px;
    }

    .step {
        display: flex; align-items: center; gap: 8px;
        font-size: 12px; font-weight: 600; color: var(--muted);
    }

    .step-num {
        width: 26px; height: 26px; border-radius: 50%;
        background: var(--page-bg); border: 1.5px solid var(--border);
        display: flex; align-items: center; justify-content: center;
        font-size: 11px; font-weight: 700; color: var(--muted);
        flex-shrink: 0;
    }

    .step.active .step-num { background: var(--navy); border-color: var(--navy); color: #fff; }
    .step.active { color: var(--text); }

    .step-line { flex: 1; height: 1px; background: var(--border); margin: 0 10px; min-width: 24px; }

    /* ── Footer ── */
    .add-footer {
        background: var(--surface); border: 1px solid var(--border);
        border-radius: 16px; padding: 18px 24px;
        display: flex; align-items: center; gap: 12px;
    }

    .btn-save {
        flex: 1; background: var(--navy); color: #fff;
        border: none; border-radius: 10px; padding: 12px 24px;
        font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700;
        cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
        transition: background .2s, transform .15s;
    }
    .btn-save:hover { background: #003d75; transform: translateY(-1px); }

    .btn-cancel {
        background: transparent; color: var(--muted);
        border: 1.5px solid var(--border); border-radius: 10px;
        padding: 11px 22px; font-family: 'Sora', sans-serif;
        font-size: 14px; font-weight: 600; text-decoration: none;
        display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
        transition: border-color .2s, color .2s, background .2s;
    }
    .btn-cancel:hover { border-color: var(--blue); color: var(--navy); background: var(--light-blue); }

    /* ── Error display ── */
    .add-card .errorlist {
        list-style: none; margin: 6px 0 0; padding: 0;
        font-size: 12px; color: #a32d2d;
    }

    @media (max-width: 600px) {
        .field-grid-2, .field-grid-3 { grid-template-columns: 1fr; }
        .add-card-body { padding: 16px; }
        .add-heading { flex-direction: column; align-items: flex-start; }
        .steps-bar { display: none; }
    }


/* ================================
   Public Base Layout
================================ */

.site-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 40px;
    background: rgba(0, 75, 141, 0.95);
    border-bottom: 3px solid #89cff0;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-brand img {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.site-brand-text h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.site-brand-text p {
    color: #d9ecff;
    font-size: 13px;
    margin: 2px 0 0;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.site-nav-links a {
    text-decoration: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--blue);
    font-size: 14px;
    font-weight: 700;
    transition: background .2s, color .2s, transform .15s;
}

.site-nav-links a:hover {
    background: #89cff0;
    color: var(--text);
    transform: translateY(-1px);
}

.site-language-form {
    margin: 0;
}

.site-language-select {
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.site-language-select option {
    color: var(--text);
    background: #fff;
}

.page-content {
    min-height: calc(100vh - 82px);
}

/* RTL support */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .site-brand,
html[dir="rtl"] .site-nav-links {
    direction: rtl;
}

@media (max-width: 768px) {
    .site-navbar {
        flex-direction: column;
        gap: 16px;
        padding: 18px 20px;
        text-align: center;
    }

    .site-brand {
        justify-content: center;
    }

    .site-nav-links {
        justify-content: center;
    }
}


    :root {
        --navy: #004b8d;
        --blue: #2b78c5;
        --light-blue: #e6f2ff;
        --border: #dbe7f3;
        --muted: #5a7a9a;
        --surface: #ffffff;
        --page-bg: #f0f5fb;
        --text: #002e56;
        --green: #0f6e56;
        --green-bg: #e1f5ee;
        --green-border: #9fe1cb;
        --red: #993c1d;
        --red-bg: #faece7;
        --amber: #854f0b;
        --amber-bg: #faeeda;
        --amber-border: #fac775;
    }

    body { font-family: 'Sora', sans-serif; background: var(--page-bg); }

    /* ── Welcome banner ── */
    .welcome-banner {
        background: linear-gradient(120deg, var(--navy) 0%, #1a5fa8 60%, var(--blue) 100%);
        border-radius: 20px;
        padding: 32px 36px;
        display: flex; align-items: center; justify-content: space-between;
        flex-wrap: wrap; gap: 20px;
        margin-bottom: 24px;
        position: relative; overflow: hidden;
    }

    /* decorative circles */
    .welcome-banner::before,
    .welcome-banner::after {
        content: ''; position: absolute; border-radius: 50%;
        background: rgba(255,255,255,.06); pointer-events: none;
    }
    .welcome-banner::before { width: 240px; height: 240px; top: -80px; right: 60px; }
    .welcome-banner::after  { width: 140px; height: 140px; bottom: -50px; right: 20px; }

    .welcome-text { position: relative; z-index: 1; }
    .welcome-greeting {
        font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px;
    }
    .welcome-sub {
        font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.65; max-width: 480px;
    }

    .welcome-ship {
        font-size: 72px; position: relative; z-index: 1;
        filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
    }

    /* ── Stat grid ── */
    .stat-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }

    .stat-card {
        background: var(--surface); border-radius: 16px;
        border: 1px solid var(--border); padding: 20px 22px;
        display: flex; align-items: center; gap: 16px;
        transition: box-shadow .2s, transform .2s; text-decoration: none;
    }
    .stat-card:hover { box-shadow: 0 4px 20px rgba(0,75,141,.1); transform: translateY(-2px); }

    .stat-icon {
        width: 50px; height: 50px; border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; flex-shrink: 0;
    }
    .stat-icon.blue   { background: var(--light-blue); }
    .stat-icon.green  { background: var(--green-bg); }
    .stat-icon.amber  { background: var(--amber-bg); }
    .stat-icon.red    { background: var(--red-bg); }
    .stat-icon.purple { background: #f0eaff; }

    .stat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
    .stat-value { font-size: 26px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; }
    .stat-delta { font-size: 11px; color: var(--green); margin-top: 3px; font-weight: 600; }

    /* ── Two-column layout ── */
    .dash-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    /* ── Panel ── */
    .panel {
        background: var(--surface); border: 1px solid var(--border);
        border-radius: 18px; overflow: hidden;
    }

    .panel-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 22px; border-bottom: 1px solid var(--border);
    }

    .panel-title {
        font-size: 14.5px; font-weight: 700; color: var(--text);
        display: flex; align-items: center; gap: 8px;
    }
    .panel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }

    .panel-link {
        font-size: 12px; font-weight: 600; color: var(--blue);
        text-decoration: none;
    }
    .panel-link:hover { text-decoration: underline; }

    .panel-body { padding: 20px 22px; }

    /* ── Quick action cards ── */
    .quick-grid {
        display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    }

    .quick-card {
        background: var(--page-bg); border: 1px solid var(--border);
        border-radius: 13px; padding: 16px;
        text-decoration: none; display: flex; flex-direction: column; gap: 8px;
        transition: background .15s, border-color .15s, transform .15s;
    }
    .quick-card:hover { background: var(--light-blue); border-color: #b5d4f4; transform: translateY(-2px); }

    .quick-card-icon {
        width: 38px; height: 38px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        font-size: 18px;
    }
    .quick-card-icon.blue   { background: var(--light-blue); }
    .quick-card-icon.green  { background: var(--green-bg); }
    .quick-card-icon.amber  { background: var(--amber-bg); }
    .quick-card-icon.red    { background: var(--red-bg); }

    .quick-card-label { font-size: 13px; font-weight: 600; color: var(--text); }
    .quick-card-sub   { font-size: 11.5px; color: var(--muted); }

    /* ── Activity feed ── */
    .activity-list { display: flex; flex-direction: column; gap: 0; }

    .activity-item {
        display: flex; align-items: flex-start; gap: 13px;
        padding: 13px 0; border-bottom: 1px solid var(--border);
    }
    .activity-item:last-child { border-bottom: none; padding-bottom: 0; }

    .activity-dot-wrap {
        display: flex; flex-direction: column; align-items: center;
        padding-top: 3px;
    }
    .activity-dot {
        width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    }
    .activity-dot.blue  { background: var(--blue); }
    .activity-dot.green { background: var(--green); }
    .activity-dot.amber { background: #d98f0a; }
    .activity-dot.red   { background: #c04040; }

    .activity-body { flex: 1; min-width: 0; }
    .activity-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
    .activity-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .activity-time  { font-size: 11px; color: var(--muted); margin-top: 5px; }

    /* ── System info row ── */
    .info-row {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 14px;
    }

    .info-tile {
        background: var(--page-bg); border: 1px solid var(--border);
        border-radius: 12px; padding: 14px 16px;
    }
    .info-tile-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
    .info-tile-value { font-size: 14px; font-weight: 600; color: var(--text); }

    @media (max-width: 768px) {
        .dash-cols   { grid-template-columns: 1fr; }
        .quick-grid  { grid-template-columns: 1fr 1fr; }
        .welcome-ship { display: none; }
    }

/* Dashboard language switcher - polished */
.dash-language-form {
    margin: 0;
    position: relative;
}

.dash-language-select {
    min-width: 118px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 34px 0 14px;
    background:
        linear-gradient(180deg, #ffffff, #f3f8ff);
    color: var(--text);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 4px 14px rgba(0, 75, 141, .08);
    transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
}

.dash-language-form::before {
    content: "🌐";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.dash-language-select {
    padding-left: 34px;
}

.dash-language-form::after {
    content: "⌄";
    position: absolute;
    right: 13px;
    top: 48%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 800;
    color: var(--muted);
    pointer-events: none;
}

.dash-language-select:hover {
    border-color: #b5d4f4;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 75, 141, .12);
    transform: translateY(-1px);
}

.dash-language-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(43, 120, 197, .14);
}

.dash-language-select option {
    color: var(--text);
    background: #ffffff;
    font-weight: 600;
}

/* RTL support for language selector */
html[dir="rtl"] .dash-language-select {
    padding-right: 34px;
    padding-left: 34px;
}

html[dir="rtl"] .dash-language-form::before {
    right: 12px;
    left: auto;
}

html[dir="rtl"] .dash-language-form::after {
    left: 13px;
    right: auto;
}

.user-profile-links {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 10.5px;
    line-height: 1.2;

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-3px);
    transition: max-height .2s ease, opacity .2s ease, transform .2s ease;
}

.user-pill:hover .user-profile-links {
    max-height: 18px;
    opacity: 1;
    transform: translateY(0);
}

.user-profile-links a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.user-profile-links a:hover {
    color: var(--navy);
    text-decoration: underline;
}

.user-profile-links span {
    color: var(--muted);
}

.help-wrapper {
    max-width: 1120px;
    margin: 0 auto;
}

.help-hero {
    background: linear-gradient(135deg, #ffffff, #e6f2ff);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
}

.help-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.help-hero h1 {
    color: var(--text);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.03em;
}

.help-hero p {
    color: var(--muted);
    max-width: 720px;
    margin: 0;
    line-height: 1.75;
    font-size: 14px;
}

.help-hero-icon {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    flex-shrink: 0;
    box-shadow: 0 18px 35px rgba(0, 75, 141, .2);
}

.help-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.help-nav-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform .15s, box-shadow .2s, border-color .2s;
}

.help-nav-card span {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--light-blue);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-nav-card:hover {
    color: var(--navy);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 75, 141, .1);
}

.help-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    margin-bottom: 18px;
}

.help-section-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.help-step-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.help-section-header h2 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
}

.help-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.help-steps {
    display: grid;
    gap: 14px;
}

.help-step {
    display: flex;
    gap: 14px;
    padding: 15px;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.help-step-num {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.help-step h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.help-step p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.help-note {
    background: var(--light-blue);
    color: var(--navy);
    border: 1px solid #b5d4f4;
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 13px;
    line-height: 1.6;
}

.help-note.warning {
    background: #fff7e6;
    color: #8a5a00;
    border-color: #ffd591;
}

.help-note.success {
    background: #e1f5ee;
    color: #0f6e56;
    border-color: #b9e8d5;
}

html[dir="rtl"] .help-section-header,
html[dir="rtl"] .help-step,
html[dir="rtl"] .help-nav-card {
    text-align: right;
}

@media (max-width: 992px) {
    .help-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .help-hero {
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .help-hero {
        flex-direction: column;
        padding: 22px;
    }

    .help-nav-grid {
        grid-template-columns: 1fr;
    }

    .help-card {
        padding: 20px;
    }
}

.help-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.help-module-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 52px 20px 20px;
    text-decoration: none;
    color: var(--text);
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.help-module-card:hover {
    color: var(--text);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 75, 141, .12);
}

.help-module-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--light-blue);
    border: 1px solid #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.help-module-card h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.help-module-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.help-module-arrow {
    position: absolute;
    right: 20px;
    top: 22px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f8fbff;
    border: 1px solid var(--border);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

html[dir="rtl"] .help-module-card {
    padding: 20px 20px 20px 52px;
}

html[dir="rtl"] .help-module-arrow {
    right: auto;
    left: 20px;
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .help-module-grid {
        grid-template-columns: 1fr;
    }
}


    .adjustment-page {
        max-width: 980px;
        margin: 0 auto;
    }

    .adjustment-summary {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 18px;
    }

    .adjustment-summary-card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 16px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    }

    .adjustment-summary-label {
        font-size: 11px;
        color: var(--muted);
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        margin-bottom: 6px;
    }

    .adjustment-summary-value {
        font-size: 15px;
        font-weight: 900;
        color: var(--navy);
        word-break: break-word;
    }

    .adjustment-form-card {
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 22px;
        overflow: hidden;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    }

    .adjustment-form-head {
        padding: 18px 22px;
        border-bottom: 1px solid var(--border);
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    .adjustment-form-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 18px;
        font-weight: 900;
        color: var(--navy);
    }

    .adjustment-form-subtitle {
        font-size: 12px;
        color: var(--muted);
        font-weight: 700;
        margin-top: 4px;
    }

    .adjustment-form-body {
        padding: 22px;
    }

    .adjustment-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .adjustment-field {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .adjustment-field.full {
        grid-column: 1 / -1;
    }

    .adjustment-field label {
        font-size: 12px;
        font-weight: 900;
        color: var(--navy);
        text-transform: uppercase;
        letter-spacing: .04em;
        margin: 0;
    }

    .adjustment-field select,
    .adjustment-field input,
    .adjustment-field textarea {
        border-radius: 12px !important;
        border: 1px solid var(--border) !important;
        min-height: 44px;
        font-size: 14px;
        font-weight: 700;
    }

    .adjustment-field textarea {
        min-height: 110px;
        resize: vertical;
    }

    .adjustment-field .errorlist {
        margin: 0;
        padding-left: 18px;
        color: #a8071a;
        font-size: 12px;
        font-weight: 700;
    }

    .adjustment-actions {
        margin-top: 22px;
        padding-top: 18px;
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        flex-wrap: wrap;
    }

    .adjustment-help {
        margin-bottom: 18px;
        background: #fff7e6;
        border: 1px solid #ffd591;
        color: #8a5a00;
        border-radius: 14px;
        padding: 12px 14px;
        font-size: 13px;
        font-weight: 700;
        display: flex;
        gap: 8px;
        align-items: flex-start;
    }

    @media (max-width: 900px) {
        .adjustment-summary {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .adjustment-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 520px) {
        .adjustment-summary {
            grid-template-columns: 1fr;
        }

        .adjustment-form-head {
            align-items: flex-start;
        }

        .adjustment-actions {
            justify-content: stretch;
        }

        .adjustment-actions .btn-navy,
        .adjustment-actions .btn-outline {
            width: 100%;
            text-align: center;
        }
    }

/* Comfortable global text scale */
.sidebar .nav-item-link,
.topbar,
.panel,
.add-card,
.custom-alert,
.emp-table td,
.payroll-table td,
.activity-title,
.activity-desc {
    font-size: 14.5px;
}

.emp-table th,
.payroll-table th,
.field-label,
.stat-label,
.info-tile-label {
    font-size: 12px;
}

.add-card input[type="text"],
.add-card input[type="email"],
.add-card input[type="tel"],
.add-card input[type="date"],
.add-card input[type="number"],
.add-card input[type="password"],
.add-card select,
.add-card textarea,
.search-wrap input,
.toolbar select,
.filter-bar select,
.filter-bar input,
.soa-filter-group select,
.soa-filter-group input {
    font-size: 15px;
}

.btn-save,
.btn-cancel,
.btn-add,
.btn-search,
.btn-filter,
.btn-navy,
.btn-outline,
.btn-red {
    font-size: 14.5px;
}

.btn-view,
.btn-edit,
.btn-delete {
    font-size: 13px;
}
