* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, #dbeafe, transparent 35%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
}

.auth-card {
    width: 420px;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    margin: 0;
    font-size: 34px;
    color: #1d4ed8;
}

.auth-logo p {
    color: #6b7280;
}

        :root {
            --booktill-sidebar-full: 276px;
            --booktill-sidebar-icon: 132px;
            --booktill-sidebar-width: var(--booktill-sidebar-full);
            --booktill-sidebar-bg: #071225;
            --booktill-sidebar-bg-soft: #0b1730;
            --booktill-sidebar-border: rgba(255, 255, 255, 0.08);
            --booktill-page-bg: #f6f7fb;
            --booktill-card-border: #e5e7eb;
            --booktill-text: #0f172a;
            --booktill-muted: #64748b;
            --booktill-primary: #2563eb;
            --booktill-primary-dark: #1d4ed8;
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            min-height: 100%;
        }

        body {
            margin: 0;
            overflow-x: hidden;
            background: var(--booktill-page-bg);
        }

        .app-shell {
            min-height: 100vh;
            display: block;
            background: var(--booktill-page-bg);
            --booktill-sidebar-width: var(--booktill-sidebar-full);
        }

        .app-shell.sidebar-collapsed {
            --booktill-sidebar-width: var(--booktill-sidebar-icon);
        }

        /*
    |--------------------------------------------------------------------------
    | Fixed Sidebar
    |--------------------------------------------------------------------------
    */
        .sidebar {
            position: fixed !important;
            top: 0;
            left: 0;
            bottom: 0;
            z-index: 80;
            width: var(--booktill-sidebar-width) !important;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background:
                radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34%),
                linear-gradient(180deg, var(--booktill-sidebar-bg), var(--booktill-sidebar-bg-soft)) !important;
            border-right: 1px solid var(--booktill-sidebar-border);
            color: #ffffff;
            box-shadow: 18px 0 55px rgba(15, 23, 42, 0.22);
            transition: width 0.22s ease, transform 0.22s ease;
        }

        .sidebar-top {
            flex: 0 0 auto;
            padding: 18px 16px 14px;
            border-bottom: 1px solid var(--booktill-sidebar-border);
        }

        .sidebar-brand-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
        }

        .sidebar-brand {
            display: flex !important;
            align-items: center;
            gap: 12px;
            min-width: 0;
            width: auto !important;
            height: auto !important;
            margin: 0 !important;
            padding: 0 !important;
            text-decoration: none;
        }

        .sidebar-brand img {
            width: 54px !important;
            height: 54px !important;
            flex: 0 0 54px;
            object-fit: contain;
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.10);
            padding: 5px;
        }

        .sidebar-brand-text {
            min-width: 0;
            transition: opacity 0.18s ease, width 0.18s ease;
        }

        .sidebar-brand-text strong {
            display: block;
            color: #ffffff;
            font-size: 18px;
            line-height: 1.1;
            letter-spacing: -0.4px;
        }

        .sidebar-brand-text span {
            display: block;
            margin-top: 4px;
            color: #93a4c7;
            font-size: 10px;
            font-weight: 800;
        }

        .sidebar-collapse-btn {
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.08);
            color: #dbeafe;
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
        }

        .sidebar-collapse-btn:hover {
            background: rgba(255, 255, 255, 0.14);
        }

        .sidebar-role {
            display: inline-flex !important;
            align-items: center;
            max-width: 100%;
            margin-top: 14px !important;
            padding: 7px 10px !important;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08) !important;
            border: 1px solid rgba(255, 255, 255, 0.10);
            color: #bfdbfe !important;
            font-size: 11px !important;
            font-weight: 900 !important;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            white-space: nowrap;
            transition: opacity 0.18s ease, width 0.18s ease;
        }

        .sidebar-user-card {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 14px;
            padding: 11px;
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .sidebar-user-avatar {
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            display: grid;
            place-items: center;
            border-radius: 14px;
            background: #172554;
            color: #bfdbfe;
            font-size: 14px;
            font-weight: 900;
        }

        .sidebar-user-meta {
            min-width: 0;
            transition: opacity 0.18s ease, width 0.18s ease;
        }

        .sidebar-user-meta strong {
            display: block;
            overflow: hidden;
            color: #ffffff;
            font-size: 13px;
            line-height: 1.2;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .sidebar-user-meta span {
            display: block;
            margin-top: 3px;
            color: #93a4c7;
            font-size: 11px;
            font-weight: 800;
        }

        /*
    |--------------------------------------------------------------------------
    | Sidebar Navigation
    |--------------------------------------------------------------------------
    */
        .sidebar-nav {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 14px 12px 18px !important;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
        }

        .sidebar-nav::-webkit-scrollbar {
            width: 6px;
        }

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

        .sidebar-nav::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.22);
        }

        .menu-section {
            margin-bottom: 18px !important;
        }

        .menu-section-title {
            display: block !important;
            padding: 7px 10px 9px !important;
            color: #8292b5 !important;
            font-size: 11px !important;
            font-weight: 900 !important;
            text-transform: uppercase;
            letter-spacing: 0.13em;
            transition: opacity 0.18s ease, width 0.18s ease;
        }

        .sidebar-nav a {
            position: relative;
            display: flex !important;
            align-items: center;
            gap: 12px;
            min-height: 46px;
            margin-bottom: 1px;
            padding: 11px 12px !important;
            border-radius: 16px !important;
            color: #cbd5e1 !important;
            text-decoration: none !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            line-height: 1.2;
            transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .sidebar-nav a:hover {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #ffffff !important;
            transform: translateX(2px);
        }

        .sidebar-nav a.active {
            background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
            color: #ffffff !important;
            box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
        }

        .menu-icon {
            width: 28px;
            height: 28px;
            flex: 0 0 28px;
            display: grid !important;
            place-items: center;
            border-radius: 11px;
            background: rgba(255, 255, 255, 0.08);
            font-size: 15px;
            line-height: 1;
        }

        .sidebar-nav a.active .menu-icon {
            background: rgba(255, 255, 255, 0.15);
        }

        .menu-label {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: opacity 0.18s ease, width 0.18s ease;
        }

        .sidebar-footer {
            flex: 0 0 auto;
            padding: 14px 14px 16px;
            border-top: 1px solid var(--booktill-sidebar-border);
        }

        .sidebar-footer form {
            margin: 0;
        }

        .sidebar-logout-btn {
            width: 100%;
            min-height: 42px;
            border: 0;
            border-radius: 15px;
            background: rgba(239, 68, 68, 0.13);
            color: #fecaca;
            cursor: pointer;
            font-size: 13px;
            font-weight: 900;
        }

        .sidebar-logout-btn:hover {
            background: rgba(239, 68, 68, 0.20);
            color: #ffffff;
        }

        /*
    |--------------------------------------------------------------------------
    | Icons-only mode
    |--------------------------------------------------------------------------
    */
        .app-shell.sidebar-collapsed .sidebar {
            width: var(--booktill-sidebar-icon) !important;
        }

        .app-shell.sidebar-collapsed .sidebar {
            width: var(--booktill-sidebar-icon) !important;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Hide text only, not the icons                                              |
| -------------------------------------------------------------------------- |
| */
        .app-shell.sidebar-collapsed .sidebar-brand-text,
        .app-shell.sidebar-collapsed .sidebar-role,
        .app-shell.sidebar-collapsed .sidebar-user-card,
        .app-shell.sidebar-collapsed .menu-section-title,
        .app-shell.sidebar-collapsed .menu-label,
        .app-shell.sidebar-collapsed .sidebar-logout-btn span {

            display: none !important;

        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Collapsed top area                                                         |
| -------------------------------------------------------------------------- |
| Keep the collapse button in normal flow.                                   |
| Do NOT absolute-position it because it hides the menu icons.               |
| */
        .app-shell.sidebar-collapsed .sidebar-top {

            padding: 14px 12px 12px;

        }

        .app-shell.sidebar-collapsed .sidebar-brand-row {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .app-shell.sidebar-collapsed .sidebar-brand {
            justify-content: center;
        }

        .app-shell.sidebar-collapsed .sidebar-brand img {
            width: 52px !important;
            height: 52px !important;
            flex-basis: 52px;
            border-radius: 18px;
        }

        .app-shell.sidebar-collapsed .sidebar-collapse-btn {
            position: static !important;
            width: 42px;
            height: 34px;
            border-radius: 13px;
            font-size: 15px;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Collapsed icon menu                                                        |
| -------------------------------------------------------------------------- |
| */
        .app-shell.sidebar-collapsed .sidebar-nav {

            padding: 14px 12px 18px !important;

        }

        .app-shell.sidebar-collapsed .menu-section {
            margin-bottom: 14px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-nav a {
            justify-content: center;
            min-height: 52px;
            padding: 12px !important;
            border-radius: 18px !important;
        }

        .app-shell.sidebar-collapsed .menu-icon {
            width: 36px;
            height: 36px;
            flex: 0 0 36px;
            margin: 0;
            border-radius: 14px;
            font-size: 17px;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Collapsed logout button                                                    |
| -------------------------------------------------------------------------- |
| */
        .app-shell.sidebar-collapsed .sidebar-footer {

            padding: 12px;

        }

        .app-shell.sidebar-collapsed .sidebar-logout-btn {
            display: grid;
            place-items: center;
            min-height: 46px;
            font-size: 0;
        }

        .app-shell.sidebar-collapsed .sidebar-logout-btn::before {
            content: "🚪";
            font-size: 18px;
        }


        /*
|--------------------------------------------------------------------------
| Main Content
|--------------------------------------------------------------------------
*/
        .main-content {
            min-height: 100vh;
            margin-left: var(--booktill-sidebar-width) !important;
            transition: margin-left 0.22s ease;
        }

        .topbar {
            position: sticky !important;
            top: 0;
            z-index: 40;
            display: flex !important;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            min-height: 74px;
            padding: 16px 26px !important;
            background: rgba(246, 247, 251, 0.90) !important;
            backdrop-filter: blur(14px);
            border-bottom: 1px solid rgba(226, 232, 240, 0.82);
        }

        .topbar-title-wrap {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .mobile-menu-btn {
            display: none;
            width: 42px;
            height: 42px;
            border: 1px solid #dbe3ef;
            border-radius: 14px;
            background: #ffffff;
            color: #0f172a;
            cursor: pointer;
            font-size: 20px;
        }

        .topbar h1 {
            margin: 0 !important;
            color: var(--booktill-text);
            font-size: 24px;
            letter-spacing: -0.6px;
        }

        .topbar p {
            margin: 4px 0 0 !important;
            color: var(--booktill-muted);
            font-size: 13px;
            font-weight: 700;
        }

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

        .sidebar-mode-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 38px;
            padding: 0 12px;
            border-radius: 999px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            color: #475569;
            font-size: 12px;
            font-weight: 900;
            white-space: nowrap;
        }

        .topbar form {
            margin: 0;
        }

        .topbar .btn-secondary {
            white-space: nowrap;
        }

        .content {
            width: min(100%, 1440px);
            padding: 22px 26px 38px !important;
        }

        .sidebar-backdrop {
            position: fixed;
            inset: 0;
            z-index: 70;
            display: none;
            background: rgba(15, 23, 42, 0.46);
            backdrop-filter: blur(2px);
        }

        /*
    |--------------------------------------------------------------------------
    | Mobile
    |--------------------------------------------------------------------------
    */
        @media (max-width: 980px) {
            .app-shell {
                --booktill-sidebar-width: var(--booktill-sidebar-full);
            }

            .sidebar {
                width: min(88vw, 300px) !important;
                transform: translateX(-105%);
            }

            .app-shell.mobile-sidebar-open .sidebar {
                transform: translateX(0);
            }

            .app-shell.mobile-sidebar-open .sidebar-backdrop {
                display: block;
            }

            .app-shell.sidebar-collapsed .sidebar {
                width: min(88vw, 300px) !important;
            }

            .app-shell.sidebar-collapsed .sidebar-brand-text,
            .app-shell.sidebar-collapsed .sidebar-role,
            .app-shell.sidebar-collapsed .sidebar-user-meta,
            .app-shell.sidebar-collapsed .menu-section-title,
            .app-shell.sidebar-collapsed .menu-label,
            .app-shell.sidebar-collapsed .sidebar-logout-btn span {
                width: auto !important;
                opacity: 1;
                pointer-events: auto;
            }

            .app-shell.sidebar-collapsed .sidebar-nav a {
                justify-content: flex-start;
            }

            .app-shell.sidebar-collapsed .sidebar-collapse-btn {
                position: static;
                width: 38px;
                height: 38px;
                border-radius: 14px;
                font-size: 18px;
            }

            .main-content {
                margin-left: 0 !important;
            }

            .mobile-menu-btn {
                display: grid;
                place-items: center;
            }

            .topbar {
                padding: 14px 16px !important;
            }

            .topbar h1 {
                font-size: 20px;
            }

            .sidebar-mode-pill {
                display: none;
            }

            .content {
                padding: 18px 16px 30px !important;
            }
        }

        @media (max-width: 560px) {
            .topbar {
                align-items: flex-start;
            }

            .topbar-actions {
                display: none;
            }
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| FINAL SIDEBAR FIX - Restore previous full UI look                          |
| -------------------------------------------------------------------------- |
| This keeps the sidebar fixed, makes full menu the default,                 |
| prevents the icon toggle from hiding menu icons, and stops the             |
| dashboard from looking squeezed.                                           |
| */

        /*:root {
            --booktill-sidebar-full: 270px;
            --booktill-sidebar-icon: 100px;
        }*/

        .app-shell {
            --booktill-sidebar-width: var(--booktill-sidebar-full);
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Full sidebar default                                                       |
| -------------------------------------------------------------------------- |
| */
        .sidebar {

            width: var(--booktill-sidebar-width) !important;

        }

        .main-content {
            margin-left: var(--booktill-sidebar-width) !important;
        }

        .content {
            width: 100% !important;
            max-width: none !important;
            padding: 24px 32px 42px !important;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Full sidebar brand/header                                                  |
| -------------------------------------------------------------------------- |
| */
        .sidebar-top {

            padding: 18px 16px 14px !important;

        }

        .sidebar-brand-row {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 12px !important;
        }

        .sidebar-brand {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            gap: 12px !important;
            min-width: 0 !important;
        }

        .sidebar-brand img {
            width: 52px !important;
            height: 52px !important;
            flex: 0 0 52px !important;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Collapse button must never cover menu icons                                |
| -------------------------------------------------------------------------- |
| */
        .sidebar-collapse-btn {

            position: static !important;
            width: 38px !important;
            height: 38px !important;
            flex: 0 0 38px !important;
            border-radius: 14px !important;
            font-size: 18px !important;

        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Icons-only mode - optional, clean and not squeezed                         |
| -------------------------------------------------------------------------- |
| */
        .app-shell.sidebar-collapsed {

            --booktill-sidebar-width: var(--booktill-sidebar-icon);

        }

        .app-shell.sidebar-collapsed .sidebar {
            width: var(--booktill-sidebar-icon) !important;
        }

        .app-shell.sidebar-collapsed .main-content {
            margin-left: var(--booktill-sidebar-icon) !important;
        }

        .app-shell.sidebar-collapsed .sidebar-brand-row {
            flex-direction: column !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 10px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-brand {
            justify-content: center !important;
        }

        .app-shell.sidebar-collapsed .sidebar-brand img {
            width: 50px !important;
            height: 50px !important;
            flex: 0 0 50px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-collapse-btn {
            position: static !important;
            width: 42px !important;
            height: 34px !important;
            flex: 0 0 34px !important;
            border-radius: 13px !important;
            font-size: 15px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-brand-text,
        .app-shell.sidebar-collapsed .sidebar-role,
        .app-shell.sidebar-collapsed .sidebar-user-card,
        .app-shell.sidebar-collapsed .menu-section-title,
        .app-shell.sidebar-collapsed .menu-label,
        .app-shell.sidebar-collapsed .sidebar-logout-btn span {
            display: none !important;
        }

        .app-shell.sidebar-collapsed .sidebar-nav {
            padding: 14px 12px 18px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-nav a {
            justify-content: center !important;
            min-height: 52px !important;
            padding: 12px !important;
            border-radius: 18px !important;
        }

        .app-shell.sidebar-collapsed .menu-icon {
            width: 36px !important;
            height: 36px !important;
            flex: 0 0 36px !important;
            margin: 0 !important;
            border-radius: 14px !important;
            font-size: 17px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-footer {
            padding: 12px !important;
        }

        .app-shell.sidebar-collapsed .sidebar-logout-btn {
            display: grid !important;
            place-items: center !important;
            min-height: 46px !important;
            font-size: 0 !important;
        }

        .app-shell.sidebar-collapsed .sidebar-logout-btn::before {
            content: "🚪";
            font-size: 18px;
        }

        /*                                                                         |
| -------------------------------------------------------------------------- |
| Mobile should behave like drawer, not squeezed desktop sidebar             |
| -------------------------------------------------------------------------- |
| */
        @media (max-width: 980px) {

            .app-shell,
            .app-shell.sidebar-collapsed {
                --booktill-sidebar-width: var(--booktill-sidebar-full);
            }

            .sidebar,
            .app-shell.sidebar-collapsed .sidebar {
                width: min(88vw, 300px) !important;
            }

            .main-content,
            .app-shell.sidebar-collapsed .main-content {
                margin-left: 0 !important;
            }

            .app-shell.sidebar-collapsed .sidebar-brand-text,
            .app-shell.sidebar-collapsed .sidebar-role,
            .app-shell.sidebar-collapsed .sidebar-user-card,
            .app-shell.sidebar-collapsed .menu-section-title,
            .app-shell.sidebar-collapsed .menu-label,
            .app-shell.sidebar-collapsed .sidebar-logout-btn span {
                display: block !important;
            }

            .app-shell.sidebar-collapsed .sidebar-brand-row {
                flex-direction: row !important;
                justify-content: space-between !important;
            }

            .app-shell.sidebar-collapsed .sidebar-nav a {
                justify-content: flex-start !important;
            }

            .content {
                padding: 18px 16px 30px !important;
            }

        }


.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
}

.btn-secondary {
    padding: 10px 16px;
    background: #e5e7eb;
    color: #111827;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

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

.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    padding: 7px;
}

.brand h2 {
    margin: 0;
    color: #60a5fa;
}

.brand span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.sidebar nav {
    margin-top: 32px;
}

.sidebar nav a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 1px;
}

.sidebar nav a:hover {
    background: #1f2937;
    color: #fff;
}

.main-content {
    flex: 1;
}

.topbar {
    background: #fff;
    padding: 22px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    margin: 0;
}

.topbar p {
    margin: 6px 0 0;
    color: #6b7280;
}

.content {
    padding: 32px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(15,23,42,0.06);
}

.card h3 {
    margin: 0 0 12px;
    color: #374151;
}

.metric {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    color: #2563eb;
}

.page-actions {
    margin-bottom: 20px;
}

.btn-primary-link {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.table th,
.table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background: #f9fafb;
    font-size: 14px;
    color: #374151;
}

.table button {
    border: none;
    background: #ef4444;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

select,
textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

textarea {
    min-height: 100px;
}

.two-col {
    grid-template-columns: 1fr 1fr;
}

.conversation-box {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
}

.conversation-message {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}

.conversation-message.ai {
    border-left: 4px solid #2563eb;
}

.conversation-message.visitor {
    border-left: 4px solid #16a34a;
}

.conversation-message.staff {
    border-left: 4px solid #9333ea;
}

.conversation-message p {
    margin: 8px 0;
}

.conversation-message small {
    color: #6b7280;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

.quote-item-row {
    display: grid;
    grid-template-columns: 2fr 120px 160px 100px;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.quote-item-row button,
.remove-quote-item {
    border: none;
    background: #ef4444;
    color: #ffffff;
    border-radius: 9px;
    padding: 11px;
    cursor: pointer;
    font-weight: 700;
}

.quote-add-btn {
    width: auto;
    margin-top: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-row.total {
    font-size: 22px;
    font-weight: 800;
    color: #2563eb;
}

.invoice-item-row {
    display: grid;
    grid-template-columns: 2fr 120px 160px 100px;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.invoice-item-row button,
.remove-invoice-item {
    border: none;
    background: #ef4444;
    color: #ffffff;
    border-radius: 9px;
    padding: 11px;
    cursor: pointer;
    font-weight: 700;
}

.invoice-add-btn {
    width: auto;
    margin-top: 8px;
}

.public-invoice-wrapper {
    min-height: 100vh;
    background: #f3f4f6;
    padding: 40px 20px;
}

.public-invoice-card {
    max-width: 980px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 12px 35px rgba(15,23,42,0.08);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.invoice-meta {
    text-align: right;
}

.invoice-customer {
    margin: 24px 0;
}

.invoice-public-summary {
    max-width: 420px;
    margin-left: auto;
    margin-top: 24px;
}

.toggle-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 700;
}

.toggle-row input {
    width: auto;
}

.copy-link-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.copy-link-box input {
    flex: 1;
}

.quote-response-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.quote-response-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    background: #ffffff;
}

.quote-response-card.accept {
    border-left: 5px solid #16a34a;
}

.quote-response-card.reject {
    border-left: 5px solid #dc2626;
}

.btn-danger {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    padding: 14px;
    background: #dc2626;
    color: #fff;
    font-size: 16px;
}

.public-status-box {
    padding: 18px;
    border-radius: 14px;
    background: #f3f4f6;
}

.public-status-box.success {
    background: #dcfce7;
    color: #166534;
}

.public-status-box.danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-weight: 700;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.danger {
    background: #fee2e2;
    color: #991b1b;
}

.notice-text {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 12px;
    border-radius: 10px;
    margin: 12px 0;
}

