/* ============================================================
   PWH 2026 - design tokens y utilidades sobre Tailwind (CDN).
   Replica los tokens del landing publico /index.php
   para mantener coherencia visual.
   ============================================================ */

:root {
    --bg:           #ffffff;
    --bg-alt:       #fafafa;
    --bg-subtle:    #f4f4f5;
    --text:         #09090b;
    --text-muted:   #71717a;
    --text-soft:    #a1a1aa;
    --border:       #e4e4e7;
    --border-strong:#d4d4d8;

    /* Marca PWH (azul petroleo) */
    --brand:        #165678;
    --brand-dark:   #0f3e57;
    --brand-deeper: #0a2d40;
    --brand-light:  #2a7ea0;
    --brand-soft:   #e5eff5;

    --success:      #16a34a;
    --warning:      #f59e0b;
    --danger:       #dc2626;

    --radius-lg:    16px;
    --radius:       12px;
    --radius-sm:    8px;

    --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg:    0 10px 32px rgba(0,0,0,0.08);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-alt);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Botones primarios (no dependen de Tailwind) */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: background .15s ease, transform .1s ease, border-color .15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-subtle); }

/* Campos de formulario */
.field {
    display: flex; flex-direction: column; gap: 6px;
}
.field label {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}
.field input, .field select, .field textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22,86,120,.15);
}

/* Alertas */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.alert-info {
    background: var(--brand-soft);
    border-color: #c5dde8;
    color: var(--brand-dark);
}

/* Sidebar admin */
.sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid var(--border);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar nav { padding: 12px 8px; flex: 1; }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.sidebar nav a:hover { background: var(--bg-subtle); color: var(--text); }
.sidebar nav a.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 600;
}
.sidebar nav .nav-section {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 14px 12px 6px;
}

/* Layout principal */
.shell { display: flex; min-height: 100vh; }
.main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.content { padding: 28px 32px; flex: 1; }

/* Tabla de listado (sinrenovar, dominios activos, etc.) */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table thead { background: var(--bg-subtle); }
.data-table th, .data-table td {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .04em;
}
.data-table tbody tr:hover { background: var(--bg-alt); }

/* Badge / chip para servidor */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--text);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
