/* ConsolaCondoCloud — Estilos Premium Dark */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222838;
    --border: rgba(255,255,255,0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37,99,235,0.25);
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ─── Layout Principal ─── */
.console-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* ─── Sidebar ─── */
.console-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.sidebar-brand h2 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sidebar-brand span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-nav { flex: 1; }

.nav-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.nav-item .material-icons { font-size: 20px; }

.sidebar-footer {
    padding: 1rem 0.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-footer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
}

.sidebar-footer-info {
    flex: 1;
}

.sidebar-footer-info .name {
    font-size: 0.85rem;
    font-weight: 700;
}

.sidebar-footer-info .role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-logout:hover {
    color: var(--red);
    background: rgba(239,68,68,0.1);
}

/* ─── Main Content ─── */
.console-main {
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ─── Stats Grid ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.12);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon.blue { background: rgba(37,99,235,0.15); color: #60a5fa; }
.stat-card-icon.green { background: rgba(16,185,129,0.15); color: #34d399; }
.stat-card-icon.yellow { background: rgba(245,158,11,0.15); color: #fbbf24; }
.stat-card-icon.red { background: rgba(239,68,68,0.15); color: #f87171; }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

/* ─── Tables ─── */
.data-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.data-table-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
}

.badge.paid { background: rgba(16,185,129,0.15); color: #34d399; }
.badge.pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge.overdue { background: rgba(239,68,68,0.15); color: #f87171; }
.badge.active { background: rgba(16,185,129,0.15); color: #34d399; }
.badge.inactive { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* ─── Buttons ─── */
.btn {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-success {
    background: var(--green);
    color: white;
}
.btn-success:hover {
    filter: brightness(1.1);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
}

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ─── Forms ─── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem;
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* ─── Login ─── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-card .brand-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-card .form-group {
    text-align: left;
}

.login-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #f87171;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: none;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state .material-icons {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .console-layout {
        grid-template-columns: 1fr;
    }
    .console-sidebar {
        display: none;
    }
    .console-main {
        padding: 1.5rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}
