/*
 * EasyInvoice — shared design system
 * ---------------------------------
 * One stylesheet for every page (app shell + auth flow) so the whole
 * product reads as one consistent product instead of copy-pasted pages.
 */

:root {
    --color-bg-1: #e6ecf5;
    --color-bg-2: #f2f0ea;
    --color-bg-3: #f7f5f1;
    --color-bg-4: #eaeff6;

    --color-text: #0f172a;
    --color-text-muted: #6b7280;
    --color-text-faint: #9ca3af;

    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-teal: #22c1c3;
    --color-success: #16a34a;
    --color-success-light: #22c55e;
    --color-danger: #ef4444;
    --color-danger-dark: #b91c1c;
    --color-warning: #d97706;

    --color-border: #e5e7eb;
    --color-surface: #f9fafb;
    --color-surface-alt: #f3f4f6;
    --color-tint-blue: #eff4ff;
    --color-tint-blue-strong: #e0edff;

    --radius-shell: 32px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shadow-shell: 0 24px 60px rgba(15, 23, 42, 0.18);
    --shadow-card: 0 1px 0 rgba(148, 163, 184, 0.35);
    --shadow-modal: 0 22px 50px rgba(15, 23, 42, 0.3);
    --shadow-panel: 0 12px 30px rgba(15, 23, 42, 0.15);
    --shadow-btn-primary: 0 10px 24px rgba(37, 99, 235, 0.4);
    --shadow-btn-success: 0 14px 30px rgba(22, 163, 74, 0.45);

    /* ---- Portal (app-body) redesign tokens ---- */
    --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;

    --app-bg: #f7f5f1;
    --app-surface: #ffffff;
    --app-border: #e9e6e0;
    --app-text: #1c1c1c;
    --app-text-muted: #8a8a86;
    --app-text-faint: #b3b0a9;

    --app-accent: #bd7b3a;
    --app-accent-dark: #a3672c;
    --app-accent-tint: #faf1e6;
    --app-navy: #1c2333;
    --app-teal: #3f8f86;
    --app-red: #c0503a;
    --app-red-tint: #fbeee9;
    --app-green: #2f9166;
    --app-green-tint: #eaf5ef;
}

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

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, var(--color-bg-1) 0, var(--color-bg-2) 30%, var(--color-bg-3) 60%, var(--color-bg-4) 100%);
    color: var(--color-text);
}

a {
    text-decoration: none;
}

/* ==========================================================================
   App shell (sidebar + main) — dashboard, klientet, faturat, cilesimet
   ========================================================================== */

body.app-body {
    display: block;
    padding: 0;
    background: var(--app-bg);
    color: var(--app-text);
}

.shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Top navigation bar ---- */
.sidebar {
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    padding: 16px 40px;
    color: var(--app-text);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sidebar > div:first-child {
    display: flex;
    align-items: center;
    gap: 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 19px;
    color: var(--app-text);
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--app-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px 0;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: var(--app-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
    background: transparent;
    color: var(--app-text);
}

.nav-item-icon {
    display: none;
}

.nav-item.active {
    background: transparent;
    color: var(--app-text);
    font-weight: 600;
    border-bottom-color: var(--app-accent);
}

.sidebar-footer {
    margin-top: 0;
    font-size: 12px;
    color: var(--app-text-muted);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.copyright {
    display: none;
}

/* ---- Profile menu (avatar + dropdown) ---- */
.profile-menu {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 2px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--app-text-faint);
    font-size: 10px;
    transition: color 0.15s ease;
}

.profile-trigger:hover {
    color: var(--app-text);
}

.profile-trigger .caret {
    font-size: 9px;
    transition: transform 0.15s ease;
}

.profile-menu.open .profile-trigger .caret {
    transform: rotate(180deg);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 210px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(28, 24, 18, 0.18);
    padding: 8px;
    z-index: 60;
}

.profile-menu.open .profile-dropdown {
    display: block;
}

.profile-dropdown-header {
    padding: 8px 10px 12px;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 6px;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--app-text);
    text-transform: capitalize;
}

.profile-username {
    font-size: 12px;
    color: var(--app-text-muted);
    margin-top: 2px;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--app-text);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.profile-dropdown-item:hover {
    background: var(--color-surface-alt);
}

.profile-dropdown-item.danger {
    color: var(--app-red);
}

.profile-dropdown-item .pdi-icon {
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Main content area */
.main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 40px 56px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 600;
    color: var(--app-text);
}

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

.top-pill {
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 13px;
    color: var(--app-text-muted);
    white-space: nowrap;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--app-navy);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.app-body .card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: none;
}

