/* ==================================================================
   GLOBAL NEON THEME – CLIENT + RESELLER PANELS
   File: /app/public/style.css
   Accent: Cyan Neon
   ================================================================== */

/* ---------- CSS VARIABLES ---------- */
:root {
    --bg-body: #020617;
    --bg-elevated: #020617;
    --bg-elevated-soft: #020617;
    --border-soft: #1f2937;
    --border-strong: #22d3ee55;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;

    --accent: #22d3ee;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.16);

    --success: #22c55e;
    --success-soft: #16a34a;
    --danger: #ef4444;
    --danger-soft: #7f1d1d;

    --radius-lg: 14px;
    --radius-xl: 22px;

    --shadow-card: 0 24px 60px rgba(15, 23, 42, 0.9);
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.7);

    --transition-fast: 0.15s ease-out;
    --transition-med: 0.22s ease-out;
}

/* ---------- RESET / BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, #0b1120 0, #020617 40%, #000 100%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast), background var(--transition-fast);
}
a:hover {
    color: var(--accent-strong);
}

/* For pages that wrap content in these containers */
.res-container,
.client-wrapper {
    max-width: 1200px;
    margin: 24px auto 40px;
    padding: 0 18px 24px;
}

h1, h2, h3 {
    margin: 0 0 10px;
}

/* ==================================================================
   RESELLER TOP NAV (NEON)
   ================================================================== */

.res-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background:
        radial-gradient(circle at top left, #020617 0, #020617 55%, #000 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(18px);
}

.res-nav-left {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 18px;
}
.res-nav-left span {
    color: var(--accent);
}

.res-nav-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.res-nav-right a {
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 11px;
    border-radius: 999px;
    position: relative;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.res-nav-right a:hover {
    color: var(--accent);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
    transform: translateY(-1px);
}

.res-nav-right a.logout {
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.6);
    padding-inline: 14px;
}
.res-nav-right a.logout:hover {
    background: rgba(127, 29, 29, 0.85);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.7);
}

/* ==================================================================
   CLIENT TOP NAV (NEON)
   ================================================================== */

.client-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background:
        radial-gradient(circle at top left, #020617 0, #020617 55%, #000 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(18px);
}

.client-logo {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .04em;
}
.client-logo span {
    color: var(--accent);
}
.welcome {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.client-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.client-nav a {
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 11px;
    border-radius: 999px;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}
.client-nav a:hover {
    color: var(--accent);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
    transform: translateY(-1px);
}
.client-nav a.active {
    color: #e5e7eb;
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.28), rgba(15, 23, 42, 0.98));
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.6),
        0 0 20px rgba(34, 211, 238, 0.4);
}

/* ==================================================================
   CARDS
   ================================================================== */

.card {
    background:
        radial-gradient(circle at top left, #020617 0, #020617 50%, #000 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 18px;
}

.card h2,
.card h3 {
    margin-top: 0;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================================================================
   BUTTONS
   ================================================================== */

.btn,
.btn-sm,
.btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition:
        background var(--transition-med),
        box-shadow var(--transition-med),
        transform var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

/* Primary CTA */
.btn {
    padding: 9px 20px;
    background: linear-gradient(
        135deg,
        var(--success) 0%,
        #4ade80 45%,
        var(--success-soft) 100%
    );
    color: #022c22;
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.55);
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.75);
}

/* Secondary pill */
.btn-sm {
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-main);
    border: 1px solid var(--accent-soft);
    font-size: 13px;
}
.btn-sm:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.55);
}

/* Table actions */
.btn-table {
    padding: 4px 10px;
    margin-right: 4px;
    background: rgba(15, 23, 42, 0.94);
    color: var(--text-main);
    font-size: 12px;
    border: 1px solid rgba(31, 41, 55, 0.9);
}
.btn-table:hover {
    background: #111827;
}

/* Danger action */
.btn-table.danger {
    background: rgba(127, 29, 29, 0.95);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.7);
}
.btn-table.danger:hover {
    background: rgba(153, 27, 27, 0.98);
}

/* ==================================================================
   TABLES
   ================================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-main);
    background: transparent;
}

.table thead {
    background: rgba(15, 23, 42, 0.98);
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.82);
}
.table tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.72);
}

.table tr:hover td {
    background: rgba(30, 64, 175, 0.28);
}

/* ==================================================================
   FORMS / INPUTS
   ================================================================== */

.input,
select.input,
textarea.input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
    color: var(--text-main);
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

.input:focus,
select.input:focus,
textarea.input:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.65),
        0 0 24px rgba(34, 211, 238, 0.3);
}

textarea.input {
    resize: vertical;
    min-height: 90px;
}

label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================================================================
   STATUS PILLS
   ================================================================== */

.status-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(15, 23, 42, 0.95);
}

.status-active {
    background: #022c22;
    color: #6ee7b7;
}
.status-inactive {
    background: #111827;
    color: #f97373;
}
.status-expired {
    background: #3f1d1d;
    color: #fecaca;
}
.status-online {
    background: #16a34a;
    color: #bbf7d0;
}
.status-offline {
    background: #4b5563;
    color: #e5e7eb;
}

/* ==================================================================
   ALERTS / FLASH
   ================================================================== */

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 10px;
    background: var(--danger-soft);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.7);
}
.alert.success {
    background: #022c22;
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.75);
}

/* ==================================================================
   UTILITIES
   ================================================================== */

.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* ==================================================================
   RESPONSIVE ADJUSTMENTS
   ================================================================== */

@media (max-width: 900px) {
    .res-nav,
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-inline: 16px;
    }

    .res-nav-right,
    .client-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .res-container,
    .client-wrapper {
        padding-inline: 14px;
    }

    .card {
        padding-inline: 14px;
    }

    .table th,
    .table td {
        padding: 7px 6px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .res-nav-right,
    .client-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }
}

/* ==================================================================
   AUTH / LOGIN PAGES (USE WITH class="auth-body" ON BODY)
   ================================================================== */

.auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, #0ea5e9 0, #0f172a 35%, #020617 55%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
}

.auth-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 24px;
}

.auth-card {
    background:
        radial-gradient(circle at top, #020617 0, #020617 60%, #000 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15, 23, 42, 0.95);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.98);
    padding: 26px 26px 22px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.06em;
}
.auth-title span {
    color: var(--accent);
}

.auth-subtitle {
    font-size: 13px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.auth-card form .input {
    margin-bottom: 10px;
}

.auth-footer {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}
.auth-footer a {
    color: var(--accent);
}
