/* ============================================
   GERAL
   ============================================ */
:root {
    --primary: #2196F3;
    --sidebar-width: 220px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding-bottom: 70px;
}

@media (min-width: 768px) {
    body { padding-bottom: 0; }
}

/* ============================================
   LOGIN
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1976D2 0%, #42A5F5 100%);
}

.login-container .card {
    max-width: 400px;
    width: 100%;
    border: none;
    border-radius: 12px;
}

.login-logo {
    max-width: 180px;
    height: auto;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #e0e0e0;
    position: sticky;
    top: 56px;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: #555;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background: #f5f5f5;
    color: var(--primary);
}

.sidebar .nav-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: #e3f2fd;
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* ============================================
   CONTEÚDO
   ============================================ */
.main-content {
    padding: 24px;
    max-width: 900px;
    min-height: calc(100vh - 56px);
}

@media (max-width: 767px) {
    .main-content {
        padding: 16px;
        max-width: 100%;
    }
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.avatar-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.menu-card {
    transition: transform 0.15s, box-shadow 0.15s;
    color: #333;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #333;
}

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.bg-purple { background: #9b59b6; }

/* ============================================
   FATURA CARD
   ============================================ */
.fatura-card {
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.fatura-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.badge-vencido { background: #e74c3c; }
.badge-emdia { background: #27ae60; }

/* ============================================
   SERVIÇO CARD
   ============================================ */
.servico-card {
    margin-bottom: 12px;
}

/* ============================================
   CHAMADO CARD
   ============================================ */
.chamado-card {
    margin-bottom: 12px;
    cursor: pointer;
}

.chamado-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ============================================
   BOTTOM NAV (mobile)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
    padding: 4px 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* ============================================
   CONTATO CARD
   ============================================ */
.contato-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #f8f9fa;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.contato-card:hover {
    background: #e8e8e8;
    color: #333;
}

.contato-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ============================================
   INFO LIST
   ============================================ */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    text-align: right;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .card {
    background: #16213e;
    border-color: #2a2a4a;
}

body.dark-mode .sidebar {
    background: #16213e;
    border-color: #2a2a4a;
}

body.dark-mode .sidebar .nav-link {
    color: #aaa;
}

body.dark-mode .sidebar .nav-link.active {
    background: #1a2744;
}

body.dark-mode .bottom-nav {
    background: #16213e;
    border-color: #2a2a4a;
}

body.dark-mode .menu-card {
    color: #e0e0e0;
}

body.dark-mode .menu-card:hover {
    color: #e0e0e0;
}

body.dark-mode .modal-content {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode .form-control {
    background: #1a2744;
    border-color: #2a2a4a;
    color: #e0e0e0;
}

body.dark-mode .contato-card {
    background: #1a2744;
    color: #e0e0e0;
}

body.dark-mode .contato-card:hover {
    background: #223355;
    color: #e0e0e0;
}

body.dark-mode .info-row {
    border-color: #2a2a4a;
}
