/* ========================================
   Amany Twibbon - Style System
   Amany Islamic School Branding
   Primary: Blue #1B75BB | Accent: Orange #F7941D
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Primary Blue Palette (from logo #1B75BB) */
  --primary-50: #edf5fc;
  --primary-100: #d4e8f7;
  --primary-200: #a9d1ef;
  --primary-300: #6db3e3;
  --primary-400: #3d95d4;
  --primary-500: #1B75BB;
  --primary-600: #1766A6;
  --primary-700: #125690;
  --primary-800: #0E4575;
  --primary-900: #0A3259;

  /* Accent Orange Palette (from logo #F7941D) */
  --accent-50: #fef6eb;
  --accent-100: #fde8cc;
  --accent-200: #fbd199;
  --accent-300: #f9b666;
  --accent-400: #F7941D;
  --accent-500: #F7941D;
  --accent-600: #e07f0a;
  --accent-700: #b86808;

  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --success: #22c55e;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #eab308;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow-blue: 0 0 20px rgba(27, 117, 187, 0.35);
  --shadow-glow-orange: 0 0 20px rgba(247, 148, 29, 0.35);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Animated Background --- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 80%, rgba(27, 117, 187, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(247, 148, 29, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(27, 117, 187, 0.03) 0%, transparent 70%);
  z-index: -1;
  animation: bgFloat 30s ease-in-out infinite alternate;
}

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

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(10, 50, 89, 0.3);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-400), var(--accent-500), var(--accent-400));
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-icon {
  height: 48px;
  display: flex;
  align-items: center;
  transition: transform var(--transition-base);
}

.logo-icon img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent-300);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  color: rgba(255, 255, 255, 0.8);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ========================================
   HERO / PAGE HEADER
   ======================================== */
.page-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========================================
   GALLERY GRID
   ======================================== */
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .icon {
  width: 28px;
  height: 28px;
  background: var(--primary-100);
  color: var(--primary-600);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  border: 1px solid var(--gray-100);
}

.gallery-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: border-color var(--transition-base);
  z-index: 2;
  pointer-events: none;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.gallery-card:hover::before {
  border-color: var(--primary-400);
}

.gallery-card .thumb-wrap {
  position: relative;
  padding-top: 100%;
  /* Checkerboard for transparent PNG preview */
  background-image:
    linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
    linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #f5f5f5;
}

.gallery-card .thumb-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .thumb-wrap img {
  transform: scale(1.05);
}

.gallery-card .card-label {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.gallery-card .card-label .use-badge {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.gallery-empty .empty-icon {
  margin-bottom: 1rem;
  opacity: 0.4;
  display: flex;
  justify-content: center;
}

.gallery-empty p {
  font-size: 1rem;
  font-weight: 500;
}

.gallery-empty .empty-sub {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: var(--gray-400);
  font-weight: 400;
}

/* ========================================
   EDITOR MODAL / OVERLAY
   ======================================== */
.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.editor-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.editor-panel {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 520px;
  max-height: 95vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
  position: relative;
}

.editor-overlay.active .editor-panel {
  transform: translateY(0) scale(1);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 10;
}

.editor-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-editor {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-close-editor:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.editor-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Canvas Container */
.canvas-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Checkerboard */
  background-image:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #eee;
  cursor: grab;
}

.canvas-container:active {
  cursor: grabbing;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Controls Row */
.editor-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.controls-row {
  display: flex;
  gap: 0.75rem;
}

.controls-row.center {
  justify-content: center;
}

/* Zoom slider */
.zoom-control {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.zoom-control label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  min-width: 40px;
}

.zoom-control input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
}

.zoom-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
  transition: transform var(--transition-fast);
}

.zoom-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.zoom-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.zoom-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-600);
  min-width: 38px;
  text-align: right;
}

/* Tip Text */
.editor-tip {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
  font-style: italic;
  padding: 0 0.5rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Blue */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}

/* Accent Orange */
.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
  box-shadow: var(--shadow-glow-orange);
  transform: translateY(-1px);
}

/* Outline */
.btn-outline {
  background: #fff;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
  background: var(--primary-50);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Small */
.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Full Width */
.btn-block {
  width: 100%;
}

/* Flex fill */
.btn-flex {
  flex: 1;
}

/* ========================================
   ADMIN PAGE
   ======================================== */
/* Login Form */
.login-wrapper {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--gray-100);
}

.login-card .login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 15px rgba(27, 117, 187, 0.3);
}

.login-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
}

.login-card .login-subtitle {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.flash-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Admin Dashboard */
.admin-section {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  margin-bottom: 2rem;
  overflow: hidden;
}

.admin-section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-section-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.admin-section-header .badge {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-section-body {
  padding: 1.5rem;
}

/* Upload area */
.upload-area {
  display: block;
  border: none;
  background: transparent;
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  opacity: 0.8;
}

.upload-area .upload-svg-icon {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.upload-area:hover .upload-svg-icon,
.upload-area.dragover .upload-svg-icon {
  opacity: 0.8;
  stroke: var(--primary-500);
}

.upload-area p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 0.35rem;
}

.upload-area .upload-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.upload-area input[type="file"] {
  display: none;
}

/* Admin Grid */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.admin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.admin-card .thumb-wrap {
  position: relative;
  padding-top: 100%;
  background-image:
    linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
    linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
    linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-color: #f0f0f0;
}

.admin-card .thumb-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.admin-card .card-actions {
  padding: 0.6rem;
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--gray-200);
}

.admin-card .card-name {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: center;
  padding-left: 0.25rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--gray-400);
  font-size: 0.82rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 2rem;
}

.footer a {
  color: var(--primary-500);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--primary-700);
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--primary-600);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header-inner {
    height: 58px;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .page-hero {
    padding: 2rem 0.5rem 1.5rem;
  }

  .page-hero h1 {
    font-size: 1.65rem;
  }

  .page-hero p {
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
  }

  .editor-panel {
    max-width: 100%;
    border-radius: var(--radius-lg);
    max-height: 100vh;
  }

  .editor-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .editor-body {
    padding: 1rem;
  }

  .container {
    padding: 1.25rem 1rem 3rem;
  }

  .admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .controls-row {
    flex-direction: column;
  }
}

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

  .gallery-card .card-label {
    padding: 0.5rem 0.65rem;
    font-size: 0.72rem;
  }

  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links a {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
  }
}

/* ========================================
   UTILITY: Fade In Animation
   ======================================== */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

/* Staggered grid cards */
.gallery-card {
  animation: fadeIn 0.4s ease-out backwards;
}

.gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-card:nth-child(2) { animation-delay: 0.1s; }
.gallery-card:nth-child(3) { animation-delay: 0.15s; }
.gallery-card:nth-child(4) { animation-delay: 0.2s; }
.gallery-card:nth-child(5) { animation-delay: 0.25s; }
.gallery-card:nth-child(6) { animation-delay: 0.3s; }
.gallery-card:nth-child(7) { animation-delay: 0.35s; }
.gallery-card:nth-child(8) { animation-delay: 0.4s; }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}
