/* Bespoke UI skin that overrides Bootstrap's default card / table / button /
   badge / list / pagination looks, so the app reads as a custom product. */

/* ---- Surfaces ---------------------------------------------------------- */
.card,
.app-hero {
    position: relative;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
        var(--app-surface);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(20px);
}

/* Gold hairline along the top edge — the product's signature accent. */
.card::after,
.app-hero::after {
    position: absolute;
    inset: 0 1.4rem auto;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(245, 196, 81, 0.65), transparent);
}

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

.app-hero {
    overflow: hidden;
}

.app-hero h1 {
    font-weight: 850;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
    border-radius: 999px;
    font-weight: 650;
    letter-spacing: 0.01em;
    padding-inline: 1.1rem;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    border-color: transparent;
    color: var(--app-primary-contrast);
    background: linear-gradient(135deg, var(--app-primary-soft), var(--app-primary-strong));
    box-shadow: 0 12px 30px rgba(245, 196, 81, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: var(--app-primary-contrast);
    background: linear-gradient(135deg, #fff0c2, var(--app-primary));
    box-shadow: 0 16px 38px rgba(245, 196, 81, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-outline-primary,
.btn-outline-secondary {
    border-color: var(--app-border-strong);
    color: var(--app-text);
    background: var(--app-surface-2);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:focus-visible,
.btn-outline-secondary:focus-visible {
    border-color: rgba(245, 196, 81, 0.65);
    color: var(--app-text-strong);
    background: rgba(245, 196, 81, 0.12);
}

/* ---- Form controls (also themes bare allauth inputs) ------------------- */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="date"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    line-height: 1.5;
    color: var(--app-text);
    background-color: rgba(8, 5, 20, 0.42);
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--app-primary);
    outline: none;
    color: var(--app-text);
    background-color: rgba(8, 5, 20, 0.6);
    box-shadow: 0 0 0 0.22rem rgba(245, 196, 81, 0.18);
}

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

/* ---- Tables: borderless "ticket" rows with dashed separators ----------- */
.table-responsive {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(20px);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    margin-bottom: 0;
    color: var(--app-text);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1.15rem;
    background-color: transparent;
    border-bottom: 1px dashed var(--app-border);
    box-shadow: none;
    color: inherit;
    vertical-align: middle;
}

.table > thead > tr > th {
    border-bottom: 1px solid var(--app-border-strong);
    color: var(--app-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.table > tbody > tr {
    transition: background 140ms ease;
}

.table > tbody > tr:last-child > * {
    border-bottom: none;
}

.table > tbody > tr:hover > * {
    background: rgba(245, 196, 81, 0.06);
}

/* Right-aligned cells usually hold money/figures. */
.table .text-end {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

/* ---- List groups as standalone rows ------------------------------------ */
.list-group {
    border-radius: var(--app-radius);
    gap: 0.5rem;
}

.list-group-item {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm) !important;
    padding: 0.9rem 1.15rem;
    color: var(--app-text);
    background: var(--app-surface);
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.list-group-item:hover {
    transform: translateX(2px);
    border-color: rgba(245, 196, 81, 0.4);
    background: rgba(245, 196, 81, 0.07);
}

/* ---- Alerts ------------------------------------------------------------ */
.alert {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    color: var(--app-text);
    background: var(--app-surface-2);
    box-shadow: 0 16px 48px rgba(6, 3, 20, 0.3);
    backdrop-filter: blur(12px);
}

.alert-success {
    color: #d8fbe9;
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(52, 211, 153, 0.12);
}

.alert-warning {
    color: #ffe7a6;
    border-color: rgba(245, 196, 81, 0.45);
    background: rgba(245, 196, 81, 0.12);
}

.alert-danger {
    color: #ffd7dd;
    border-color: rgba(251, 113, 133, 0.45);
    background: rgba(251, 113, 133, 0.12);
}

/* ---- Badges as tinted chips -------------------------------------------- */
.badge {
    padding: 0.42em 0.72em;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge.text-bg-primary {
    color: var(--app-primary-contrast) !important;
    background: linear-gradient(135deg, var(--app-primary-soft), var(--app-primary-strong)) !important;
}

.badge.text-bg-success {
    color: #052e1d !important;
    background: var(--app-win) !important;
}

.badge.text-bg-warning {
    color: var(--app-primary-contrast) !important;
    background: var(--app-primary) !important;
}

.badge.text-bg-info {
    color: #e7e3f7 !important;
    background: rgba(139, 92, 246, 0.85) !important;
}

.badge.text-bg-secondary {
    color: var(--app-text) !important;
    background: rgba(168, 159, 196, 0.22) !important;
}

.badge.text-bg-light {
    color: #1c1340 !important;
    background: #e8e3f7 !important;
}

/* ---- Pagination -------------------------------------------------------- */
.pagination {
    gap: 0.3rem;
}

.pagination .page-link {
    min-width: 2.3rem;
    text-align: center;
    border: 1px solid var(--app-border);
    border-radius: 0.7rem !important;
    color: var(--app-text);
    background: var(--app-surface);
}

.pagination .page-link:hover {
    color: var(--app-text-strong);
    background: rgba(245, 196, 81, 0.14);
}

.pagination .page-item.active .page-link {
    color: var(--app-primary-contrast);
    border-color: transparent;
    background: linear-gradient(135deg, var(--app-primary-soft), var(--app-primary-strong));
}

.pagination .page-item.disabled .page-link {
    color: var(--app-muted);
    background: transparent;
    opacity: 0.5;
}

/* ---- Page headers ------------------------------------------------------ */
.app-page-header {
    margin-bottom: 1.75rem;
}

.app-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(245, 196, 81, 0.4);
    border-radius: 999px;
    color: var(--app-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(245, 196, 81, 0.08);
}

/* ---- Home action cards ------------------------------------------------- */
.app-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.85rem;
}

.app-action-card {
    display: block;
    min-height: 100%;
    padding: 1.15rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    color: var(--app-text);
    font-weight: 650;
    text-decoration: none;
    background: var(--app-surface-2);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.app-action-card:hover,
.app-action-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(245, 196, 81, 0.55);
    color: var(--app-text-strong);
    background: rgba(245, 196, 81, 0.1);
}

.app-action-card small {
    display: block;
    margin-top: 0.4rem;
    color: var(--app-muted);
    font-weight: 500;
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 1.35rem !important;
    }

    .table > :not(caption) > * > * {
        padding: 0.7rem 0.85rem;
    }
}
