/* Base reset */
:root {
    color-scheme: light dark;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, #1e293b 0%, #0f172a 35%, #020617 100%);
    color: #f8fafc;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.app {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 55%), radial-gradient(circle at bottom right, rgba(14, 116, 144, 0.18), transparent 60%), linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
}

.sidebar {
    padding: 3rem 2.5rem;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.75));
    box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.15);
}

.sidebar__brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar__brand span {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.brand__title {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
}

.sidebar__nav {
    display: grid;
    gap: 0.65rem;
}

.sidebar__link {
    padding: 0.75rem 0.85rem;
    border-radius: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    color: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(8px);
}

.sidebar__link:hover,
.sidebar__link--active {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 15px 25px -20px rgba(37, 99, 235, 0.65);
}

.sidebar__logout {
    margin-top: auto;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button--primary {
    background: linear-gradient(120deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.6);
}

.button--ghost {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: rgba(248, 250, 252, 0.85);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -15px rgba(37, 99, 235, 0.7);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 3rem 3.5rem;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.85));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.card {
    background: rgba(15, 23, 42, 0.65);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 35px 65px -45px rgba(8, 47, 73, 0.7);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card__title {
    font-size: 1.45rem;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    text-align: left;
    font-size: 0.95rem;
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.12);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--superadmin {
    background: rgba(234, 179, 8, 0.22);
    color: #facc15;
}

.badge--admin {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge--user {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.95rem;
    font-weight: 500;
}

.alert--success {
    background: rgba(16, 185, 129, 0.18);
    color: #bbf7d0;
}

.alert--error {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

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

.form-field label {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.9);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="url"],
.form-field select {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.95rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.55);
    color: #f8fafc;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
    outline: none;
    background: rgba(15, 23, 42, 0.85);
}

.table--compact th,
.table--compact td {
    padding: 0.6rem 0.65rem;
}

.dashboard__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.95), rgba(15, 118, 110, 0.85));
    color: #f8fafc;
    box-shadow: 0 25px 55px -35px rgba(15, 118, 110, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.stat-card__value {
    font-size: 1.9rem;
    font-weight: 700;
    margin-top: 0.6rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 999;
}

.modal__dialog {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    width: min(580px, 100%);
    box-shadow: 0 40px 80px -45px rgba(15, 23, 42, 0.55);
}

@media (max-width: 960px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .content {
        padding: 1.5rem;
    }
}
.link-slug {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.85rem;
    padding: 0.6rem 0.75rem;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.link-slug__url {
    color: #f8fafc;
    font-weight: 600;
    word-break: break-all;
}

.link-slug__copy {
    min-width: 96px;
}

.button--glass {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #f8fafc;
    box-shadow: 0 12px 24px -18px rgba(37, 99, 235, 0.55);
}

.button--glass:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #ffffff;
}

.button--glass.danger {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.button--glass.danger:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #ffffff;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-buttons form {
    margin: 0;
}
.button--glass.success {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.55);
    color: #bbf7d0;
}
.howto {
    display: grid;
    gap: 2rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.howto h3 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    color: #f8fafc;
}

.howto ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.35rem;
}

.howto section {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 18px 32px -28px rgba(15, 118, 110, 0.6);
}
