:root {
    --primary: #1f6feb;
    --primary-dark: #0d3a8c;
    --background: #f5f7fb;
    --text: #1b1f24;
    --muted: #6a737d;
    --border: #d0d7de;
    --success: #1a7f37;
    --danger: #d1242f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Tajawal", "Segoe UI", sans-serif;
    background-color: var(--background);
    color: var(--text);
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 1.5rem 0;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top-bar {
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
}

.brand {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-inline-start: 1rem;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--primary);
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.button {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.35rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.button--primary {
    background-color: var(--primary);
    color: #fff;
}

.button--ghost {
    border-color: var(--border);
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

.card {
    background-color: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    gap: 1rem;
    margin-block: 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat {
    background-color: rgba(31, 111, 235, 0.07);
    border-radius: 16px;
    padding: 1rem;
}

.stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.stat strong {
    font-size: 1.6rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
}

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

th,
td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
}

th {
    background-color: rgba(15, 23, 42, 0.04);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background-color: rgba(31, 111, 235, 0.15);
    color: var(--primary-dark);
}

.badge--success {
    background-color: rgba(26, 127, 55, 0.12);
    color: var(--success);
}

.badge--danger {
    background-color: rgba(209, 36, 47, 0.12);
    color: var(--danger);
}

.wallet-pass-entry {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background-color: rgba(15, 23, 42, 0.02);
}

.wallet-pass-entry__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 180px;
}

.wallet-pass-entry__serial {
    font-weight: 600;
    margin: 0;
}

.wallet-pass-qr {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.wallet-pass-qr canvas {
    width: 100% !important;
    height: auto !important;
}

.wallet-pass-qr__caption {
    text-align: center;
}

.messages {
    margin-top: 1rem;
}

.alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: rgba(31, 111, 235, 0.1);
    color: var(--primary-dark);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert--success {
    background-color: rgba(26, 127, 55, 0.1);
    color: var(--success);
}

.alert--error {
    background-color: rgba(209, 36, 47, 0.1);
    color: var(--danger);
}

.alert--hide {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

form {
    background-color: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: grid;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: inline-block;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.search-input {
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    background-color: transparent;
    text-align: center;
    color: var(--muted);
}

