@charset "UTF-8";



:root {
    --color-nobackground: #f5f7fb;
    --color-background: #f5f7fb;
    --color-surface: #ffffff;
    --color-surface-strong: #eef2f7;
    --color-border: #d7dde5;
    --color-primary: #0b3b68;
    --color-primary-strong: #0f4f86;
    --color-on-primary: #ffffff;
    --color-secondary: #1f6f8b;
    --color-accent: #2b9ad0;
    --color-text: #1f2937;
    --color-text-muted: #5b6b7a;
    --color-success: #118c4f;
    /* Warning (Yellow) */
    --color-warning: #f2c200;
    --color-warning-strong: #d9ad00;
    --color-on-warning: #111827;
    /* Attention (Orange) */
    --color-attention: #f97316;
    --color-attention-strong: #ea580c;
    --color-on-attention: #ffffff;
    /* Destructive (Red) */
    --color-danger: #c0353d;
    --color-danger-strong: #a42d33;
    --color-on-danger: #ffffff;
    --color-info: #0f7fbf;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 12px rgba(12, 21, 36, 0.06);
    --shadow-md: 0 10px 30px rgba(12, 21, 36, 0.12);
    --line-height: 1.6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    line-height: var(--line-height);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Allow inverse sections (heroes, dark banners) to control heading color */
.hl-inverse h1,
.hl-inverse h2,
.hl-inverse h3,
.hl-inverse h4,
.hl-inverse h5,
.hl-inverse h6 {
    color: inherit;
}

/* Inverse section default text color */
.hl-inverse h1 {
    color: rgba(255, 255, 255, 0.9);
}

.hl-inverse h2 {
    color: rgba(210, 210, 210, 0.9);
}

.hl-inverse h3 {
    color: rgba(180, 180, 180, 0.9);
}

p {
    margin: 0;
    color: var(--color-text-muted);
}

a:not(.hl-btn) {
    color: var(--color-primary);
    text-decoration: none;
}

    a:not(.hl-btn):hover {
        color: var(--color-primary-strong);
        text-decoration: underline;
    }


.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--color-surface-strong);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.section {
    margin-top: 1.25rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.section-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text);
}

.hl-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .hl-table thead {
        background: var(--color-primary);
        color: var(--color-surface);
    }

    .hl-table th, .hl-table td {
        padding: 0.9rem 1rem;
        text-align: left;
        border-bottom: 1px solid var(--color-border);
        font-size: 0.95rem;
    }

    .hl-table tbody tr:hover {
        background: var(--color-surface-strong);
    }

    .hl-table tbody tr:last-child td {
        border-bottom: none;
    }

    /* HlDataTable: Actions cell layout (do not apply flex to <td>) */
    .hl-table td[data-hl-cell="actions"] {
        white-space: nowrap;
    }

        .hl-table td[data-hl-cell="actions"] > [data-hl-actions] {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem; /* matches your padding scale */
        }

        .hl-table td[data-hl-cell="actions"] > [data-hl-actions] {
            justify-content: flex-end;
            width: 100%;
        }




.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

    .badge.success {
        background: rgba(17, 140, 79, 0.1);
        color: var(--color-success);
    }

    .badge.warning {
        background: rgba(201, 115, 17, 0.12);
        color: var(--color-warning);
    }

    .badge.danger {
        background: rgba(192, 53, 61, 0.12);
        color: var(--color-danger);
    }

    .badge.info {
        background: rgba(15, 127, 191, 0.12);
        color: var(--color-info);
    }

    .badge.neutral {
        background: rgba(31, 111, 139, 0.1);
        color: var(--color-secondary);
    }

    .badge.default {
        background: rgba(91, 107, 122, 0.12);
        color: var(--color-text-muted);
    }

    .badge.refunded {
        background: rgba(139, 92, 246, 0.12);
        color: #7c3aed;
    }

.map-placeholder {
    height: 260px;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: repeating-linear-gradient( 45deg, rgba(11, 59, 104, 0.03), rgba(11, 59, 104, 0.03) 10px, rgba(31, 111, 139, 0.05) 10px, rgba(31, 111, 139, 0.05) 20px );
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    font-weight: 600;
}

