/* =====================================================
   ESTILOS GERAIS - SISTEMA SOLAR SUPPORT
   ===================================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =====================================================
   LOGIN
   ===================================================== */

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

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-box .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 20px;
    font-size: 48px;
}

/* =====================================================
   FORMULÁRIOS
   ===================================================== */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* =====================================================
   BOTÕES
   ===================================================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-info {
    background: #17a2b8;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* =====================================================
   LAYOUT DO SISTEMA
   ===================================================== */

.system-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #1a1a2e;
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.sidebar-header small {
    color: #aaa;
    font-size: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #007bff;
    text-decoration: none;
}

.sidebar-menu li a .icon {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-section {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
}

/* Top Bar */
.topbar {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    font-size: 20px;
    color: #1a1a2e;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-user .user-info {
    text-align: right;
}

.topbar-user .user-name {
    font-weight: 600;
    font-size: 14px;
}

.topbar-user .user-type {
    font-size: 12px;
    color: #888;
}

/* Área de Conteúdo */
.content-area {
    padding: 30px;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    color: #1a1a2e;
}

.card-body {
    padding: 20px;
}

/* =====================================================
   DASHBOARD - CARDS DE ESTATÍSTICAS
   ===================================================== */

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

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.stat-info h4 {
    font-size: 28px;
    margin-bottom: 2px;
    color: #1a1a2e;
}

.stat-info p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* =====================================================
   TABELAS
   ===================================================== */

.table-responsive {
    overflow-x: auto;
}

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

table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5eb;
    font-size: 14px;
    vertical-align: middle;
}

table tr:hover {
    background: #f8f9fa;
}

/* =====================================================
   FORMULÁRIO EM GRID
   ===================================================== */

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

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

/* =====================================================
   RESPONSIVO - MOBILE MENU
   ===================================================== */

/* Hamburger Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #1a1a2e;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #16213e;
    transform: scale(1.05);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* Animação do hamburger para X */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay para fechar o menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar responsiva */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    .main-content {
        margin-left: 0;
        padding-top: 70px;
    }

    .topbar {
        padding: 15px;
        padding-left: 60px;
    }

    .topbar h1 {
        font-size: 16px;
    }

    .content-area {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row.three-col {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 10px;
    }
}

/* =====================================================
   UTILITÁRIOS
   ===================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-muted { color: #888; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
