/* ═══════════════════════════════════════════════════════
   Ludomon Portal — Global Styles
   ═══════════════════════════════════════════════════════ */

:root {
    /* Color palette */
    --bg-primary: #0c001f;
    --bg-secondary: rgba(12, 0, 31, 0.85);
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(0, 0, 0, 0.2);

    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;

    --accent: #ffc107; 
    --accent-hover: #ff8f00;
    --accent-glow: rgba(255, 193, 7, 0.25);

    --green: #2ecc71;
    --green-bg: rgba(46, 204, 113, 0.12);
    --green-soft: #1a3a2a;

    --yellow: #ffc107;
    --yellow-bg: rgba(255, 193, 7, 0.14);
    --yellow-soft: #3a361a;

    --red: #e74c3c;
    --red-bg: rgba(231, 76, 60, 0.14);
    --red-soft: #3a1a1a;

    --blue: #3498db;
    --blue-bg: rgba(52, 152, 219, 0.12);

    --gray: #636e83;
    --gray-bg: rgba(99, 110, 131, 0.12);

    --border: rgba(255, 255, 255, 0.1);
    --border-input: rgba(255, 255, 255, 0.15);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);

    --font: 'Nunito', sans-serif;
    --font-title: 'Fredoka One', cursive;
    --transition: 0.2s ease;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: linear-gradient(rgba(12, 0, 31, 0.85), rgba(12, 0, 31, 0.95)), url('../images/bg.jpg');
    background-color: var(--bg-primary);
    background-repeat: no-repeat, repeat;
    background-attachment: fixed, fixed;
    background-size: cover, auto;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 50%, #0f1117 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    text-align: center;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 36px 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.login-logo {
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.login-logo h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 400;
    color: var(--accent);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(231, 76, 60, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    transition: border var(--transition), box-shadow var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent), #7b73ff);
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

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

.login-footer {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 24px;
}

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* Occupancy alerts — pastel tones */
.header.header-alert-yellow {
    background: #3a3010;  /* warm dark amber pastel */
    border-bottom-color: #8a6d00;
}

.header.header-alert-red {
    background: #3a1010;  /* warm dark rose pastel */
    border-bottom-color: #8a2020;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo-img {
    height: 40px;
    width: auto;
}

.header-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent);
    display: none; /* Hide if we already show the logo */
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.btn-logout:hover {
    background: var(--red-bg);
    color: var(--red);
}

/* ═══════════════════════════════════════════════════════
   MAIN
   ═══════════════════════════════════════════════════════ */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ─── TOP BAR ─── */