.app-body .card.padded {
    padding: 20px 22px;
}

.app-body .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--app-text);
}

.app-body .card-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-text-muted);
    margin-bottom: 10px;
}

.app-body .card-value {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    color: var(--app-text);
    line-height: 1.15;
}

.app-body .card-value.big {
    font-size: 42px;
}

.app-body .card-meta {
    font-size: 12px;
    color: var(--app-text-muted);
    margin-top: 6px;
}

.app-body .card.tone-danger {
    background: var(--app-red-tint);
    border-color: var(--app-red-tint);
}

.app-body .card.tone-danger .card-title,
.app-body .card.tone-danger .card-value {
    color: var(--app-red);
}

.app-body .card-title.tone-teal {
    color: var(--app-teal);
}

.app-body .card-value.tone-teal {
    color: var(--app-teal);
}

.app-body .card-title.tone-danger,
.app-body .card-value.tone-danger {
    color: var(--app-red);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.primary-button {
    border: none;
    outline: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--app-accent);
    color: white;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.1s ease, background 0.1s ease, opacity 0.1s ease;
    font-family: inherit;
}

.primary-button:hover {
    background: var(--app-accent-dark);
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.primary-button.success {
    background: var(--app-green);
    box-shadow: none;
}

.btn-secondary {
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    color: #374151;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-primary {
    border-radius: var(--radius-pill);
    border: none;
    background: var(--color-primary);
    color: #ffffff;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.app-body .btn-secondary {
    border-radius: 8px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
}

.app-body .btn-secondary:hover {
    background: var(--color-surface-alt);
    transform: none;
    border-color: var(--app-text-faint);
}

.app-body .btn-primary {
    border-radius: 8px;
    background: var(--app-accent);
}

.app-body .btn-primary:hover {
    background: var(--app-accent-dark);
}

.spinner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
    display: none;
    flex-shrink: 0;
}

.primary-button.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Tables
   ========================================================================== */

.app-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.app-body thead {
    background: transparent;
    border-bottom: 1px solid var(--app-border);
}

.app-body th {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--app-text-muted);
}

.app-body th, .app-body td {
    padding: 14px 16px;
    text-align: left;
}

.app-body tbody tr {
    border-bottom: 1px solid var(--app-border);
}

.app-body tbody tr:last-child {
    border-bottom: none;
}

.app-body tbody tr:nth-child(even) {
    background: transparent;
}

.app-body tbody tr:hover {
    background: var(--color-surface-alt);
}

.cell-with-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--app-navy);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.app-body .status-pill {
    font-size: 13px;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    background: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.app-body .status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.app-body .status-unpaid {
    color: var(--app-red);
}

.app-body .status-paid {
    color: var(--app-green);
}

.app-body .status-pending {
    color: var(--color-warning);
}

.app-body .table-link {
    color: var(--app-accent);
    font-weight: 600;
}

.app-body .table-link:hover {
    text-decoration: underline;
}

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

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

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

.empty-state .empty-hint {
    font-size: 13px;
}

/* ==========================================================================
   Search
   ========================================================================== */

.app-body .search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.search-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    font-family: inherit;
    color: var(--color-text);
}

.search-icon {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
    display: block;
}

.text-input, .select-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: 14px;
    margin-bottom: 10px;
    background: #ffffff;
    font-family: inherit;
    color: var(--color-text);
}

.text-input:focus, .select-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.app-body .text-input:focus, .app-body .select-input:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(189, 123, 58, 0.14);
}

.text-input:read-only {
    background: var(--color-surface-alt);
    color: #4b5563;
    cursor: not-allowed;
}

.text-input:read-only:focus {
    box-shadow: none;
    border-color: var(--color-border);
}

select.text-input {
    cursor: pointer;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 40;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px 22px 18px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
}

.app-body .modal {
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(28, 24, 18, 0.16);
    border: 1px solid var(--app-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-text-muted);
    line-height: 1;
    padding: 4px;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-accent-dark, var(--color-text-muted));
    margin: 20px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border, var(--color-border));
}

.modal-section-label.no-border {
    border-top: none;
    padding-top: 0;
    margin-top: 4px;
}

.two-col-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.banner {
    display: none;
    font-size: 13px;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    margin-bottom: 14px;
}

.banner.visible {
    display: block;
}

.banner.error {
    background: #fef2f2;
    color: var(--color-danger-dark);
    border: 1px solid #fecaca;
}

.banner.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Portal page furniture — greeting header, hero revenue card + sparkline,
   business info chips, two-column settings layout
   ========================================================================== */

