* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #002243 0%, #001a36 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: None;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #002243;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0056a3;
    box-shadow: 0 0 5px rgba(0,86,163,0.3);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #002243 0%, #0056a3 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #004080 0%, #0066b3 100%);
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

/* Dashboard Styles - Coincidiendo con PyQt6 */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #002243;  /* Color principal del menú PyQt6 */
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #001a36;
    background: #001a36;  /* Header color */
}

.logo h2 {
    font-size: 18px;
    color: white;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.nav-item span {
    margin-right: 12px;
    font-size: 18px;
}

.nav-item:hover {
    background: #004080;  /* Hover color PyQt6 */
}

.nav-item.active {
    background: #0056a3;  /* Selected color PyQt6 */
    border-left: 4px solid white;
}

.user-info {
    padding: 20px;
    border-top: 1px solid #001a36;
    background: #001a36;
}

.user-name {
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    color: white;
    text-align: center;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

.main-content {
    flex: 1;
    padding: 20px;
    background: #f0f0f0;  /* Fondo derecho PyQt6 */
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.top-bar h1 {
    color: #002243;
    font-size: 24px;
}

.date-time {
    color: #666;
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #002243;
    margin-bottom: 5px;
}

.stat-label {
    color: #999;
    font-size: 12px;
}

/* Tables */
.recent-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recent-section h2 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #002243;
    border-left: 4px solid #0056a3;
    padding-left: 12px;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #ddd;
}

.data-table tr:hover {
    background: #f5f5f5;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn-primary {
    background: #0056a3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #004080;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0056a3;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 15px 20px;
    background: #002243;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo h2,
    .sidebar .nav-item span:first-child,
    .user-name {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .nav-item span {
        margin-right: 0;
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Logo de login */
.login-logo {
    display: block;
    width: 250px;
    height: auto;
    margin: 0 auto 25px auto;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .login-logo {
        width: 80px;
        margin-bottom: 15px;
    }
}

.logo {
    display: block;
    width: 250px;
    height: auto;
    margin: 0 auto 20px auto;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Eliminar cualquier borde al hacer clic o enfocar */
.logo:focus,
.logo:active {
    outline: none;
    border: none;
}

/* Si la imagen está dentro de un enlace */
a .logo,
.logo a {
    border: none;
    text-decoration: none;
}