body { font-size: 0.95rem; }
.list-group-item-action.active, .list-group-item-action:hover { background-color: #f6f8fa; }
.card { border: 0; border-radius: 1rem; }
.form-shell {
    max-width: 1080px;
}
.form-shell .card-body {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8), rgba(255, 255, 255, 0.98));
}
.form-shell .form-label {
    margin-bottom: 0.45rem;
    color: #1f2937;
}
.form-shell .form-control,
.form-shell .form-select {
    min-height: 2.85rem;
    border-radius: 0.85rem;
    border-color: #d7deea;
    box-shadow: none;
}
.form-shell textarea.form-control {
    min-height: 8rem;
}
.form-shell .form-control:focus,
.form-shell .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}
.form-shell .form-text {
    margin-top: 0.35rem;
}
.form-check-card {
    padding: 0.9rem 1rem;
    border: 1px solid #d7deea;
    border-radius: 0.85rem;
    background: #f8fafc;
}
.inline-form-panel {
    padding: 1rem 1rem 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid #d7deea;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
}
.inline-form-panel .form-label {
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #1f2937;
}
.inline-form-panel .form-control,
.inline-form-panel .form-select {
    min-height: 2.75rem;
    border-radius: 0.85rem;
    border-color: #d7deea;
    box-shadow: none;
}
.inline-form-panel .form-control:focus,
.inline-form-panel .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}
.inline-form-panel .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.inline-form-panel .errorlist,
.inline-form-panel .text-danger {
    margin: 0;
    list-style: none;
}
.icon-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.icon-label i {
    line-height: 1;
}
.action-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}
.dashboard-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.dashboard-card-link .card,
.dashboard-card-link .rounded {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dashboard-card-link:hover,
.dashboard-card-link:focus {
    color: inherit;
    text-decoration: none;
}
.dashboard-card-link:hover .card,
.dashboard-card-link:focus .card,
.dashboard-card-link:hover .rounded,
.dashboard-card-link:focus .rounded {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
}
.dashboard-card-link:focus-visible {
    outline: 0;
}
.dashboard-card-link:focus-visible .card,
.dashboard-card-link:focus-visible .rounded {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}
.navbar .btn,
.navbar .small,
.navbar-brand { white-space: nowrap; }
.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    --bs-table-bg: transparent;
}
.table-responsive,
.card .table,
.card-body > .table,
main table.table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table th,
.table td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.9rem 1rem;
    border-color: #e8edf5;
}
.table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.table tbody tr {
    background: rgba(255, 255, 255, 0.9);
    transition: background-color 0.16s ease;
}
.table tbody tr:hover {
    background: #f8fbff;
}
.card .table,
.card-body > .table,
main table.table {
    border-radius: 0.9rem;
    overflow: hidden;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.table-card {
    overflow: hidden;
}
.variant-sell-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #d7deea;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 1));
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.04);
}
.variant-sell-card.is-unavailable {
    opacity: 0.82;
    background: linear-gradient(180deg, rgba(252, 242, 242, 0.92), rgba(255, 255, 255, 1));
}
.auth-shell {
    min-height: calc(100vh - 8rem);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card {
    width: 100%;
    max-width: 34rem;
}
.logout-icon {
    width: 4.5rem;
    height: 4.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.15), rgba(239, 68, 68, 0.08));
    color: #dc2626;
    font-size: 1.8rem;
}
.logout-icon.is-success {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.16), rgba(34, 197, 94, 0.08));
    color: #16a34a;
}

@media (max-width: 991.98px) {
    .card { border-radius: 0.85rem; }
    .navbar .container-fluid {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    body { font-size: 0.92rem; }
    main {
        min-width: 0;
    }
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .page-header .btn,
    .page-header-actions .btn {
        width: 100%;
    }
    .alert {
        margin-bottom: 0.75rem;
    }
    .card-body {
        padding: 1rem;
    }
    .display-6 {
        font-size: 1.75rem;
    }
    .form-shell .card-body {
        padding: 1rem;
    }
    .table th,
    .table td {
        padding: 0.75rem 0.85rem;
    }
    .table-mobile-stack thead {
        display: none;
    }
    .table-mobile-stack,
    .table-mobile-stack tbody,
    .table-mobile-stack tr,
    .table-mobile-stack td {
        display: block;
        width: 100%;
    }
    .table-mobile-stack tr {
        margin-bottom: 0.9rem;
        border: 1px solid #e8edf5;
        border-radius: 0.9rem;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.04);
    }
    .table-mobile-stack td {
        white-space: normal;
        text-align: right;
        padding-left: 47%;
        position: relative;
        border-bottom: 1px solid #eef2f7;
        min-height: 3rem;
    }
    .table-mobile-stack td:last-child {
        border-bottom: 0;
    }
    .table-mobile-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.85rem;
        top: 0.75rem;
        width: 40%;
        color: #667085;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        text-align: left;
    }
    .table-mobile-stack td[data-label="Actions"] {
        padding-left: 0.85rem;
        text-align: left;
    }
    .table-mobile-stack td[data-label="Actions"]::before {
        position: static;
        display: block;
        width: auto;
        margin-bottom: 0.5rem;
    }
    .table-mobile-stack td[data-label="Actions"] .action-links,
    .table-mobile-stack td[data-label="Actions"] .d-flex {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }
}
