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

:focus:not(:focus-visible) {
    outline: none !important;
}

:root {
    --ink-navy: #101826;
    --ink-navy-deep: #0B111C;
    --paper: #F6F1E6;
    --teal: #1F8A70;
    --amber: #D98C2B;
    --ink-text: #1B2130;
    --ink-cream: #EDEAE0;
    --ink-muted-navy: #A9B0BE;
    --ink-muted-paper: #8A8375;
    --ink-ghost-border: #C9BFA8;
    --ink-strike: #9CA3AF;
    --line: #DCD3BE;
    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --panel-bg: #F4F6F9;
    --panel-sidebar: #12172A;
    --panel-card: #FFFFFF;
    --panel-border: #E5E8EF;
    --panel-text: #1C2333;
    --panel-muted: #6B7280;
    --panel-accent: #1F8A70;
    --panel-accent-soft: #E7F5F1;

    /* Radzen's material-base theme defaults to indigo/magenta (--rz-primary: #4340D2,
       --rz-secondary: #e31c65), which clashes with the brand teal/amber. These overrides
       retint every Radzen component that reads the theme tokens directly (dialogs included —
       they render via <RadzenComponents /> outside .app-content, so the older .app-content-
       scoped button override below never reached them). */
    --rz-primary: var(--teal);
    --rz-primary-light: #6FD9BF;
    --rz-primary-lighter: rgba(31, 138, 112, 0.12);
    --rz-primary-dark: #17654F;
    --rz-primary-darker: #114A3A;
    --rz-on-primary: #05231C;
    --rz-on-primary-light: #05231C;
    --rz-on-primary-lighter: #17654F;
    --rz-on-primary-dark: #FFFFFF;
    --rz-on-primary-darker: #FFFFFF;

    --rz-secondary: var(--amber);
    --rz-secondary-light: #E6B475;
    --rz-secondary-lighter: rgba(217, 140, 43, 0.12);
    --rz-secondary-dark: #A36920;
    --rz-secondary-darker: #774D18;
    --rz-on-secondary: #2B1B00;
    --rz-on-secondary-light: #2B1B00;
    --rz-on-secondary-lighter: #A36920;
    --rz-on-secondary-dark: #FFFFFF;
    --rz-on-secondary-darker: #FFFFFF;
}

html, body {
    margin: 0;
    background: var(--paper);
}

h1:focus,
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

*:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

html, body,
.rz-body, .rz-layout, .rz-text, .rz-button, .rz-textbox, .rz-password,
.rz-datagrid, .rz-card, .rz-badge, .rz-panel-menu-item-text,
.rz-dropdown, .rz-form-field, input, textarea, select {
    font-family: 'Inter', 'Noto Sans Bengali', -apple-system, sans-serif !important;
}

h1, h2, h3, .rz-h1, .rz-h2, .rz-h3,
.rz-text-style-h1, .rz-text-style-h2, .rz-text-style-h3, .rz-text-style-h4, .rz-text-style-h5, .rz-text-style-h6 {
    font-family: 'Fraunces', 'Noto Sans Bengali', serif !important;
}

/* ===================== MARKETING SITE ===================== */

.ld-section {
    padding: 5rem 1.5rem;
}

.ld-navy {
    background: var(--ink-navy);
    color: var(--ink-cream);
}

.ld-paper {
    background: var(--paper);
    color: var(--ink-text);
}

.ld-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.ld-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 1rem;
}

.ld-navy .ld-eyebrow {
    color: #6FD9BF;
}

.ld-h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0 0 1.25rem;
}

.ld-h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 2rem;
}

.ld-sub {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: #9AA3B4;
    max-width: 34rem;
    margin: 0 0 2rem;
}

.ld-navy .ld-sub {
    color: var(--ink-muted-navy);
}

.ld-paper .ld-sub {
    color: #56514A;
}

.ld-btn {
    box-sizing: border-box;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.6rem;
    border-radius: 3px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.ld-btn-primary {
    background: var(--teal);
    color: #05231C;
}

    .ld-btn-primary:hover {
        transform: translateY(-2px);
        background: #24A186;
    }

.ld-btn-ghost {
    background: transparent;
    border-color: #3A4356;
    color: var(--ink-cream);
}

    .ld-btn-ghost:hover {
        border-color: var(--teal);
        transform: translateY(-2px);
    }

.ld-paper .ld-btn-ghost,
.price-card .ld-btn-ghost {
    border-color: var(--ink-ghost-border);
    color: var(--ink-text);
}

.ld-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 900px) {
    .ld-hero {
        grid-template-columns: 1fr;
    }
}

