/* Sistema de Gestión Dental - Estilos */
/* Paleta de colores: Blanco (#FFFFFF) y Azul (#2196F3) */

/* ========== RESET Y BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== NAVBAR ========== */
.navbar {
    background-color: #2196F3;
    color: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand h1 {
    font-size: 22px;
    font-weight: 600;
    padding: 15px 0;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 5px;
}

.navbar-menu li a {
    display: block;
    padding: 20px 18px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 15px;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-menu li a.logout-btn {
    background-color: rgba(0, 0, 0, 0.2);
}

.navbar-menu li a.logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* ========== CONTAINER Y LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2196F3;
}

.page-header h2 {
    color: #2196F3;
    font-size: 28px;
    font-weight: 600;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976D2;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-warning {
    background-color: #ff9800;
    color: white;
}

.btn-warning:hover {
    background-color: #e68900;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-info {
    background-color: #00bcd4;
    color: white;
}

.btn-info:hover {
    background-color: #00acc1;
}

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

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

/* ========== FORMS ========== */
.form {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group small {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group small a {
    color: #2196F3;
    text-decoration: none;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ========== SEARCH Y FILTER ========== */
.search-box,
.filter-box {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.search-form,
.filter-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
    font-size: 13px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* ========== TABLES ========== */
.table-responsive {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table thead {
    background-color: #2196F3;
    color: white;
}

.table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.table tbody tr:hover {
    background-color: #f5f9fc;
}

.table tbody tr.today-row {
    background-color: #fff9e6;
}

.table .actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.table .amount {
    text-align: right;
    font-weight: 600;
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.badge-completada {
    background-color: #d4edda;
    color: #155724;
}

.badge-cancelada {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-payment,
.badge-treatment {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* ========== ALERTS ========== */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-info {
    font-weight: 600;
    color: #555;
}

/* ========== NO DATA ========== */
.no-data {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-data p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

/* ========== DASHBOARD ========== */
.dashboard h2 {
    color: #2196F3;
    margin-bottom: 25px;
}

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

.stat-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 40px;
}

.stat-content h3 {
    color: #2196F3;
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.dashboard-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dashboard-section h3 {
    color: #2196F3;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

/* ========== PATIENT DETAILS ========== */
.patient-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-card h3 {
    color: #2196F3;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

.detail-table {
    width: 100%;
}

.detail-table tr {
    border-bottom: 1px solid #eee;
}

.detail-table th {
    padding: 10px 10px 10px 0;
    text-align: left;
    font-weight: 600;
    color: #555;
    width: 40%;
}

.detail-table td {
    padding: 10px;
    color: #333;
}

.patient-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.section-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.section-header h3 {
    color: #2196F3;
}

.total-box {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    color: #1565c0;
}

/* ========== PAYMENT TOTALS ========== */
.totals-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.total-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.total-card h4 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.total-amount {
    color: #2196F3;
    font-size: 28px;
    font-weight: 700;
}

/* ========== ODONTOGRAMA ========== */
.odontograma-reference {
    background-color: #f5f9fc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.odontograma-reference h4 {
    color: #2196F3;
    margin-bottom: 15px;
}

.dental-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dental-row {
    background-color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

.login-header h1 {
    color: #2196F3;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 16px;
}

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

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

/* ========== FOOTER ========== */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .navbar-menu li a {
        padding: 12px 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-form,
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group,
    .filter-actions {
        width: 100%;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .table .actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row.full-width {
        grid-template-columns: 1fr;
    }
}

/* ========== UTILITIES ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
