:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --background-color: #f5f7fb;
    --surface-color: #ffffff;
    --sidebar-color: #111827;

    --text-color: #172033;
    --muted-text-color: #667085;

    --border-color: #e4e7ec;
    --sidebar-width: 260px;

    --shadow:
        0 4px 18px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background-color);
    color: var(--text-color);
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* =====================================================
   APPLICATION LAYOUT
   ===================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-area {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.page-content {
    flex: 1;
    width: 100%;
    padding: 32px;
}

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;

    display: flex;
    flex-direction: column;

    width: var(--sidebar-width);
    background: var(--sidebar-color);
    color: white;

    transition: transform 0.25s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;

    border-radius: 10px;
    background: var(--primary-color);

    font-size: 17px;
    font-weight: 800;
}

.brand-text {
    font-size: 19px;
    font-weight: 700;
}

.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
}

.navigation-label {
    margin: 18px 12px 8px;
    color: #7f8ca3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.navigation-link {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 44px;
    margin-bottom: 4px;
    padding: 0 12px;

    border-radius: 9px;
    color: #cbd5e1;

    font-size: 14px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.navigation-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
}

.navigation-link.active {
    background: var(--primary-color);
    color: white;
}

.navigation-icon {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    display: grid;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    place-items: center;

    border-radius: 50%;
    background: var(--primary-color);

    font-size: 13px;
    font-weight: 700;
}

.user-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.user-details strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details span {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

/* =====================================================
   TOP BAR
   ===================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 72px;
    padding: 0 32px;

    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.sidebar-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 22px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted-text-color);
    font-size: 14px;
}

.breadcrumb strong {
    color: var(--text-color);
}

.icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;

    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: white;

    cursor: pointer;
}

.organization-name {
    font-size: 14px;
    font-weight: 600;
}

/* =====================================================
   PAGE HEADINGS
   ===================================================== */

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 4px 0 8px;
    font-size: 32px;
}

.page-heading p {
    margin: 0;
    color: var(--muted-text-color);
}

.eyebrow {
    color: var(--primary-color) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

/* =====================================================
   BUTTONS AND LINKS
   ===================================================== */

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 17px;

    border-radius: 9px;
    background: var(--primary-color);
    color: white;

    font-size: 14px;
    font-weight: 700;
}

.button-link:hover {
    background: var(--primary-dark);
}

.text-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
}

/* =====================================================
   CARDS
   ===================================================== */

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.statistic-card,
.content-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

.statistic-card {
    padding: 22px;
}

.statistic-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.statistic-label {
    color: var(--muted-text-color);
    font-size: 14px;
}

.statistic-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;

    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary-color);
}

.statistic-number {
    display: block;
    margin-bottom: 8px;
    font-size: 32px;
}

.statistic-description {
    color: var(--muted-text-color);
    font-size: 12px;
}