.placeholder-content {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.shadowed {
    box-shadow: var(--shadow-md);
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.muted {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.grid-two {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-card {
    padding: 1.25rem;
}

/* NOTE: .filter-select is defined in app.css (max-width: 240px) */

.form-hint {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   Impersonation Banner
   ========================================== */
.impersonation-banner {
    background: #f59e0b; /* Professional amber/warning color - matches test expectations */
    color: var(--color-text);
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid #d97706;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

.impersonation-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.impersonation-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.impersonation-text {
    flex: 1;
    font-size: 0.95rem;
}

    .impersonation-text strong {
        font-weight: 700;
        margin-right: 0.5rem;
    }

.impersonation-banner .button {
    background: white;
    color: #92400e; /* Dark amber for contrast */
    border: 1px solid #d97706;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

    .impersonation-banner .button:hover {
        background: #fffbeb; /* Light amber tint */
        border-color: #b45309;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: auto !important;
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 90vh;
    overflow: auto;
    width: 100%;
    margin: 1rem;
    position: relative !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 600;
    }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
}

.list-item {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: background 0.15s;
}

    .list-item:hover {
        background: var(--color-surface-strong);
    }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

    .status-badge.status-draft {
        background: rgba(15, 127, 191, 0.1);
        color: var(--color-info);
    }

    .status-badge.status-active {
        background: rgba(17, 140, 79, 0.1);
        color: var(--color-success);
    }

    .status-badge.status-expired {
        background: rgba(192, 53, 61, 0.1);
        color: var(--color-danger);
    }

    .status-badge.status-paid {
        background: rgba(17, 140, 79, 0.1);
        color: var(--color-success);
    }

    .status-badge.status-overdue {
        background: rgba(192, 53, 61, 0.12);
        color: var(--color-danger);
    }

    .status-badge.status-void {
        background: rgba(192, 53, 61, 0.12);
        color: var(--color-danger);
    }

    .status-badge.status-issued {
        background: rgba(15, 127, 191, 0.12);
        color: var(--color-info);
    }

    .status-badge.status-refunded {
        background: rgba(139, 92, 246, 0.12);
        color: #7c3aed;
    }

    .status-badge.status-open {
        background: rgba(15, 127, 191, 0.12);
        color: var(--color-info);
    }

    .status-badge.status-canceled {
        background: rgba(192, 53, 61, 0.12);
        color: var(--color-danger);
    }

    .status-badge.status-succeeded {
        background: rgba(17, 140, 79, 0.1);
        color: var(--color-success);
    }

    .status-badge.status-pending {
        background: rgba(201, 115, 17, 0.12);
        color: var(--color-warning);
    }




/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

    .form-section:last-child {
        margin-bottom: 0;
    }

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

/* Form Card Container */
.form-card {
    padding: 2rem;
    max-width: 900px;
    margin: 1.25rem auto 0;
}

@media (max-width: 768px) {
    .form-card {
        padding: 1.25rem;
    }
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Form Field Container */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Form Labels */
.form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

    .form-label .required {
        color: var(--color-danger);
        margin-left: 0.25rem;
    }

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease-in-out;
}

    .form-input:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(11, 59, 104, 0.1);
    }

    .form-input:disabled {
        background: var(--color-surface-strong);
        color: var(--color-text-muted);
        cursor: not-allowed;
        opacity: 0.7;
    }

/* Input Group (for prefix/suffix) */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    pointer-events: none;
}

.input-group .form-input {
    padding-left: 2rem;
}

/* Form Actions (button container) */
.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .form-actions button,
        .form-actions .btn {
            width: 100%;
        }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn.primary {
        background: var(--color-primary);
        color: var(--color-surface);
        border-color: var(--color-primary);
        box-shadow: var(--shadow-sm);
    }

        .btn.primary:hover:not(:disabled) {
            background: var(--color-primary-strong);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

    .btn.ghost {
        background: var(--color-surface);
        color: var(--color-text);
        border-color: var(--color-border);
    }

        .btn.ghost:hover:not(:disabled) {
            background: var(--color-surface-strong);
            border-color: var(--color-primary);
        }

/* Validation Styles */
.field-validation-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.validation-errors {
    background: rgba(192, 53, 61, 0.1);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

    .validation-errors ul {
        margin: 0;
        padding-left: 1.25rem;
        color: var(--color-danger);
    }
