/* ==========================================================================
   IMAGO GALLERY — Admin Panel Stylesheet
   ========================================================================== */

:root {
  --admin-bg: #F8F9FA;
  --admin-card-bg: #FFFFFF;
  --admin-text: #111111;
  --admin-accent: #FF5B3E;
  --admin-surface: #FFD84D;
  --admin-border: #DEDEDE;
  --admin-muted: #666666;

  --font-headline: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.admin-body {
  font-family: var(--font-body);
  background-color: var(--admin-bg);
  color: var(--admin-text);
  margin: 0;
  display: flex;
  min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: #FFFFFF;
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

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

.admin-logo-text {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.admin-logo-badge {
  font-family: var(--font-headline);
  font-size: 0.65rem;
  font-weight: 700;
  background-color: var(--admin-surface);
  border: 1px solid var(--admin-text);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-headline);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--admin-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background-color: #111111;
  color: #FFFFFF;
}

.admin-nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-view-site {
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-view-site:hover {
  color: var(--admin-accent);
}

/* Admin Main Content */
.admin-main {
  margin-left: 260px;
  flex-grow: 1;
  padding: 32px 40px;
  max-width: 1400px;
}

@media (max-width: 900px) {
  .admin-sidebar {
    width: 72px;
  }
  .admin-sidebar .admin-logo-text,
  .admin-sidebar .admin-logo-badge,
  .admin-sidebar .admin-nav-item span,
  .admin-sidebar .admin-view-site span {
    display: none;
  }
  .admin-main {
    margin-left: 72px;
    padding: 20px;
  }
}

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

.admin-header-title h1 {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.admin-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--admin-text);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: #333333;
}

.btn-accent {
  background-color: var(--admin-accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  background-color: #E54529;
}

.btn-outline {
  background-color: #FFFFFF;
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.btn-outline:hover {
  background-color: #F1F1F1;
}

.btn-danger-outline {
  background-color: #FFFFFF;
  border-color: #FFAAA0;
  color: #D32F2F;
}

.btn-danger-outline:hover {
  background-color: #FFEBEE;
  border-color: #D32F2F;
}

/* Cards */
.admin-card {
  background-color: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-card-title {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Upload Dropzone (File & Folder Drag and Drop) */
.dropzone {
  border: 2px dashed var(--admin-border);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: #FAFAFA;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone.dragover {
  border-color: var(--admin-accent);
  background-color: #FFF5F2;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--admin-accent);
}

.dropzone-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.dropzone-desc {
  font-size: 0.88rem;
  color: var(--admin-muted);
  max-width: 460px;
  margin: 0 auto 16px;
}

.dropzone-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Upload progress list */
.upload-progress-container {
  margin-top: 16px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.upload-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 0.85rem;
}

.upload-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status {
  font-weight: 600;
}

.status-uploading { color: #0288D1; }
.status-done { color: #2E7D32; }
.status-error { color: #D32F2F; }

/* Photos Management Grid */
.admin-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.admin-photo-card {
  background-color: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-photo-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.admin-photo-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #EFEFEF;
}

.admin-photo-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.admin-photo-title {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-photo-event-badge {
  font-family: var(--font-headline);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--admin-muted);
  margin-bottom: 12px;
}

/* Silent Toggle Switches */
.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--admin-border);
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 12px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
}

/* Pure CSS Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CCC;
  transition: .3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--admin-accent);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Card Actions */
.admin-photo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.btn-delete-photo {
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 600;
  color: #D32F2F;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.btn-delete-photo:hover {
  background-color: #FFEBEE;
}

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

.form-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-text);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--admin-muted);
  margin-top: 4px;
}

/* Login box */
.login-wrapper {
  max-width: 400px;
  margin: 100px auto;
  padding: 32px;
  background-color: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.login-brand {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.login-sub {
  text-align: center;
  color: var(--admin-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.alert-success {
  background-color: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}

.alert-danger {
  background-color: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
}