.content-card {
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

/* =====================================================
   TABLES
   ===================================================== */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th {
    color: var(--muted-text-color);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

td {
    font-size: 14px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-title-link {
    color: var(--text-color);
    font-weight: 700;
}

.table-title-link:hover {
    color: var(--primary-color);
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-badge {
    background: #eef2ff;
    color: #4338ca;
}

.priority-low {
    background: #ecfdf3;
    color: #027a48;
}

.priority-normal {
    background: #eff6ff;
    color: #1d4ed8;
}

.priority-high {
    background: #fff7ed;
    color: #c2410c;
}

.priority-urgent {
    background: #fef2f2;
    color: #b91c1c;
}

/* =====================================================
   QUICK ACTIONS
   ===================================================== */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 13px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.quick-action:hover {
    border-color: #bfdbfe;
    background: var(--primary-light);
}

.quick-action-icon {
    display: grid;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    place-items: center;

    border-radius: 9px;
    background: var(--primary-color);
    color: white;

    font-weight: 700;
}

.quick-action div {
    display: flex;
    flex-direction: column;
}

.quick-action strong {
    font-size: 14px;
}

.quick-action span:last-child {
    margin-top: 3px;
    color: var(--muted-text-color);
    font-size: 12px;
}

.empty-state {
    padding: 42px 20px;
    color: var(--muted-text-color);
    text-align: center;
}

/* =====================================================
   FOOTER
   ===================================================== */

.page-footer {
    padding: 20px 32px;
    color: var(--muted-text-color);
    font-size: 12px;
    text-align: center;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1050px) {
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .organization-name {
        display: none;
    }
}

@media (max-width: 560px) {
    .page-content {
        padding: 22px 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .button-link {
        align-self: flex-start;
    }

    .breadcrumb a,
    .breadcrumb span {
        display: none;
    }
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.alert-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

/* =====================================================
   USER TABLE
   ===================================================== */

.record-count {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    display: grid;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    place-items: center;

    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);

    font-size: 12px;
    font-weight: 800;
}

.table-user-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.table-user-details strong {
    font-size: 14px;
}

.table-user-details span {
    margin-top: 3px;
    color: var(--muted-text-color);
    font-size: 12px;
}

.user-active {
    background: #ecfdf3;
    color: #027a48;
}

.user-inactive {
    background: #f2f4f7;
    color: #475467;
}

.actions-column {
    text-align: right;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.inline-form {
    display: inline;
}

.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;

    border: 1px solid transparent;
    border-radius: 7px;

    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.secondary-button {
    border-color: var(--border-color);
    background: white;
    color: var(--text-color);
}

.secondary-button:hover {
    background: #f9fafb;
}

.danger-button {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.danger-button:hover {
    background: #fee2e2;
}

.success-button {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.success-button:hover {
    background: #d1fae5;
}

/* =====================================================
   FORMS
   ===================================================== */

.form-card {
    max-width: 850px;
    padding: 28px;

    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

.form-section-heading {
    margin-bottom: 25px;
}

.form-section-heading h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.form-section-heading p {
    margin: 0;
    color: var(--muted-text-color);
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
}

.required {
    color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;
    outline: none;
    background: white;
    color: var(--text-color);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
}

.primary-button,
.cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;

    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.primary-button {
    border: 0;
    background: var(--primary-color);
    color: white;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.cancel-button {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
}

.cancel-button:hover {
    background: #f9fafb;
}

.secondary-link {
    color: var(--muted-text-color);
    font-size: 14px;
    font-weight: 700;
}

.secondary-link:hover {
    color: var(--primary-color);
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .small-button {
        width: 100%;
    }
}

.muted-table-text {
    color: var(--muted-text-color);
}

.role-user-count {
    background: var(--primary-light);
    color: var(--primary-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.group-type-badge {
    background: #f4f3ff;
    color: #5925dc;
}

.member-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.member-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.member-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.member-option:hover {
    border-color: #bfdbfe;
    background: var(--primary-light);
}

.member-option:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.member-option input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary-color);
}

.member-option-avatar {
    display: grid;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    place-items: center;

    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);

    font-size: 12px;
    font-weight: 800;
}

.member-option-details {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.member-option-details strong {
    font-size: 14px;
}

.member-option-details small {
    overflow: hidden;
    margin-top: 3px;
    color: var(--muted-text-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .member-selection-grid {
        grid-template-columns: 1fr;
    }
}

.workspace-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.workspace-card {
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

.workspace-card-header,
.workspace-meta,
.workspace-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workspace-card h2 {
    margin: 20px 0 10px;
    font-size: 20px;
}

.workspace-card h2 a:hover {
    color: var(--primary-color);
}

.workspace-description {
    min-height: 45px;
    color: var(--muted-text-color);
    font-size: 14px;
    line-height: 1.55;
}

.workspace-meta {
    align-items: flex-start;
    flex-direction: column;
    margin: 22px 0;
    color: var(--muted-text-color);
    font-size: 12px;
}

.workspace-card-actions {
    justify-content: flex-end;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.workspace-status-active {
    background: #ecfdf3;
    color: #027a48;
}

.workspace-status-completed {
    background: #eff6ff;
    color: #1d4ed8;
}

.workspace-status-archived {
    background: #f2f4f7;
    color: #475467;
}

.workspace-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.workspace-summary-value {
    display: block;
    margin-top: 14px;
    font-size: 28px;
}

.workspace-summary-text {
    display: block;
    margin-top: 14px;
    font-size: 16px;
}

.workspace-member-row,
.workspace-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.workspace-member-row:last-child,
.workspace-task-row:last-child {
    border-bottom: 0;
}

.workspace-member-row .badge {
    margin-left: auto;
}

.workspace-task-row {
    justify-content: space-between;
}

.workspace-task-row div {
    display: flex;
    flex-direction: column;
}

.workspace-task-row span:not(.badge) {
    margin-top: 4px;
    color: var(--muted-text-color);
    font-size: 12px;
}

@media (max-width: 1100px) {
    .workspace-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .workspace-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .workspace-card-grid,
    .workspace-summary-grid {
        grid-template-columns: 1fr;
    }
}

.task-status-draft {
    background: #f2f4f7;
    color: #475467;
}

.task-status-open {
    background: #eff6ff;
    color: #1d4ed8;
}

.task-status-in-progress {
    background: #fff7ed;
    color: #c2410c;
}

.task-status-completed {
    background: #ecfdf3;
    color: #027a48;
}

.task-status-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

/* =========================================================
   Submissions
   ========================================================= */

.submission-content-note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background-color: #f8fafc;
}

.submission-content-note strong {
    display: block;
    margin-bottom: 0.35rem;
}

.submission-content-note p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.submission-status-draft {
    background-color: #f1f5f9;
    color: #475569;
}

.submission-status-submitted {
    background-color: #dcfce7;
    color: #166534;
}

.submission-status-withdrawn {
    background-color: #fee2e2;
    color: #991b1b;
}

.preserve-line-breaks {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.muted-text {
    color: #64748b;
    font-style: italic;
}

.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-item:first-child {
    padding-top: 0;
}

.detail-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-value {
    min-width: 0;
    color: #1e293b;
    overflow-wrap: anywhere;
}

.compact-detail-list .detail-item {
    grid-template-columns: 120px minmax(0, 1fr);
}

.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background-color: #fff7f7;
}

.danger-zone h2 {
    margin: 0 0 0.35rem;
    color: #991b1b;
    font-size: 1.1rem;
}

.danger-zone p {
    margin: 0;
    color: #7f1d1d;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 850px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-item,
    .compact-detail-list .detail-item {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .page-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading-actions a {
        text-align: center;
    }
}

/* =========================================================
   Authentication
   ========================================================= */

.auth-page {
    min-height: 100vh;
    margin: 0;
    background-color: #f8fafc;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr);
    min-height: 100vh;
}

.auth-brand-panel {
    display: flex;
    align-items: center;
    padding: 4rem;
    background:
        linear-gradient(
            135deg,
            #1e293b,
            #2563eb
        );
    color: #ffffff;
}

.auth-brand-content {
    max-width: 560px;
}

.auth-brand-content .eyebrow {
    color: #bfdbfe;
}

.auth-brand-content h1 {
    margin: 0.75rem 0 1.25rem;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.05;
}

.auth-brand-content p {
    max-width: 500px;
    margin: 0;
    color: #dbeafe;
    font-size: 1.05rem;
    line-height: 1.7;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.08);
}

.auth-heading {
    margin-bottom: 1.5rem;
}

.auth-heading h2 {
    margin: 0.35rem 0 0.5rem;
    font-size: 2rem;
}

.auth-heading p {
    margin: 0;
    color: #64748b;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-submit-button {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background-color: #eff6ff;
}

.auth-demo-credentials strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
}

.auth-demo-credentials p {
    margin: 0.25rem 0;
    color: #475569;
}

.auth-demo-credentials code {
    color: #1e40af;
    font-weight: 600;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 280px;
        padding: 2.5rem 2rem;
    }

    .auth-brand-content h1 {
        font-size: 2.5rem;
    }

    .auth-form-panel {
        padding: 2rem 1rem;
    }
}

@media (max-width: 520px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Login page
   ========================================================================== */

.login-page {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #172554 48%,
            #1d4ed8 100%
        );
    color: #0f172a;
}

.login-page,
.login-page input,
.login-page button {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.login-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(420px, 0.9fr);
    min-height: 100vh;
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 64px 36px;
    overflow: hidden;
    color: #ffffff;
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

.login-brand-panel::before {
    width: 420px;
    height: 420px;
    top: -170px;
    right: -100px;
    background:
        rgba(96, 165, 250, 0.18);
}

.login-brand-panel::after {
    width: 340px;
    height: 340px;
    bottom: -150px;
    left: -100px;
    background:
        rgba(255, 255, 255, 0.08);
}

.login-brand-content,
.login-brand-footer {
    position: relative;
    z-index: 1;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
}

.login-logo-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #2563eb;
    box-shadow:
        0 14px 30px
        rgba(15, 23, 42, 0.24);
    font-size: 24px;
}

.login-introduction {
    max-width: 680px;
    margin-top: 105px;
}

.login-eyebrow,
.login-card-eyebrow {
    margin: 0 0 14px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.login-introduction h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.login-description {
    max-width: 590px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 19px;
    line-height: 1.7;
}

.login-feature-list {
    display: grid;
    gap: 20px;
    max-width: 610px;
    margin-top: 48px;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.login-feature-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border: 1px solid
        rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background:
        rgba(255, 255, 255, 0.12);
    color: #bfdbfe;
    font-weight: 800;
}

.login-feature strong {
    display: block;
    font-size: 16px;
}

.login-feature p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.67);
    line-height: 1.55;
}

.login-brand-footer {
    margin: 56px 0 0;
    color: rgba(255, 255, 255, 0.52);
    font-size: 14px;
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 48px;
    background:
        rgba(248, 250, 252, 0.97);
}

.login-card {
    width: min(100%, 470px);
    padding: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow:
        0 28px 70px
        rgba(15, 23, 42, 0.12);
}

.login-card-heading {
    margin-bottom: 30px;
}

.login-card-eyebrow {
    color: #2563eb;
}

.login-card-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.login-card-heading p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 20px;
}

.login-form .form-group {
    display: grid;
    gap: 8px;
}

.login-form label {
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    padding: 0 15px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font-size: 16px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-form input:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.12);
}

.login-submit-button {
    min-height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 14px 28px
        rgba(37, 99, 235, 0.24);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.login-submit-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 34px
        rgba(37, 99, 235, 0.3);
    filter: brightness(1.03);
}

.login-submit-button:active {
    transform: translateY(0);
}

.login-card .alert {
    margin-bottom: 22px;
}

@media (max-width: 980px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 36px 32px 44px;
    }

    .login-introduction {
        margin-top: 70px;
    }

    .login-feature-list {
        display: none;
    }

    .login-brand-footer {
        display: none;
    }

    .login-form-panel {
        padding: 38px 24px 56px;
    }
}

@media (max-width: 560px) {
    .login-brand-panel {
        padding: 26px 20px 34px;
    }

    .login-logo {
        font-size: 20px;
    }

    .login-logo-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 21px;
    }

    .login-introduction {
        margin-top: 54px;
    }

    .login-introduction h1 {
        font-size: 38px;
    }

    .login-description {
        font-size: 16px;
    }

    .login-form-panel {
        padding: 24px 14px 40px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .login-card-heading h2 {
        font-size: 30px;
    }
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.sidebar-logout-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.sidebar-logout-button:hover {
    background: #dc2626;
}