/* ========================================
   Sistema de Notificações - Estilo
   ======================================== */

:root {
    --primary: #8A05BE;
    --primary-dark: #6B048F;
    --success: #00A868;
    --danger: #E74C3C;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #1c1e21;
    --text-muted: #65676b;
    --border: #e4e6eb;
    --sidebar: #1a1a2e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* ===== Login ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary);
}

.logo p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

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

.sidebar {
    width: 260px;
    background: var(--sidebar);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 30px;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-header .logo-icon {
    font-size: 28px;
}

.sidebar nav a {
    display: block;
    padding: 14px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(138, 5, 190, 0.2);
    color: white;
    border-left-color: var(--primary);
}

.content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 26px;
}

.user-info {
    color: var(--text-muted);
}

/* ===== Cards e Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.purple { background: #f3e8ff; }
.stat-icon.green  { background: #d1fae5; }
.stat-icon.blue   { background: #dbeafe; }
.stat-icon.orange { background: #ffedd5; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 18px;
}

/* ===== Formulários ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 5, 190, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== Botões ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.btn-link.danger {
    color: var(--danger);
}

/* ===== Tabela ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr.inativo {
    opacity: 0.55;
}

.token-cell {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Badges e Status ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge.android {
    background: #d1fae5;
    color: #065f46;
}

.badge.ios {
    background: #dbeafe;
    color: #1e40af;
}

.status {
    font-size: 12px;
    font-weight: 600;
}

.status.ativo { color: var(--success); }
.status.inativo { color: var(--danger); }

/* ===== Alerts ===== */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-sucesso {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-erro {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* ===== Responsivo ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-header span,
    .sidebar nav a {
        font-size: 0;
    }
    .sidebar nav a {
        text-align: center;
        padding: 16px;
    }
    .content {
        margin-left: 70px;
        padding: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
