/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

/* Variables de colores */
:root {
    --color-primary: #d4af37;
    --color-primary-dark: #b8962e;
    --color-bg-dark: #0b0b0f;
    --color-bg-card: #14141c;
    --color-border: #1f1f2b;
    --color-text: #fff;
    --color-text-secondary: #ccc;
    --color-text-muted: #888;
    --color-success: #10b981;
    --color-info: #3b82f6;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
}


a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-primary-dark);
}

body {
  background: #0b0b0f;
  color: #fff;
  min-height: 100vh;
}

/* ===== LAYOUT ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.main {
  flex: 1;
  margin-left: 240px;
  padding: 40px 30px;
  overflow-y: auto;
}

/* ===== CARDS ===== */
.card {
  background: #14141c;
  border: 1px solid #1f1f2b;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1f1f2b;
}

/* ===== FORM ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

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

label {
  color: #d4af37;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

/* Inputs */
.input,
.select,
.textarea {
  width: 100%;
  padding: 14px 16px;
  background: #0b0b0f;
  border: 1px solid #1f1f2b;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}

/* Select */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23d4af37' fill='none' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

/* Textarea */
.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Form actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #1f1f2b;
}

/* page-header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--color-text);
    font-size: 35px;
    margin-bottom: 8px;
        display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
        display: flex;
        margin-left: 45px;
    align-items: center;
    gap: 10px;
}
}

.cuenta-header h1 i {
    color: var(--color-primary);
}

.cuenta-header p {
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .cuenta-header h1 {
    font-size: 26px;
    margin-left: 60px;
    }
    }


/* ===== BUTTONS ===== */
.btn {
  background: linear-gradient(135deg, #d4af37, #b8962e);
  border: none;
  color: #0b0b0f;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212,175,55,.3);
}

/* ===== TABLE ===== */
.table-responsive {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #1f1f2b;
  background: #14141c;
}

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

.table th {
  padding: 16px;
  color: #d4af37;
  font-size: 14px;
  border-bottom: 2px solid #1f1f2b;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid #1f1f2b;
  color: #ccc;
}

/* ===== EMPTY ===== */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.empty-state i {
  font-size: 40px;
  color: #d4af37;
  margin-bottom: 10px;
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main { margin-left: 0; padding: 20px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}




/* ===== NOTIFICACIONES MEJORADAS ===== */
.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
    z-index: 99999; /* ¡MUY ALTO! Más que el modal */

}

.notification {
    position: relative;
    background: linear-gradient(135deg, #1a1a26 0%, #14141c 100%);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25),
                0 5px 10px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
    transform-origin: right center;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 100000; 

}

.notification:hover {
    transform: translateX(-4px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3),
                0 8px 15px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, transparent 100%);
    transition: background 0.5s ease;
}

.notification-success::before {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 50%, #4ade80 100%);
}

.notification-error::before {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
}

.notification-info::before {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
}

.notification-warning::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.notification-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.notification-success .notification-icon {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(34, 197, 94, 0.25));
}

.notification-error .notification-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.25));
}

.notification-info .notification-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.25));
}

.notification-warning .notification-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.25));
}

.notification-content i {
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.notification-success .notification-content i {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.notification-error .notification-content i {
    color: #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.notification-info .notification-content i {
    color: #93c5fd;
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.3);
}

.notification-warning .notification-content i {
    color: #fcd34d;
    text-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
}

.notification-content span {
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.notification-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.notification-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s ease;
}

.notification-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.notification-close:hover::before {
    background: rgba(255, 255, 255, 0.05);
}

.notification-close:active {
    transform: scale(0.95);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.notification-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    animation: progress 5s linear forwards;
}

.notification-success .notification-progress::after {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.notification-error .notification-progress::after {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.notification-info .notification-progress::after {
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
}

.notification-warning .notification-progress::after {
    background: linear-gradient(90deg, #f59e0b, #fcd34d);
}

/* ANIMACIONES */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

/* Para cuando se remueve la notificación */
.notification-removing {
    animation: slideOutRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Responsive */
@media (max-width: 480px) {
    .notification-container {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .notification {
        padding: 16px;
    }
    
    .notification-content {
        gap: 12px;
    }
    
    .notification-icon {
        width: 34px;
        height: 34px;
    }
    
    .notification-content span {
        font-size: 13px;
    }
}

/* Efecto de brillo sutil */
.notification::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* ===== BOTÓN ESCANEAR QR ===== */
.btn-scan-qr {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.btn-scan-qr i {
    font-size: 18px;
}

.btn-scan-qr:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.45);
}

.btn-scan-qr:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}

/* Versión mobile: botón ancho */
@media (max-width: 768px) {
    .btn-scan-qr {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
}

/* ===== MODAL ESCÁNER QR ===== */
.qr-scanner-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Caja principal */
.qr-scanner-box {
    background: #0f172a;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: modalFadeUp 0.3s ease;
}

/* Header */
.qr-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
}

.qr-scanner-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Botón cerrar */
.qr-scanner-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

/* Body */
.qr-scanner-body {
    padding: 22px;
    text-align: center;
}

/* Contenedor cámara */
#qr-reader {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
}

/* Texto ayuda */
.qr-scanner-help {
    margin-top: 14px;
    font-size: 13px;
    color: #94a3b8;
}

/* Animación */
@keyframes modalFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile full */
@media (max-width: 480px) {
    .qr-scanner-box {
        height: 100%;
        border-radius: 0;
        max-width: none;
    }
}