.top-bar {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-area {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 250px;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border var(--transition), box-shadow var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color var(--transition);
}

.btn-clear-search:hover {
    color: var(--text-primary);
}

.btn-camera {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border var(--transition);
}

.btn-camera:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ─── STATS ─── */
.stats-area {
    display: flex;
    gap: 8px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    text-align: center;
    min-width: 72px;
    transition: transform var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-total .stat-value {
    color: var(--green);
}

.stat-entries .stat-value {
    color: var(--accent);
}

.stat-401 .stat-value {
    color: var(--yellow);
}

/* ═══════════════════════════════════════════════════════
   TABLE SECTION
   ═══════════════════════════════════════════════════════ */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.table-header-bar {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.dot-gray {
    background: var(--gray);
}

.dot-blue {
    background: var(--blue);
    box-shadow: 0 0 6px var(--blue);
}

.badge {
    background: var(--green-bg);
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.badge-gray {
    background: var(--gray-bg);
    color: var(--gray);
}

.badge-blue {
    background: var(--blue-bg);
    color: var(--blue);
}

.table-wrap {
    overflow-x: auto;
}

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

.data-table thead th {
    position: relative;
    padding: 10px 16px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 32px 16px;
    font-style: italic;
}

/* Row color states */
.row-danger {
    background: var(--red-soft) !important;
    border-left: 3px solid var(--red);
}

.row-danger:hover {
    background: rgba(231, 76, 60, 0.18) !important;
}

.row-warning {
    background: var(--yellow-soft) !important;
    border-left: 3px solid var(--yellow);
}

.row-warning:hover {
    background: rgba(241, 196, 15, 0.18) !important;
}

.row-member {
    border-left: 3px solid var(--yellow);
}

/* ─── Cell content helpers ─── */
.cell-id {
    font-weight: 600;
    color: var(--text-primary);
}

.cell-name {
    color: var(--yellow);
    font-weight: 600;
}

.cell-time {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.cell-duration {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cell-balance {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.balance-low {
    color: var(--yellow);
    font-weight: 600;
}

.balance-negative {
    color: var(--red);
    font-weight: 700;
}

/* ─── Num input ─── */
.num-input {
    width: 56px;
    padding: 4px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    text-align: center;
    transition: border var(--transition);
    outline: none;
}

.num-input:focus {
    border-color: var(--accent);
}

/* ─── Action Buttons ─── */
.actions {
    white-space: nowrap;
}
.actions button {
    margin-right: 6px;
    vertical-align: middle;
}
.actions button:last-child {
    margin-right: 0;
}

.btn-exit {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--green), #27ae60);
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.78rem;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn-exit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

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

.btn-add-time {
    padding: 6px 10px;
    background: var(--yellow-bg);
    color: var(--yellow);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.78rem;
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}

.btn-add-time:hover {
    background: rgba(241, 196, 15, 0.22);
    transform: translateY(-1px);
}

.btn-confirming {
    background: var(--red-bg) !important;
    color: var(--red) !important;
    border-color: rgba(231, 76, 60, 0.25) !important;
}

.btn-confirming:hover {
    background: rgba(231, 76, 60, 0.22) !important;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition);
}

.btn-icon:hover {
    color: var(--text-primary);
}

/* ─── Member Filters Bar ─── */
.member-filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-filter:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.btn-filter.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-filter-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 4px;
}

.btn-filter-clear:hover {
    color: var(--red);
}

/* ─── FAB BUTTON ─── */
.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7b73ff);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    z-index: 1000;
}

.fab-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════
   SECTION DIVIDER
   ═══════════════════════════════════════════════════════ */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(to right,
            var(--text-muted) 0px,
            var(--text-muted) 4px,
            transparent 4px,
            transparent 8px);
    opacity: 0.4;
}

.divider-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ═══════════════════════════════════════════════════════
   TOAST (bottom-right checkout notification)
   ═══════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    min-width: 280px;
    max-width: 360px;
    pointer-events: auto;
    animation: toastIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    backdrop-filter: blur(12px);
}

.toast.toast-exit {
    animation: toastOut 0.3s ease forwards;
}

.toast-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toast-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toast-body strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
}

/* ═══════════════════════════════════════════════════════
   QR SCANNER OVERLAY
   ═══════════════════════════════════════════════════════ */
.qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.2s ease;
}