.page-greeting h1 {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 600;
    color: var(--app-text);
}

.page-greeting p {
    font-size: 14px;
    color: var(--app-text-muted);
    margin-top: 4px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.revenue-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.sparkline {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 56px;
    flex-shrink: 0;
}

.sparkline .bar {
    width: 12px;
    border-radius: 3px 3px 0 0;
    background: var(--app-border);
    min-height: 4px;
}

.sparkline .bar.current {
    background: var(--app-accent);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
}

.chip.chip-amount {
    background: var(--app-accent-tint);
    border-color: var(--app-accent-tint);
    color: var(--app-accent-dark);
    font-weight: 600;
}

.settings-columns {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.settings-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 760px) {
    .settings-columns {
        flex-direction: column;
    }
}

/* ==========================================================================
   Auth flow (login / signup / check-email / set-password)
   ========================================================================== */

body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 960px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-shell);
    border-radius: var(--radius-shell);
    padding: 28px 30px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    backdrop-filter: blur(16px);
}

.illustration {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--app-navy);
    color: #ffffff;
    padding: 40px 36px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.illu-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--app-accent);
    margin-bottom: 22px;
    flex-shrink: 0;
}

.illu-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.illu-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    max-width: 30ch;
    margin-bottom: 34px;
}

.illu-mock {
    position: relative;
    height: 132px;
}

.illu-card {
    position: absolute;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.illu-card.back {
    width: 76%;
    height: 96px;
    top: 18px;
    left: 24%;
}

.illu-card.mid {
    width: 84%;
    height: 96px;
    top: 9px;
    left: 12%;
}

.illu-card.front {
    width: 90%;
    padding: 16px 18px;
    background: #ffffff;
    color: var(--app-text);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.illu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

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

.illu-card-line {
    height: 7px;
    border-radius: 4px;
    background: var(--app-border);
    margin-bottom: 8px;
}

.illu-card-line.short {
    width: 55%;
    margin-bottom: 0;
}

.illu-card-amount {
    margin-top: 12px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--app-accent);
}

.auth-panel {
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    margin-bottom: 14px;
}

.step-badge.tone-green {
    color: var(--app-green);
    background: var(--app-green-tint);
    border: 1px solid var(--app-green-tint);
}

.step-badge.tone-blue {
    color: var(--app-accent-dark);
    background: var(--app-accent-tint);
    border: 1px solid var(--app-accent-tint);
}

.step-badge.tone-red {
    color: var(--app-red);
    background: var(--app-red-tint);
    border: 1px solid var(--app-red-tint);
}

.step-badge .step-dots {
    display: inline-flex;
    gap: 3px;
}

.step-badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
}

.step-badge .dot.active {
    opacity: 1;
}

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

.auth-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 22px;
}

.auth-subtitle strong {
    color: var(--color-text);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-wrapper {
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    padding: 11px 14px;
    background: var(--color-surface);
    gap: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field-wrapper:focus-within {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(189, 123, 58, 0.14);
    background: #ffffff;
}

.field-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: var(--color-text);
    font-family: inherit;
}

.field-wrapper input::placeholder {
    color: var(--color-text-faint);
}

.auth-footer {
    margin-top: 18px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

.auth-footer a {
    margin-left: 4px;
}

.link {
    color: var(--app-accent);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.state-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.state-icon.info {
    background: var(--app-accent-tint);
    color: var(--app-accent-dark);
}

.state-icon.warn {
    background: var(--app-red-tint);
    color: var(--app-red);
}

.state-icon.success {
    background: var(--app-green-tint);
    color: var(--app-green);
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--app-accent-tint);
    border-top-color: var(--app-accent);
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
    .sidebar {
        padding: 14px 20px;
        flex-wrap: wrap;
        row-gap: 12px;
    }
    .sidebar > div:first-child {
        gap: 24px;
        flex-wrap: wrap;
    }
    .nav {
        gap: 18px;
        flex-wrap: wrap;
    }
    .main {
        padding: 24px 20px 40px;
    }
    .card.table-card {
        overflow-x: auto;
    }
    .card.table-card table {
        min-width: 600px;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        max-width: 520px;
        grid-template-columns: 1fr;
        padding: 24px;
    }
    .illustration {
        display: none;
    }
}

@media (max-width: 600px) {
    body.auth-body {
        padding: 16px;
    }
    .auth-shell {
        border-radius: 24px;
        padding: 20px 18px;
    }
    .auth-title {
        font-size: 22px;
    }
}
