/* public/styles.css */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #050712;
    --bg-card: #0d1020;
    --border: #22263d;
    --accent: #3b82f6;
    --accent-soft: rgba(59,130,246,0.15);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --error: #f97373;
    --success: #22c55e;
    --radius: 10px;
    --shadow-soft: 0 18px 45px rgba(0,0,0,0.5);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    color: var(--text);
    font-family: var(--font-sans);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15,23,42,0.9), rgba(15,23,42,0.4) 60%, transparent);
    border-bottom: 1px solid rgba(148,163,184,0.18);
}
.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 18px;
    color: #e5e7eb;
}
.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-user {
    font-size: 14px;
    color: var(--muted);
}

.main {
    padding: 32px 0 48px;
}
.hero {
    display: grid;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
}
.hero-text h1 {
    font-size: clamp(28px, 4vw, 38px);
    margin: 0 0 8px;
}
.hero-subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 42rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.hero-note {
    font-size: 13px;
    color: var(--muted);
}
.hero-panel {
    background: radial-gradient(circle at top left, #1f2937, #020617);
    border-radius: 16px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: var(--shadow-soft);
}
.hero-panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
}
.steps {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14px;
}

.card {
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: 18px;
    padding: 16px 18px 18px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
}
.card h1, .card h2, .card h3 {
    margin-top: 0;
}

.features-grid {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}
.feature {
    padding: 10px 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.24);
    background: radial-gradient(circle at top left, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
}
.feature h3 {
    margin: 0 0 4px;
    font-size: 15px;
}
.feature p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}
.field span {
    color: var(--muted);
}
input[type="email"],
input[type="password"],
select,
textarea {
    background: #020617;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,0.4);
    padding: 8px 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
textarea.mono {
    font-family: var(--mono);
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    background: linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.6));
    color: #e5e7eb;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
}
.btn.primary {
    border-color: rgba(59,130,246,0.75);
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
    box-shadow: 0 12px 30px rgba(37,99,235,0.35);
}
.btn.ghost {
    background: transparent;
}
.btn.small {
    padding: 5px 10px;
    font-size: 12px;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15,23,42,0.6);
}
.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.link {
    font-size: 13px;
}

.alert {
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    margin: 8px 0;
}
.alert-error {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.5);
    color: #fecaca;
}
.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.55);
    color: #bbf7d0;
}
.warning {
    font-size: 12px;
    color: #fed7aa;
}

.keys-grid {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}
.muted {
    color: var(--muted);
    font-size: 13px;
}

/* Table */
.table-wrap {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th,
.table td {
    border-bottom: 1px solid rgba(31,41,55,0.9);
    padding: 6px 4px;
}
.table th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
}

/* Auth pages */
.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 40px;
}
.auth-card {
    width: 100%;
    max-width: 360px;
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: 18px;
    padding: 18px 18px 18px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: var(--shadow-soft);
}
.auth-card h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}
.auth-switch {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(148,163,184,0.2);
    padding: 10px 0 16px;
    font-size: 12px;
    color: var(--muted);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-nav {
    display: flex;
    gap: 10px;
}

/* Responsive */
@media (min-width: 768px) {
    .hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .keys-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .topbar-inner {
        padding-inline: 12px;
    }
    .container {
        padding-inline: 12px;
    }
}
