:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #22c55e;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.event-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.event-card.event-ended {
    opacity: 0.7;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-live {
    background: #dcfce7;
    color: #16a34a;
    animation: pulse-badge 2s infinite;
}

.badge-ended {
    background: #f1f5f9;
    color: var(--text-muted);
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.photo-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.event-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.event-action {
    color: var(--primary);
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Event page */
.event-header {
    padding: 40px 0 20px;
}

.event-info h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 8px 0;
}

.event-info p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.event-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Manage panel */
.manage-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 24px;
    animation: slideDown 0.2s ease;
}

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

.manage-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manage-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.rename-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rename-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.rename-input:focus {
    border-color: var(--primary);
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding-bottom: 40px;
}

.photo-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s;
    background: #e2e8f0;
}

.photo-item:hover {
    transform: scale(1.03);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.photo-item .photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.6));
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

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

.photo-overlay .photo-name {
    color: white;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.photo-overlay .btn-delete {
    background: rgba(239,68,68,0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.9;
}

.photo-overlay .btn-delete:hover {
    background: var(--danger);
}

/* Masonry-like effect for varied heights */
.photo-item.portrait {
    grid-row: span 2;
}

/* New photo animation */
.photo-item-new {
    animation: photoFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes photoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-item-new img {
    animation: imgShimmer 1.2s ease;
}

@keyframes imgShimmer {
    0% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* Mobile: tap overlay instead of hover */
@media (hover: none) {
    .photo-item .photo-overlay {
        opacity: 0;
    }
    .photo-item-touched .photo-overlay,
    .photo-item:active .photo-overlay {
        opacity: 1;
    }
}

.photo-item-touched {
    transform: scale(0.97);
    transition: transform 0.15s;
}

/* Live Toolbar */
.live-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 12px 20px;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 72px;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.9);
}

.live-toolbar.live-ended {
    opacity: 0.7;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.live-dot-active {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1);
    }
}

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

.new-photos-banner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: bannerPulse 2s ease infinite;
}

@keyframes bannerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.live-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Original Photo Overlay */
.original-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    animation: originalFadeIn 0.2s ease;
}
@keyframes originalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.original-top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-shrink: 0;
}
.original-back {
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
    cursor: pointer;
    user-select: none;
}
.original-back:hover { opacity: 1; }
.original-filename {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.original-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 0;
}
.original-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.original-heic-hint {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
}
.original-heic-hint p {
    margin-bottom: 16px;
}
.original-heic-link {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255,255,255,0.15);
    color: #818cf8;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
}
.original-heic-link:hover {
    background: rgba(255,255,255,0.25);
}
.original-hint-bar {
    width: 100%;
    padding: 14px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    background: rgba(0,0,0,0.4);
    flex-shrink: 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-notification {
    background: var(--text);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 300px;
}

.toast-notification.toast-show {
    transform: translateX(0);
}

/* Loading Spinner */
.empty-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Refresh indicator */
.refresh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    margin-right: 6px;
    animation: livePulse 2s infinite;
}

.refresh-dot.polling {
    background: #f59e0b;
    animation: none;
}
/* PhotoSwipe download button */
.pswp__button--download-bottom {
    background: rgba(255,255,255,0.2);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0 24px;
    border-radius: 20px;
    letter-spacing: 1px;
    border: none;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s;
}

.pswp__button--download-bottom:hover {
    background: rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
    .pswp__button--download-bottom {
        font-size: 14px;
        height: 36px;
        line-height: 36px;
        padding: 0 20px;
        bottom: 24px;
    }
}

/* PhotoSwipe: nicer mobile experience */
.pswp__top-bar {
    background: rgba(0,0,0,0.5) !important;
}

.pswp__caption {
    background: rgba(0,0,0,0.5) !important;
}

.pswp__ui--idle .pswp__top-bar,
.pswp__ui--idle .pswp__caption {
    opacity: 0;
}

/* Upload page */
.upload-header {
    text-align: center;
    padding: 40px 0 30px;
}

.upload-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-header p {
    color: var(--text-secondary);
}

.drop-zone {
    border: 3px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
    margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.05);
}

.drop-zone.dragover {
    transform: scale(1.02);
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.drop-zone h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.drop-zone p {
    color: var(--text-secondary);
}

.drop-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.upload-progress {
    margin-bottom: 24px;
}

.progress-bar {
    background: var(--border);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary), #a855f7);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.upload-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.upload-result.success {
    background: #dcfce7;
    color: #16a34a;
}

.upload-result.error {
    background: #fee2e2;
    color: #dc2626;
}

.uploaded-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding-bottom: 40px;
}

.uploaded-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.uploaded-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-item .check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

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

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .upload-header h1 {
        font-size: 1.2rem;
    }

    .drop-zone {
        padding: 40px 20px;
    }

    .nav-actions {
        gap: 4px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .live-toolbar {
        top: 56px;
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .live-status {
        font-size: 0.8rem;
    }

    .toast-container {
        right: 10px;
        left: 10px;
        top: 60px;
    }

    .toast-notification {
        max-width: 100%;
    }

    .new-photos-banner {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .event-header {
        padding: 20px 0 12px;
    }

    .event-info h1 {
        font-size: 1.3rem;
    }

    .event-meta {
        flex-direction: column;
        gap: 4px;
    }

    .container {
        padding: 0 12px;
    }

    .modal {
        padding: 24px 20px;
        width: 95%;
        margin: 10px;
    }

    .admin-actions {
        flex-direction: column;
    }

    .admin-actions .btn {
        width: 100%;
        text-align: center;
    }

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

    /* Mobile lightbox */
    .lb-header {
        padding: 8px 12px;
    }

    .lb-nav {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }

    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }

    .lb-footer {
        padding: 6px 12px 14px;
    }

    .lb-dot {
        width: 5px;
        height: 5px;
    }

    .lb-dot-active {
        width: 7px;
        height: 7px;
    }

    /* Hide text on mobile */
    .mobile-hide-text {
        display: none;
    }

    /* Pull to refresh */
    .pull-refresh-indicator {
        display: flex;
    }

    /* Photo overlay always visible on mobile (short) */
    .photo-overlay .photo-name {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .photo-item .photo-overlay {
        background: linear-gradient(transparent 40%, rgba(0,0,0,0.5));
        opacity: 1;
    }

    .photo-overlay .photo-name {
        font-size: 0.6rem;
        padding: 2px 0;
    }

    .photo-overlay .btn-delete {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .nav-content {
        padding: 0 8px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.2rem;
    }
}

/* Desktop-only: show mobile-hide-text, hide mobile-show-text */
@media (min-width: 769px) {
    .mobile-show-text {
        display: none;
    }

    .mobile-hide-text {
        display: inline-flex;
    }

    /* Dot indicators — hide on desktop, use counter instead */
    .lb-footer {
        display: none;
    }
}

/* Pull-to-refresh indicator */
.pull-refresh-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    height: 0;
    transition: height 0.2s ease, opacity 0.2s;
    color: var(--text-secondary);
    font-size: 0.85rem;
    width: 100%;
}

@media (max-width: 768px) {
    .pull-refresh-indicator {
        display: flex;
    }
}

.pull-refresh-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

/* Admin & Login */
.navbar-admin {
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 2px solid var(--primary);
}

.nav-admin-link {
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    transition: all 0.2s;
}

.nav-admin-link:hover {
    background: var(--primary);
    color: white;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    padding-top: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

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

.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    flex-wrap: wrap;
}

.admin-actions .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

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

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

.login-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.login-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        flex-direction: column;
    }

    .admin-actions .btn {
        width: 100%;
        text-align: center;
    }

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