@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@500;700&display=swap');

:root {
    /* Color Palette - Premium Dark Mode */
    --bg-color: #0f172a; /* Dark slate */
    --surface-color: rgba(30, 41, 59, 0.7); /* Slightly lighter slate for cards */
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Accents */
    --accent-primary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --accent-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    
    /* Semantic */
    --success: #10b981;
    --error: #ef4444;
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* Effects */
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background ambient blur */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

body::before {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(59, 130, 246, 0.15); /* Blue */
}

body::after {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(139, 92, 246, 0.15); /* Purple */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.center-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography elements */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
}

.title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Fijar iconos del calendario y reloj nativos en fondos oscuros */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Specific for PIN */
.pin-input {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    font-family: var(--font-display);
    padding: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Alerts / Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Admin Dashboard Specifics */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-border);
}

.admin-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
}

/* Table styles */
.table-container {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 2rem;
}

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

.table th, .table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.2);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-completed {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* Action Links */
.action-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    margin-right: 1rem;
    transition: var(--transition-fast);
}

.action-link:hover {
    color: var(--accent-secondary);
}

.action-link.delete {
    color: var(--error-color);
}

.action-link.delete:hover {
    color: #fca5a5;
}

.action-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
    color: var(--text-secondary);
}

.action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-icon-btn svg {
    width: 20px;
    height: 20px;
}

.action-icon-meet {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}
.action-icon-meet:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.action-icon-mail {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}
.action-icon-mail:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.action-icon-delete {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.action-icon-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* FullCalendar Dark Theme Overrides */
.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.1);
}
.fc-theme-standard .fc-scrollgrid {
    border-color: rgba(255, 255, 255, 0.1);
}
.fc .fc-button-primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}
.fc-day-today {
    background-color: rgba(59, 130, 246, 0.1) !important;
}
.fc-event {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.85em;
    color: #ffffff !important;
}
.fc-h-event {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}
.fc-event-title, .fc-event-time {
    color: #ffffff !important;
    font-weight: 500;
}
.fc-daygrid-event-dot {
    display: none; /* Ocultar el punto porque ya le pondremos fondo de color al bloque entero */
}
.fc-daygrid-event {
    background-color: var(--accent-primary) !important;
    padding: 3px !important;
    border-radius: 4px !important;
}
.fc-col-header-cell-cushion, .fc-daygrid-day-number {
    color: var(--text-primary);
    text-decoration: none;
}
.fc-col-header-cell-cushion:hover, .fc-daygrid-day-number:hover {
    color: var(--accent-primary);
    text-decoration: none;
}


/* Logo Styles */
.logo-img {
    display: block;
    margin: 0 auto 1.5rem auto;
    max-width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: contain;
}

.logo-img-small {
    display: block;
    max-width: 180px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    margin: 0;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
