* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #0f1220; color: #e2e8f0; }
a { color: #a855f7; text-decoration: none; }

/* Layout */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; background: #161a2e; border-right: 1px solid #252a45; padding-top: 16px; overflow-y: auto; }
.sidebar .brand { padding: 14px 16px 12px; display: flex; align-items: center; justify-content: center; }
.sidebar .brand img { width: 100%; max-width: 190px; height: auto; }
.sidebar .brand span { font-weight: 700; font-size: 16px; color: white; }
.sidebar a.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #94a3b8; transition: all .15s; }
.sidebar a.nav-item:hover { background: #1d2340; color: white; }
.sidebar a.nav-item.active { background: #241d38; color: #a855f7; border-right: 3px solid #a855f7; }

.main { margin-left: 240px; padding: 24px; min-height: 100vh; }
.page-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-title h1 { font-size: 22px; color: white; }

/* Cards e tabelas */
.card { background: #161a2e; border: 1px solid #252a45; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; color: #64748b; border-bottom: 1px solid #252a45; }
td { padding: 10px 12px; border-bottom: 1px solid #1d2340; font-size: 14px; }
tr:hover td { background: #1a2038; }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #7c3aed; color: white; }
.btn-success { background: #16a34a; color: white; }
.btn-danger { background: #dc2626; color: white; }
.btn-warning { background: #d97706; color: white; }
.btn-outline { background: transparent; border: 1px solid #37415e; color: #94a3b8; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Formulários */
label { display: block; margin-bottom: 6px; color: #94a3b8; font-size: 13px; }
input, select, textarea { width: 100%; padding: 10px 14px; background: #1a2038; border: 1px solid #252a45; border-radius: 8px; color: #e2e8f0; font-size: 14px; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Badges */
.badge { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge-active { background: #14532d; color: #4ade80; }
.badge-suspended { background: #7f1d1d; color: #fca5a5; }
.badge-creating { background: #1e3a5f; color: #93c5fd; }
.badge-error { background: #7f1d1d; color: #fca5a5; }
.badge-pending { background: #422006; color: #fbbf24; }
.badge-paid { background: #14532d; color: #4ade80; }
.badge-overdue { background: #7f1d1d; color: #fca5a5; }
.badge-cancelled { background: #37415e; color: #94a3b8; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.show { display: flex; }
.modal { background: #161a2e; border: 1px solid #252a45; border-radius: 14px; padding: 24px; width: 640px; max-width: 95%; max-height: 90vh; overflow-y: auto; }
.modal h2 { color: white; font-size: 18px; margin-bottom: 16px; }
.modal .close { float: right; background: none; border: none; color: #64748b; font-size: 18px; cursor: pointer; }

/* Login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #161a2e; border: 1px solid #252a45; border-radius: 14px; padding: 32px; width: 380px; }
.login-box h1 { color: white; text-align: center; margin-bottom: 20px; font-size: 20px; }
.login-box .logo { text-align: center; margin-bottom: 20px; }
.login-box .logo img { height: 48px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #161a2e; border: 1px solid #252a45; border-radius: 12px; padding: 16px; }
.stat-card .label { color: #64748b; font-size: 12px; }
.stat-card .value { color: white; font-size: 24px; font-weight: 700; margin-top: 4px; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* Dashboard moderno */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-card { background: #161a2e; border: 1px solid #252a45; border-radius: 16px; padding: 20px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.dash-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.dash-card-label { color: #94a3b8; font-size: 13px; font-weight: 500; }
.dash-card-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.dash-card-value { color: #fff; font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 8px; }
.dash-trend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; }
.dash-trend-up { color: #4ade80; }
.dash-trend-down { color: #f87171; }
.dash-trend-neutral { color: #94a3b8; }