/* Signature: printing receipt */
.receipt {
    background: #FBF9F2;
    color: #2B2A26;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1.5rem 1.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    clip-path: polygon(0% 0%,100% 0%,100% 96%,95% 100%,90% 96%,85% 100%,80% 96%,75% 100%, 70% 96%,65% 100%,60% 96%,55% 100%,50% 96%,45% 100%,40% 96%,35% 100%, 30% 96%,25% 100%,20% 96%,15% 100%,10% 96%,5% 100%,0% 96%);
    transform: rotate(-1.5deg);
}

.receipt-head {
    text-align: center;
    border-bottom: 1px dashed #B9B2A0;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

    .receipt-head b {
        font-family: var(--font-display);
        font-size: 1.05rem;
        letter-spacing: 0.02em;
    }

.receipt-line {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    opacity: 0;
    animation: rline 0.5s ease forwards;
}

    .receipt-line span:last-child {
        font-weight: 500;
    }

    .receipt-line:nth-child(1) {
        animation-delay: 0.2s;
    }

    .receipt-line:nth-child(2) {
        animation-delay: 0.5s;
    }

    .receipt-line:nth-child(3) {
        animation-delay: 0.8s;
    }

    .receipt-line:nth-child(4) {
        animation-delay: 1.1s;
    }

    .receipt-line:nth-child(5) {
        animation-delay: 1.4s;
    }

.receipt-foot {
    border-top: 1px dashed #B9B2A0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    opacity: 0;
    animation: rline 0.5s ease forwards 1.7s;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

@keyframes rline {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .receipt-line, .receipt-foot {
        animation: none;
        opacity: 1;
    }
}

.policy-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A453D;
    margin: 0.5rem 0 0;
}

/* Ledger rows for features */
.ledger {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}

.ledger-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
}

.ledger-code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--amber);
    font-weight: 500;
    padding-top: 0.2rem;
}

.ledger-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.ledger-desc {
    color: #56514A;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Platform stamps */
.stamp-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.stamp {
    border: 1px solid #3A4356;
    border-radius: 3px;
    padding: 0.6rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.platform-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.5rem;
    border-radius: 3px;
    border: 1px solid #3A4356;
    background: transparent;
    color: var(--ink-cream);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .platform-btn:hover,
    .platform-btn.active {
        border-color: var(--teal);
        background: rgba(31,138,112,0.15);
    }

/* Pricing cards */
.price-card {
    background: #FBF9F2;
    padding: 2rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    position: relative;
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
}

    .price-card:nth-child(2) {
        border-left-color: var(--amber);
    }

    .price-card::before {
        content: "";
        position: absolute;
        top: -1px;
        left: 0;
        right: 0;
        height: 4px;
        background: repeating-linear-gradient(90deg, var(--paper) 0 6px, transparent 6px 12px);
    }

.price-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.price-amount {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 500;
    color: var(--ink-text);
    margin-bottom: 1.25rem;
}

    .price-amount span {
        font-size: 0.85rem;
        color: var(--ink-muted-paper);
        font-weight: 400;
    }

.price-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: 0.92rem;
    color: #4A453D;
    flex: 1;
}

    .price-list li {
        padding: 0.4rem 0;
        border-bottom: 1px dashed var(--line);
    }

        .price-list li::before {
            content: "— ";
            color: var(--teal);
        }

.price-fine {
    font-size: 0.78rem;
    color: var(--ink-muted-paper);
    margin-top: 1rem;
    line-height: 1.5;
}

/* Auth pages (Login/Register/Forgot/Reset/AdminLogin) */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ink-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: #FBF9F2;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

    .auth-card h1 {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 1.7rem;
        color: var(--ink-text);
        margin: 0 0 1.5rem;
    }

    .auth-card .rz-form-field-label, .auth-card label {
        font-family: var(--font-body) !important;
    }

    .auth-card a {
        color: var(--teal);
        font-family: var(--font-body);
        font-size: 0.9rem;
    }

    .auth-card .rz-button.rz-primary, .auth-card button[type="submit"].rz-button {
        background: var(--teal) !important;
        border-color: var(--teal) !important;
        font-family: var(--font-body) !important;
        font-weight: 600 !important;
        color: #05231C !important;
    }

/* ===================== APP PANEL (Admin/Client) ===================== */

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--panel-bg);
}

.app-sidebar {
    width: 240px;
    background: var(--panel-sidebar);
    flex-shrink: 0;
    padding: 1.25rem 0;
    display: flex;
    flex-direction: column;
}

.app-brand {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: #fff;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1rem;
}

.app-header {
    background: var(--panel-card);
    border-bottom: 1px solid var(--panel-border);
    padding: 0.9rem 1.75rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

    /* Language switcher sits on the light app-header here, not the dark marketing header —
       needs dark-on-light colors instead of the default light-on-navy ones. */
    .app-header .lang-switcher-btn,
    .app-header .lang-switcher-sep {
        color: var(--panel-muted);
    }

        .app-header .lang-switcher-btn:hover {
            color: var(--panel-text);
        }

        .app-header .lang-switcher-btn.active {
            color: var(--teal);
        }

.app-user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: var(--panel-bg);
}

