* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f172a; color: #e2e8f0; }

/* Login */
.login-wrap { max-width: 400px; margin: 100px auto; padding: 40px; background: #1e293b; border-radius: 16px; }
.login-wrap h1 { margin-bottom: 24px; color: #a29bfe; }
.login-wrap input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; border-radius: 8px; font-size: 14px; }
.login-wrap button { width: 100%; padding: 12px; background: #6c5ce7; color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0b1220; padding: 24px 0; flex-shrink: 0; }
.sidebar .logo { padding: 0 24px 24px; font-size: 18px; font-weight: 800; color: #a29bfe; }
.sidebar nav a { display: block; padding: 10px 24px; color: #94a3b8; text-decoration: none; font-size: 13px; border-left: 3px solid transparent; transition: all .15s; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(108,92,231,.15); color: #fff; border-left-color: #6c5ce7; }
.main { flex: 1; padding: 28px; overflow-y: auto; max-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { font-size: 20px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: #1e293b; padding: 16px; border-radius: 10px; }
.card .label { font-size: 10px; text-transform: uppercase; color: #64748b; font-weight: 600; margin-bottom: 4px; letter-spacing: .5px; }
.card .value { font-size: 24px; font-weight: 700; color: #fff; }
.card .value.money { color: #10b981; }
.card .value.warn { color: #f59e0b; }
.card .value.danger { color: #ef4444; }

/* Tables */
.table { width: 100%; background: #1e293b; border-radius: 10px; overflow: hidden; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid #253142; }
.table th { background: #0b1220; text-transform: uppercase; color: #64748b; font-size: 10px; font-weight: 600; letter-spacing: .5px; }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable:hover td { background: #253142; cursor: pointer; }
.table a.link { color: #a29bfe; text-decoration: none; }
.table a.link:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge.activo { background: rgba(16,185,129,.2); color: #34d399; }
.badge.pendiente, .badge.pausado { background: rgba(251,146,60,.2); color: #fdba74; }
.badge.cancelado { background: rgba(239,68,68,.2); color: #fca5a5; }
.badge.bloqueado { background: rgba(239,68,68,.15); color: #fca5a5; }

/* Buttons */
.btn { padding: 10px 16px; background: #6c5ce7; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-success { background: #10b981; }
.btn-danger { background: #ef4444; }

/* Filters */
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 8px 12px; background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; font-size: 13px; }
.filters input { min-width: 200px; }
.filters label { font-size: 13px; color: #94a3b8; display: flex; align-items: center; gap: 6px; }

/* Panels */
.panel { background: #1e293b; padding: 20px; border-radius: 10px; margin-bottom: 14px; }
.panel h2 { margin-bottom: 14px; font-size: 15px; color: #fff; }

/* Detail views */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #253142; font-size: 13px; }
.detail-row .label { color: #64748b; font-weight: 600; text-transform: uppercase; font-size: 10px; }
.detail-row:last-child { border-bottom: none; }

/* Config grid */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* Fields */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #94a3b8; }
.field input, .field select, .field textarea { width: 100%; padding: 10px; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; font-size: 13px; font-family: inherit; }

/* Utils */
.loading { color: #64748b; font-style: italic; }
.muted { color: #64748b; font-size: 12px; margin-top: 8px; }
code { background: #0f172a; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #a29bfe; }
small { color: #64748b; }
