*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(0, 216, 255, 0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(255, 46, 164, 0.1), transparent 40%),
                #050910;
    color: #e9f0ff;
}

a {
    color: #4dd0ff;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(420px, 100%);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 600;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand__logo {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 204, 255, 0.35), 0 0 0 3px rgba(255, 46, 164, 0.15);
}

.brand__tagline {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7ee0ff;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(77, 208, 255, 0.3);
    background: rgba(8, 13, 26, 0.7);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(77, 208, 255, 0.18), rgba(255, 46, 164, 0.18));
    box-shadow: 0 10px 22px rgba(0, 204, 255, 0.12);
}

.nav-link.active {
    background: linear-gradient(135deg, #00c2ff, #ff2ea4);
    color: #050910;
    box-shadow: 0 10px 22px rgba(0, 194, 255, 0.35), 0 0 0 2px rgba(255, 46, 164, 0.2);
}

.nav-logout {
    margin: 0;
    display: inline-flex;
}

.card {
    background: linear-gradient(145deg, rgba(6, 12, 24, 0.9), rgba(9, 17, 33, 0.8));
    border: 1px solid rgba(77, 208, 255, 0.22);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 46, 164, 0.08);
}

.card h2 {
    margin-top: 0;
    font-size: 1.3rem;
}

.form-grid {
    display: grid;
    gap: 16px;
    max-width: 320px;
}

label {
    display: grid;
    font-size: 0.95rem;
    gap: 6px;
}

input[type="text"],
input[type="password"],
input[type="url"] {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(77, 208, 255, 0.35);
    background: rgba(8, 13, 26, 0.9);
    color: inherit;
}

select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.9);
    color: inherit;
}

input:focus {
    outline: 2px solid #ff2ea4;
    outline-offset: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #00c2ff, #ff2ea4);
    color: #050910;
    box-shadow: 0 10px 22px rgba(0, 194, 255, 0.3);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(77, 208, 255, 0.35);
    color: inherit;
}

.btn-link {
    background: none;
    border: none;
    color: #4dd0ff;
    padding: 0;
}

.btn:active {
    transform: translateY(1px);
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin: 0 0 16px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #bbf7d0;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.8);
    background: rgba(8, 13, 26, 0.5);
}

.table input {
    width: 100%;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.actions .grow {
    flex: 1 1 auto;
}

.muted {
    color: rgba(226, 232, 240, 0.6);
    font-size: 0.85rem;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.dash-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(77, 208, 255, 0.25);
    background: linear-gradient(145deg, rgba(8, 13, 26, 0.8), rgba(10, 18, 36, 0.7));
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 194, 255, 0.15), 0 0 0 1px rgba(255, 46, 164, 0.12);
}

.dash-card__title {
    font-weight: 600;
    font-size: 1rem;
}

.dash-card__count {
    font-size: 1.8rem;
    font-weight: 700;
}

.dash-card__hint {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.7);
}

.sync-meta {
    margin-top: -8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.sync-log {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sync-log span {
    display: block;
}

.sync-log .status-updated {
    color: #34d399;
}

.sync-log .status-unchanged {
    color: rgba(226, 232, 240, 0.6);
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.form-inline input,
.form-inline select {
    min-width: 140px;
}

.form-inline .btn {
    flex: 0 0 auto;
}

.users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.max-360 {
    max-width: 360px;
}

.auth-body {
    background: radial-gradient(circle at 20% 20%, rgba(0, 216, 255, 0.12), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(255, 46, 164, 0.18), transparent 40%),
                #050910;
}

.auth-card {
    background: linear-gradient(145deg, rgba(8, 13, 26, 0.92), rgba(10, 18, 36, 0.85));
    border: 1px solid rgba(77, 208, 255, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 46, 164, 0.12);
    border-radius: 18px;
    padding: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.auth-brand img {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 204, 255, 0.35), 0 0 0 3px rgba(255, 46, 164, 0.15);
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav {
        width: 100%;
        justify-content: stretch;
    }

    .nav-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .nav-logout {
        width: 100%;
    }

    .nav-logout .btn {
        width: 100%;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .form-inline input,
    .form-inline select {
        width: 100%;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions .grow {
        display: none;
    }

    .users-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