.app-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--panel-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
}

.app-user-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--panel-text);
    font-weight: 500;
}

.app-user-role {
    font-size: 0.72rem;
    color: var(--panel-muted);
}

.app-content {
    flex: 1;
    padding: 1.75rem 2rem;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: #9AA3B8;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    margin: 0.1rem 0;
}

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

.side-nav-item-active {
    color: #fff;
    border-left-color: var(--panel-accent);
    background: rgba(31,138,112,0.16);
}

.side-nav-item .rz-icon {
    font-size: 1.15rem;
}

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--panel-muted);
    font-weight: 500;
}

.stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--panel-text);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--panel-accent-soft);
    color: var(--panel-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.app-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}

.app-section-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--panel-text);
    margin: 0 0 1rem;
}

.app-content .rz-card, .app-content .rz-datatable, .app-content .rz-data-grid {
    border-radius: 10px !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04) !important;
}

.app-content .rz-button.rz-primary {
    background: var(--panel-accent) !important;
    border-color: var(--panel-accent) !important;
}

.ticket-list-item {
    transition: background 0.1s ease;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--panel-text);
    margin: 0 0 0.25rem;
}

.page-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--panel-muted);
    margin: 0;
}

.app-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--panel-muted);
    font-family: 'Inter', sans-serif;
}

    .app-empty .rz-icon {
        font-size: 2.5rem;
        opacity: 0.4;
        margin-bottom: 0.75rem;
    }

.app-content .rz-grid-table thead th {
    background: #FAFBFC !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.78rem !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--panel-muted) !important;
    font-weight: 600 !important;
}

.app-content .rz-grid-table tbody td {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.app-content .rz-grid-table tbody tr:hover {
    background: var(--panel-bg) !important;
}

.app-content .rz-dropdown {
    font-family: 'Inter', sans-serif !important;
}

    .app-content .rz-dropdown .rz-dropdown-panel-items,
    .app-content .rz-dropdown-panel {
        font-family: 'Inter', sans-serif !important;
    }

.file-upload-wrap input[type="file"] {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    max-width: 220px;
}

/* Language switcher (marketing + auth pages) */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.lang-switcher-sep {
    color: var(--ink-muted-navy);
}

.lang-switcher-btn {
    background: transparent;
    border: none;
    padding: 0.2rem 0.3rem;
    color: var(--ink-muted-navy);
    cursor: pointer;
    letter-spacing: 0.02em;
}

    .lang-switcher-btn:hover {
        color: var(--ink-cream);
    }

    .lang-switcher-btn.active {
        color: var(--teal);
        font-weight: 600;
    }

/* Ticket message image attachments + lightbox preview */
.ticket-msg-thumb {
    display: block;
    margin-top: 0.5rem;
    max-width: 160px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    cursor: zoom-in;
    object-fit: cover;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ticket-msg-thumb:hover {
    transform: scale(1.03);
    border-color: var(--panel-accent);
    box-shadow: 0 6px 16px -4px rgba(16, 24, 38, 0.25);
}

/* Composer row: attach button + text input + send button, kept aligned regardless of wrap */
.ticket-composer-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-composer-row .rz-textbox,
.ticket-composer-row input[type='text'] {
    flex: 1;
    min-width: 150px;
}

/* Hidden native file input under a styled icon button — avoids the bare OS-themed
   "Choose file / No file chosen" control clashing with the Radzen-styled controls around it. */
.image-attach-wrapper {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.image-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: var(--panel-card);
    color: var(--panel-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.image-attach-btn:hover {
    border-color: var(--panel-accent);
    color: var(--panel-accent);
    background: var(--panel-accent-soft);
}

.image-attach-btn.has-image {
    border-color: var(--panel-accent);
    color: var(--panel-accent);
    background: var(--panel-accent-soft);
}

.image-attach-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Selected-image preview card shown above the composer before sending */
.ticket-attach-preview {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Inter', sans-serif;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.5rem;
    animation: ticket-attach-in 0.15s ease;
}

.ticket-attach-preview-thumb {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--panel-border);
    flex-shrink: 0;
}

.ticket-attach-preview-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.ticket-attach-preview-name {
    font-size: 0.82rem;
    color: var(--panel-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-attach-preview-size {
    font-size: 0.72rem;
    color: var(--panel-muted);
}

@keyframes ticket-attach-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.image-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 28, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
    padding: 2rem;
    animation: ticket-lightbox-fade 0.15s ease;
}

.image-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    cursor: default;
    animation: ticket-lightbox-zoom 0.15s ease;
}

.image-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #EDEAE0;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

@keyframes ticket-lightbox-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ticket-lightbox-zoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}