.qr-overlay-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    width: 90%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.qr-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qr-overlay-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.qr-reader {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qr-reader video {
    border-radius: var(--radius-sm);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .top-bar {
        flex-direction: column;
    }

    .stats-area {
        justify-content: space-between;
    }

    .stat-card {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .main {
        padding: 12px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .num-input {
        width: 44px;
        font-size: 0.8rem;
    }

    .btn-exit {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .btn-add-time {
        padding: 5px 8px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .stats-area {
        flex-wrap: wrap;
    }

    .stat-card {
        min-width: calc(50% - 4px);
    }

.login-card {
        padding: 36px 24px 32px;
    }
}

/* ═══════════════════════════════════════════════════════
   SYNC / GHOST DETECTION
   ═══════════════════════════════════════════════════════ */
.btn-sync {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    position: relative;
}

.btn-sync:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-bg);
}

.btn-sync.has-ghosts {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--red-bg);
    animation: pulseSync 2s infinite;
}

.ghost-badge {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 4px;
    position: absolute;
    top: -6px;
    right: -6px;
    box-shadow: 0 0 0 2px var(--bg-main);
}

@keyframes pulseSync {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.btn-sync.syncing svg {
    animation: spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════
   TABS NAVIGATION
   ═══════════════════════════════════════════════════════ */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════
   MODAL / FORMS
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-form {
    padding: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.btn-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-cancel:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: opacity var(--transition);
}

.btn-save:hover {
    opacity: 0.9;
}

.full-search {
    max-width: none !important;
}

.btn-edit {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
}

/* ═══════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════ */
.pagination-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-bottom: 24px;
}

.btn-page {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-page:hover:not(:disabled) {
    background: var(--border);
}

.btn-page.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   MEMBER ACTIONS
   ═══════════════════════════════════════════════════════ */
.btn-add-time-small {
    background: rgba(var(--success-rgb), 0.1);
    color: #4ade80;
    border: 1px solid rgba(var(--success-rgb), 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition);
    margin-right: 6px;
}

.btn-add-time-small:hover {
    background: #22c55e;
    color: white;
}

.btn-add-time-small.confirming,
.btn-exit.confirming {
    background: #eab308 !important;
    color: #000 !important;
    border-color: #eab308 !important;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.7; }
}
.row-clickable {
    cursor: pointer;
    transition: background var(--transition);
}

.resizer {
    display: inline-block;
    width: 6px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
}

.resizer:hover, .resizer.resizing {
    background: var(--accent);
    opacity: 0.5;
}

.data-table thead th.active {
    background: rgba(var(--primary-rgb), 0.05);
}

.row-clickable:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.birthday-highlight {
    background: rgba(234, 179, 8, 0.08) !important;
}

.birthday-highlight:hover {
    background: rgba(234, 179, 8, 0.15) !important;
}

.birthday-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eab308;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-left: 6px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ─── CLOCK ─── */
.header-clock {
    margin-left: 15px;
    font-size: 1.5rem;
    font-weight: 400;
    font-family: var(--font-title);
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

/* ─── CUMPLES SECTION ─── */
.cumples-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .cumples-layout {
        grid-template-columns: 1fr;
    }
}

.cumples-calendar-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.cumples-agenda-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 800px;
    overflow-y: auto;
}

/* FullCalendar Customization */
#calendar {
    color: var(--text-primary);
    font-family: var(--font);
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.fc .fc-button-primary {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-transform: capitalize;
    font-weight: 500;
    transition: var(--transition);
}

.fc .fc-button-primary:hover {
    background: var(--bg-card-hover);
    border-color: var(--yellow);
}

.fc .fc-button-primary:disabled {
    opacity: 0.5;
}

.fc .fc-daygrid-day-number {
    color: var(--text-secondary);
    padding: 8px;
    font-weight: 500;
}

.fc .fc-col-header-cell-cushion {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.fc .fc-day-today {
    background: rgba(77, 148, 255, 0.05) !important;
}

.fc-event {
    border: none !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    cursor: pointer;
}

.fc-event-main {
    font-weight: 600;
}

/* Colors for events */
.event-cumple {
    background: var(--yellow) !important;
    color: var(--bg-primary) !important;
}

/* Agenda List */
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.agenda-item:hover {
    border-color: var(--yellow);
    transform: translateX(4px);
}

.agenda-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.agenda-day {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--yellow);
}

.agenda-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.agenda-info {
    flex: 1;
}

.agenda-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.agenda-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.agenda-time svg {
    color: var(--yellow);
}

/* Estilos para eventos de cumpleaños no pagados */
.event-cumple.no-pagado {
    background: var(--red) !important;
    color: white !important;
}

.agenda-item.no-pagado {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.3);
}

.agenda-item.no-pagado:hover {
    border-color: var(--red);
}

.agenda-item.no-pagado .agenda-day {
    color: var(--red);
}

/* Sorting indicators */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}

.sortable:hover {
    color: var(--accent);
}

.sortable::after {
    content: ' ↕';
    font-size: 0.7rem;
    opacity: 0.3;
    margin-left: 4px;
}

.sort-asc::after {
    content: ' ▲';
    opacity: 1;
    color: var(--accent);
}

.sort-desc::after {
    content: ' ▼';
    opacity: 1;
    color: var(--accent);
}
