/* ========================================
   Admin Panel Styles
   ======================================== */

.admin-body {
    background: var(--color-bg);
    min-height: 100vh;
}

/* ========================================
   Login Screen
   ======================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background:
        radial-gradient(ellipse at 30% 30%, hsla(35, 70%, 40%, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, hsla(150, 50%, 30%, 0.08) 0%, transparent 50%),
        var(--color-bg);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: var(--space-2xl);
    text-align: center;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.login-logo {
    height: 70px;
    width: auto;
    margin-bottom: var(--space-sm);
}

.admin-logo {
    height: 40px;
    width: auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.login-hint {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
}

.login-hint code {
    background: var(--color-surface);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* ========================================
   Admin Panel Layout
   ======================================== */
.admin-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.admin-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.admin-actions {
    display: flex;
    gap: var(--space-md);
}

.admin-main {
    flex: 1;
    padding: var(--space-2xl) 0;
}

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   Admin Sections
   ======================================== */
.admin-section {
    margin-bottom: var(--space-3xl);
}

.admin-section .section-header {
    text-align: left;
    margin-bottom: var(--space-lg);
}

.admin-section .section-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.admin-section .section-header p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ========================================
   Status Control
   ======================================== */
.status-control {
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.status-display {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-full);
}

.status-indicator .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-text-muted);
    transition: all var(--transition-base);
}

.status-indicator.open .status-dot {
    background: var(--color-open);
    box-shadow: 0 0 12px var(--color-open-glow);
}

.status-indicator.closed .status-dot {
    background: var(--color-closed);
    box-shadow: 0 0 12px var(--color-closed-glow);
}

.status-label {
    font-weight: 600;
    font-size: 1rem;
}

.status-mode-label {
    font-size: 0.8rem;
    font-weight: 500;
    padding: var(--space-xs) 0;
}

.status-mode-label.auto {
    color: var(--color-open);
}

.status-mode-label.override {
    color: var(--color-accent, hsl(35, 90%, 55%));
}

.status-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.status-override-actions {
    width: 100%;
}

.toggle-label {
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--color-closed);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: var(--color-text);
    border-radius: 50%;
    transition: transform var(--transition-bounce);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--color-open);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(28px);
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(35, 65%, 45%, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ========================================
   Editor Cards
   ======================================== */
.editor-card {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ========================================
   Hours Editor
   ======================================== */
.hours-editor {
    padding: var(--space-xl);
}

.hours-grid-admin {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hours-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-md);
    align-items: center;
}

.hours-row label {
    font-weight: 500;
    color: var(--color-text);
}

.hours-row input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.hours-row input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-open);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: 0 8px 30px hsla(145, 65%, 45%, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-bounce);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   News List
   ======================================== */
.news-list-container {
    margin-top: var(--space-lg);
    padding: var(--space-xl);
}

.news-list-container h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.news-list-hint {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    margin-bottom: var(--space-lg);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.news-empty {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: var(--space-xl);
}

.news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.news-item:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item-text {
    color: var(--color-text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-base);
}

.news-item:hover .news-item-text {
    white-space: normal;
    overflow: visible;
}

.news-item-date {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    margin-top: var(--space-xs);
}

.news-item-delete {
    flex-shrink: 0;
    padding: var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-closed);
    color: var(--color-closed);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-item-delete:hover {
    background: var(--color-closed);
    color: white;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .status-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hours-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .admin-actions {
        flex-direction: column;
    }
}

/* ========================================
   Gallery Admin
   ======================================== */
.gallery-admin-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.gallery-dropzone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-dropzone:hover, .gallery-dropzone.dragover {
    border-color: var(--color-primary);
    background: hsla(45, 80%, 60%, 0.1);
}

.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.gallery-preview-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
}

.gallery-preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.gallery-preview-actions {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.gallery-preview-actions textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    color: white;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    resize: vertical;
}

.gallery-preview-actions button {
    width: 100%;
    padding: var(--space-xs);
    background: var(--color-closed);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}