/* =====================================================
   SISTEMA DE REUNIONES VIRTUALES - ESTILOS PRINCIPALES
   Tema: Dorado Premium
   ===================================================== */

/* === VARIABLES CSS === */
:root {
    --gold-50: #FFF9E6;
    --gold-100: #FFF0BF;
    --gold-200: #FFE08A;
    --gold-300: #F5D060;
    --gold-400: #D4AF37;
    --gold-500: #C5A028;
    --gold-600: #A88620;
    --gold-700: #8B6E18;
    --dark-900: #0a0a0f;
    --dark-800: #111118;
    --dark-700: #1a1a24;
    --dark-600: #222230;
    --dark-500: #2a2a3a;
    --dark-400: #353548;
    --dark-300: #4a4a60;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(212, 175, 55, 0.3);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-900);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--gold-400); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-300); }

img { max-width: 100%; height: auto; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--dark-800); }
::-webkit-scrollbar-thumb { background: var(--dark-400); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark-300); }

/* === LOGIN PAGE === */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-900) 0%, #1a1a2e 50%, var(--dark-900) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -2%); }
}

.login-card {
    background: rgba(18, 18, 28, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-card), 0 0 80px rgba(212, 175, 55, 0.03);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    padding: 45px 40px 30px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, transparent 100%);
}

.login-logo {
    width: 75px;
    height: 75px;
    border-radius: 20px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(212, 175, 55, 0.5); }
}

.login-logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.login-logo .material-icons-round {
    font-size: 38px;
    color: #000;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.login-body { padding: 30px 40px 40px; }

/* === FORMS === */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .material-icons-round {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
}

.input-wrapper input:focus ~ .material-icons-round,
.input-wrapper input:not(:placeholder-shown) ~ .material-icons-round {
    color: var(--gold-400);
}

input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="date"], input[type="time"],
input[type="search"], input[type="url"], input[type="tel"],
select {
    width: 100%;
    min-height: 46px;
    padding: 13px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #d7dce6;
    border-radius: var(--radius-md);
    color: #111827 !important;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 22px rgba(0,0,0,.10);
}

/* Opciones desplegables nativas: fondo blanco con texto negro. */
select option,
select optgroup {
    background: #ffffff !important;
    color: #111827 !important;
}

select option:checked,
select option:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

textarea {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input {
    padding-left: 44px;
}

.input-wrapper input[type="password"] {
    padding-right: 48px;
}

input:focus, select:focus {
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18), 0 12px 26px rgba(0,0,0,.16);
    background: #ffffff !important;
    color: #111827 !important;
}

textarea:focus {
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

input::placeholder, textarea::placeholder {
    color: #6b7280;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a6a80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-error {
    font-size: 12px;
    color: #f87171;
    margin-top: 5px;
    display: none;
}

.form-error.show { display: block; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.btn .material-icons-round { font-size: 18px; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
    color: #000;
}

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

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.4);
}

.btn-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.btn-warning:hover {
    background: rgba(234, 179, 8, 0.25);
}

.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-icon {
    width: 38px; height: 38px;
    padding: 0; border-radius: var(--radius-sm);
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-800);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 14px 18px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    gap: 0;
}

.sidebar-logo {
    width: 100%;
    max-width: 230px;
    height: 78px;
    border-radius: 18px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
    overflow: hidden;
}

.sidebar-logo .material-icons-round {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}
.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-brand { display: none !important; }

.sidebar-brand h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-400);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gold-400);
    border-radius: 0 4px 4px 0;
}

.nav-item .material-icons-round { font-size: 20px; }

