/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
    --bg-body: #f5f5f7;
    --bg-card: #ffffff;
    --text-main: #1d1d1f;
    --text-light: #86868b;
    --accent: #0071e3; /* Apple Blue */
    --accent-hover: #0077ed;
    --danger: #ff3b30;
    --success: #34c759;
    --border: #d2d2d7;
    --sidebar-width: 260px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-stack); }
body { background-color: var(--bg-body); color: var(--text-main); overflow-x: hidden; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.hidden { display: none !important; }

/* =========================================
   2. BOTONES Y FORMULARIOS COMPARTIDOS
   ========================================= */
.btn-primary {
    background: var(--accent); color: white; padding: 12px 24px;
    border-radius: 99px; font-size: 0.95rem; font-weight: 500;
    border: none; cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); box-shadow: 0 5px 15px rgba(0, 113, 227, 0.3); }
.btn-primary:disabled { background: var(--text-light); cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary { background: #e5e5ea; color: var(--text-main); padding: 10px 20px; border-radius: 99px; border: none; cursor: pointer; font-weight: 500; }
.btn-secondary:hover { background: #d1d1d6; }

.admin-input, select.admin-input {
    width: 100%; padding: 12px 15px; margin-bottom: 15px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 0.95rem; background: white; outline: none;
    transition: border 0.2s; appearance: none;
}
.admin-input:focus { border-color: var(--accent); }

/* =========================================
   3. TOAST Y MODALES BASE
   ========================================= */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8); color: white; padding: 12px 24px; border-radius: 50px;
    z-index: 5000; transition: transform 0.3s; display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Estructura Base Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
    z-index: 2000; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
    background: white; width: 90%; max-width: 950px; border-radius: 24px;
    padding: 0; display: flex; overflow: hidden;
    transform: scale(0.95); transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-lg); max-height: 90vh;
}
.modal-overlay.active .modal-content { transform: scale(1); }

.close-modal {
    position: absolute; top: 20px; right: 25px; font-size: 2rem;
    line-height: 1; cursor: pointer; color: var(--text-light); z-index: 10;
}
.close-modal:hover { color: var(--text-main); }
