:root {
    --app-bg: #f2f5ff;
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-border: rgba(255, 255, 255, 0.7);
    --nav-bg: rgba(15, 23, 42, 0.88);
    --text-main: #0f172a;
    --text-soft: #64748b;
    --primary: #4f46e5;
    --primary-2: #7c3aed;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.2), transparent 35%),
        radial-gradient(circle at 85% 12%, rgba(168, 85, 247, 0.16), transparent 36%),
        linear-gradient(180deg, #f7f9ff 0%, var(--app-bg) 60%, #eef2ff 100%);
}

.app-shell {
    min-height: 100vh;
}

.app-navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 99px;
    background: linear-gradient(135deg, #22d3ee, #818cf8, #f472b6);
    box-shadow: 0 0 0 6px rgba(129, 140, 248, 0.18);
}

.navbar-brand {
    letter-spacing: 0.2px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    border-radius: 0.6rem;
    padding: 0.5rem 0.75rem !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
}

.app-alert {
    border: 0;
    border-radius: 0.9rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.card {
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    border-radius: 1.1rem;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
}

.card h1,
.card h2,
.card h3,
.card h4 {
    letter-spacing: -0.02em;
}

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

.btn {
    border-radius: 0.8rem;
    font-weight: 600;
    border: 0;
    transition: transform 0.18s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.btn-outline-dark {
    border: 1px solid rgba(15, 23, 42, 0.2);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #334155);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
}

.big-btn {
    padding: 0.88rem 1rem;
    font-weight: 700;
    border-radius: 0.85rem;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.72rem 0.85rem;
    background: rgba(255, 255, 255, 0.92);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    color: #334155;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.table td {
    border-color: rgba(148, 163, 184, 0.18);
    vertical-align: middle;
}

.badge {
    border-radius: 99px;
    padding: 0.45em 0.75em;
}

.qr-box {
    max-width: 280px;
    margin: 0 auto;
}

.qr-box img {
    width: 100%;
    border-radius: 0.9rem;
    border: 1px solid #e9ecef;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.scanner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#reader {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.table-card {
    overflow-x: auto;
}

.app-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        border-radius: 1rem;
    }

    .display-6 {
        font-size: calc(1.25rem + 2.2vw);
    }
}
