/* ===== DesireSync Admin — identidade visual da marca (dark + roxo, Inter) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0D0D0F;
    --surface: #1A1A2E;
    --surface-2: #252540;
    --card: #1E1E36;
    --primary: #BB86FC;
    --primary-2: #9C27B0;
    --secondary: #FF4081;
    --text: #F5F5F5;
    --text-2: #E0E0E0;
    --sub: #9E9E9E;
    --divider: #2C2C48;
    --success: #4CAF50;
    --danger: #CF6679;
    --warning: #FFB74D;
    --info: #64B5F6;
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--primary); }

h1, h2, h3, h4 { color: var(--text); font-weight: 700; letter-spacing: -0.01em; }

::selection { background: rgba(187,134,252,0.35); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #33335a; }

/* ===== Layout ===== */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #16162a 0%, #14131f 100%);
    color: var(--text);
    padding: 0;
    flex-shrink: 0;
    border-right: 1px solid var(--divider);
}

.sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid var(--divider);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu ul { list-style: none; padding: 8px 0; margin: 0; }

.nav-menu ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--sub);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    font-weight: 500;
}

.nav-menu ul li a:hover {
    background-color: rgba(187,134,252,0.08);
    color: var(--text);
}

.nav-menu ul li a.active {
    background: linear-gradient(90deg, rgba(187,134,252,0.18), transparent);
    color: #fff;
    border-left-color: var(--primary);
}

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.top-bar {
    background-color: var(--surface);
    padding: 16px 30px;
    border-bottom: 1px solid var(--divider);
    font-weight: 600;
    color: var(--text-2);
}

.content-area { padding: 30px; flex: 1; }

/* Page title (h1 no topo de cada página) */
.content-area > h1,
.content-area h1 {
    font-size: 1.7rem;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--divider);
}

/* ===== Cards ===== */
.card {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric-card:hover { transform: translateY(-2px); border-color: rgba(187,134,252,0.5); }

.metric-card .value {
    font-size: 2.1rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card .label { font-size: 0.9rem; color: var(--sub); margin-top: 6px; }

/* ===== Tabelas ===== */
table { width: 100%; border-collapse: collapse; color: var(--text-2); }

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
}

table th {
    background-color: var(--surface-2);
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

table tbody tr { transition: background 0.12s ease; }
table tbody tr:hover { background-color: rgba(255,255,255,0.03); }

/* ===== Botões ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    box-sizing: border-box;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-success { background-color: var(--success); color: #fff; }
.btn-danger { background-color: var(--danger); color: #1a0d10; }
.btn-warning { background-color: var(--warning); color: #2b1c00; }
.btn-secondary { background-color: var(--surface-2); color: var(--text); border: 1px solid var(--divider); }
.btn-info { background-color: var(--info); color: #05233b; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

.btn-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== Formulários ===== */
input[type="text"], input[type="number"], input[type="email"],
input[type="password"], input[type="date"], select, textarea {
    padding: 10px 12px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background-color: var(--surface-2);
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder, textarea::placeholder { color: #6d6d86; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(187,134,252,0.25);
}

select { appearance: auto; cursor: pointer; }
select option { background: var(--surface-2); color: var(--text); }
textarea { resize: vertical; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-2); }

.form-row, .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: start;
    margin-bottom: 10px;
}

.form-row .form-group, .filter-row .form-group { margin-bottom: 0; }

/* ===== Alertas ===== */
.alert { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 15px; border: 1px solid transparent; }
.alert-success { background-color: rgba(76,175,80,0.14); color: #a7e0aa; border-color: rgba(76,175,80,0.35); }
.alert-danger { background-color: rgba(207,102,121,0.14); color: #f0b3bd; border-color: rgba(207,102,121,0.35); }

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

.modal-content {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    max-width: 800px; width: 90%; max-height: 90vh;
    overflow: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
}

.modal-header h4 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 20px; text-align: center; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--divider);
}