.nav-item .badge-count {
    margin-left: auto;
    background: var(--gold-400);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-card:hover { background: rgba(255, 255, 255, 0.04); }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar .material-icons-round { font-size: 22px; color: #000; }

.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-info .role { font-size: 11px; color: var(--text-muted); }

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.topbar {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.topbar-title h1 {
    font-size: 18px;
    font-weight: 700;
}

.topbar-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* === PAGE CONTENT === */
.page-content {
    flex: 1;
    padding: 30px;
}

/* === CARDS === */
.card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 .material-icons-round {
    font-size: 20px;
    color: var(--gold-400);
}

.card-body { padding: 24px; }
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

/* === STAT CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.03;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.stat-card:hover::after { opacity: 0.06; }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .material-icons-round { font-size: 24px; }

.stat-icon.gold { background: rgba(212, 175, 55, 0.12); color: var(--gold-400); }
.stat-icon.green { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.stat-icon.red { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.stat-info { flex: 1; }
.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* === TABLE === */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

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

table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

table tbody tr {
    transition: var(--transition);
}

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

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-scheduled { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.badge-active { background: rgba(34, 197, 94, 0.12); color: #4ade80; animation: badgePulse 2s ease-in-out infinite; }
.badge-completed { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.badge-cancelled { background: rgba(239, 68, 68, 0.12); color: #f87171; }

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.badge-open { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.badge-closed { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.badge-admin { background: rgba(212, 175, 55, 0.12); color: var(--gold-400); }

/* === ALERTS / MESSAGES === */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); color: #4ade80; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #f87171; }
.alert-warning { background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.2); color: #fbbf24; }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* === MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
    display: none;
}

.modal-overlay.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--dark-700);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .material-icons-round {
    font-size: 60px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    padding: 16px 0;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination a:hover { background: rgba(255, 255, 255, 0.08); }
.pagination .active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-400);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* === TOGGLE SWITCH === */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--dark-400);
    border-radius: 30px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--gold-400);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* === MEETING PAGE (JITSI) === */
.meeting-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.meeting-topbar {
    height: 56px;
    background: var(--dark-800);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.meeting-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meeting-info .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.jitsi-container {
    flex: 1;
    background: #000;
}

#jitsi-meeting {
    width: 100%;
    height: 100%;
}

/* === CALENDAR VIEW === */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-nav .month-label {
    font-size: 16px;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.calendar-day {
    min-height: 80px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.calendar-day:hover { border-color: rgba(255, 255, 255, 0.12); }

.calendar-day.today {
    border-color: var(--gold-400);
    background: rgba(212, 175, 55, 0.05);
}

.calendar-day.other-month { opacity: 0.3; }

.calendar-day .day-number {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.calendar-day.today .day-number {
    color: var(--gold-400);
}

.calendar-event {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-300);
    border-left: 2px solid var(--gold-400);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    .sidebar-overlay.active { display: block; }
}

@media (max-width: 768px) {
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 16px; }
    .card-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .calendar-grid { gap: 2px; }
    .calendar-day { min-height: 60px; padding: 4px; }
}

/* === ANIMATIONS === */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

/* === PROFILE PHOTO UPLOAD === */
.photo-upload {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.photo-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gold-400);
}

.photo-upload .upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
}

.photo-upload:hover .upload-overlay { opacity: 1; }

/* === TOOLTIPS === */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--dark-600);
    color: var(--text-primary);
    font-size: 11px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

[data-tooltip]:hover::after {
    opacity: 1;
    bottom: calc(100% + 6px);
}

/* === ROOM CARD === */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.room-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
}

.room-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.room-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.room-card-header h4 {
    font-size: 16px;
    font-weight: 700;
}

.room-card .description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.room-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.room-card-meta span {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-card-meta span .material-icons-round { font-size: 14px; }

.room-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}


/* Ajuste profesional para tarjetas de salas y botones compactos. */
.room-card-actions {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.room-card-actions form {
    display: inline-flex !important;
    margin: 0;
}

.room-card-actions .btn {
    min-width: 112px;
    padding: 10px 14px;
    line-height: 1.15;
    overflow: visible;
}

.room-card-actions .btn .material-icons-round {
    flex: 0 0 auto;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111827 !important;
    box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(212,175,55,.12) !important;
    caret-color: #111827;
}

@media (max-width: 520px) {
    .room-card-actions .btn,
    .room-card-actions form {
        width: 100%;
    }
}
