/* assets/css/style.css - Basado en tu web */
:root {
    --color-primary: #b79f5a;
    --color-primary-dark: #9e8648;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #f9f9f9;
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-btn: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair', serif;
    font-weight: 500;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8e0d4 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 30px;
    text-align: center;
}

.login-logo {
    max-width: 250px;
    margin-bottom: 10px;
}

.login-box h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.subtitulo {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

/* Header */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    max-height: 50px;
}

.logo-area h1 {
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: 500;
}

/* Navegación */
.nav-menu {
    background: var(--color-primary);
    padding: 0 25px;
}

.nav-menu ul {
    max-width: 1400px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: var(--radius-btn);
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.2);
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 25px;
}

/* Tarjetas */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
}

.card-header h2 {
    font-size: 1.5rem;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background: var(--color-bg);
    font-weight: 600;
}

tr:hover {
    background: #f8f6f2;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Alexandria', 'Poppins', sans-serif;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Alertas */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Buscador */
.buscador {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.buscador input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Playfair', serif;
}

.stat-label {
    color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu ul {
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 0 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== DROPDOWN DEL USUARIO ===== */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 60px;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.user-dropdown-btn:hover {
    background: rgba(0,0,0,0.05);
}

.user-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-primary);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: var(--color-text);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--color-text-light);
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background-color: var(--color-white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.user-dropdown-content a:hover {
    background-color: #f5f0e8;
}

.user-dropdown-content hr {
    margin: 5px 0;
    border-color: var(--color-border);
}

.dropdown-icon {
    font-size: 18px;
    width: 24px;
}

.logout-link {
    color: #dc2626 !important;
}

.logout-link:hover {
    background-color: #fee2e2 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .user-dropdown-btn {
        padding: 5px;
    }
    
    .user-avatar-mini {
        width: 35px;
        height: 35px;
    }
}
@media (max-width: 480px) {
    .btn-block {
        font-size: 14px;
        padding: 10px;
    }
}
