/* =============================================
   SVIMLT Admin Dashboard — Premium Minimal White
   ============================================= */

:root {
  /* Metallic Navy & Silver Theme */
  --admin-bg: #f5f7fa;
  --admin-card: #ffffff;
  --admin-border: #dde1e8;
  --admin-primary: #1a3a6b;
  --admin-primary-light: rgba(26, 58, 107, 0.08);
  --admin-accent: #3d8eb3;
  --admin-accent-light: rgba(61, 142, 179, 0.08);
  --admin-danger: #dc3545;
  --admin-danger-light: rgba(220, 53, 69, 0.08);
  --admin-text: #0e2240;
  --admin-text-secondary: #4a5a72;
  --admin-text-muted: #8a94a6;
  --admin-sidebar-bg: #0e2240;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
  --admin-sidebar-active: rgba(26, 58, 107, 0.3);
  --admin-radius: 12px;
  --admin-shadow: 0 4px 24px rgba(59, 44, 36, 0.06);
  --admin-shadow-lg: 0 16px 48px rgba(59, 44, 36, 0.12);
  --admin-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --admin-transition: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--admin-font);
  background: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Custom WebKit Scrollbar Styling for Admin Dashboard */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--admin-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--admin-text-muted);
}

/* Utilities */
.u-hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

/* =============================================
   Login Screen
   ============================================= */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4fa 0%, #e2e8f3 100%);
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--admin-shadow-lg);
  animation: loginSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(26, 86, 150, 0.15);
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-bottom: 2rem;
}

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

.input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--admin-text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  font-size: 0.9rem;
  font-family: var(--admin-font);
  color: var(--admin-text);
  background: #fafbfd;
  transition: all var(--admin-transition);
  outline: none;
}

.input-group input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 150, 0.1);
  background: #fff;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3rem;
}

.toggle-pass {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--admin-text-muted);
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.toggle-pass:hover {
  color: var(--admin-primary);
}

.login-error {
  color: var(--admin-danger);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  min-height: 1.2rem;
  font-weight: 500;
}

.btn-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--admin-primary), #10a37f);
  color: #fff;
  border: none;
  border-radius: var(--admin-radius);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--admin-font);
  cursor: pointer;
  transition: all var(--admin-transition);
  box-shadow: 0 4px 20px rgba(26, 86, 150, 0.2);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(26, 86, 150, 0.3);
}

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

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--admin-primary);
}

/* =============================================
   Magical Transition
   ============================================= */
@property --mask-size {
  syntax: '<length-percentage>';
  initial-value: 120px;
  inherits: false;
}
@property --orb-x {
  syntax: '<length-percentage>';
  initial-value: 50%;
  inherits: false;
}
@property --orb-y {
  syntax: '<length-percentage>';
  initial-value: 50%;
  inherits: false;
}

.transition-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--admin-primary);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: opacity 1.2s ease;
  
  /* Spotlight Mask - creates a hole with liquid-smooth feathering */
  --mask-size: 0px; /* Start at 0 to prevent flash */
  -webkit-mask-image: radial-gradient(circle var(--mask-size) at var(--orb-x, 50%) var(--orb-y, 50%), transparent 50%, black 100%);
  mask-image: radial-gradient(circle var(--mask-size) at var(--orb-x, 50%) var(--orb-y, 50%), transparent 50%, black 100%);
}
.transition-overlay.fading { opacity: 0; }

.transition-overlay.active-mask {
  --mask-size: 140px;
  transition: --mask-size 0.5s ease-out, opacity 1.2s ease;
}

.transition-overlay.expanding {
  --mask-size: 250vw;
  transition: --mask-size 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}

/* For browsers that don't support animating CSS variables in mask, 
   we'll fallback to a standard fade or a keyframe expansion if needed. */
@keyframes maskExpand {
  from { -webkit-mask-size: 15vw; }
  to { -webkit-mask-size: 300vw; }
}

.magical-arrow {
  position: absolute; color: #fff;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  offset-path: path('M -200,200 C -100,500 500,500 600,200 S 200,-100 -200,-200 S -500,100 0,0');
  offset-rotate: auto 90deg;
  z-index: 2001;
}

@keyframes arrowExpand {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.2); }
  80% { transform: scale(3); opacity: 1; }
  100% { transform: scale(15); opacity: 0; }
}

.arrow-glow {
  position: absolute; inset: -40px;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(61,142,179,0.5) 30%, transparent 70%);
  animation: pulseGlow 0.8s ease-in-out infinite;
  border-radius: 50%;
  filter: blur(5px);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

.sparkle-dot {
  position: absolute; width: 4px; height: 4px;
  background: #fff; border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px #fff, 0 0 12px var(--admin-accent);
  animation: sparkleFade 0.8s ease-out forwards;
}

@keyframes sparkleFade {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  100% { transform: scale(0) translate(var(--dx, 0), var(--dy, 0)); opacity: 0; }
}

.sparkle-burst {
  animation: sparkleBurstAnim 1.5s ease-out forwards;
}

@keyframes sparkleBurstAnim {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  100% { transform: scale(0) translate(var(--dx, 0), var(--dy, 0)); opacity: 0; }
}

/* Dashboard Ambient Sparkles */
.dashboard-sparkles {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.dashboard-sparkle {
  position: absolute; background: #fff; border-radius: 50%;
  opacity: 0.4; animation: dashboardTwinkle 3s ease-in-out infinite alternate;
  box-shadow: 0 0 5px rgba(255,255,255,0.8);
}
@keyframes dashboardTwinkle {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.vortex-out {
  animation: vortexOut 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vortexOut {
  0% { transform: scale(1); opacity: 1; filter: blur(0); }
  100% { transform: scale(0.2); opacity: 0; filter: blur(20px); }
}

.vortex-in {
  animation: vortexIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vortexIn {
  0% { transform: scale(1.1); opacity: 0; filter: blur(20px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

/* =============================================
   Dashboard Layout
   ============================================= */
.admin-dashboard {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--admin-sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

/* Specific Scrollbar Styling for Dark Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header img {
  border-radius: 50%;
  object-fit: contain;
}

.sidebar-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--admin-font);
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: var(--admin-sidebar-hover);
}

.sidebar-link.active {
  color: #fff;
  background: var(--admin-sidebar-active);
}

.sidebar-link svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--admin-font);
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 0;
  min-height: 100vh;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--admin-text-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--admin-primary-light);
  color: var(--admin-primary);
}

.dashboard-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-text);
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-primary);
  background: var(--admin-primary-light);
  border: 1px solid rgba(26, 86, 150, 0.1);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-view-site:hover {
  background: var(--admin-primary);
  color: #fff;
  border-color: var(--admin-primary);
}

/* Tab Panels */
.tab-panel {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

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

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

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-actions h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--admin-text);
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-top: -0.5rem;
  width: 100%;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: var(--admin-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--admin-font);
  cursor: pointer;
  transition: all var(--admin-transition);
  box-shadow: 0 2px 12px rgba(26, 86, 150, 0.15);
}

.btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 86, 150, 0.25);
}

/* Items List */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  transition: all 0.2s ease;
}

.item-card:hover {
  border-color: rgba(26, 86, 150, 0.12);
  box-shadow: 0 6px 24px rgba(0, 20, 60, 0.07);
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-info h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 0.2rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.item-info p {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

.item-info .item-link {
  color: var(--admin-primary);
  font-size: 0.78rem;
  text-decoration: none;
  word-break: break-all;
}

.item-info .item-link:hover {
  text-decoration: underline;
}

.item-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

.item-status.active {
  background: var(--admin-accent-light);
  color: var(--admin-accent);
}

.item-status.inactive {
  background: var(--admin-danger-light);
  color: var(--admin-danger);
}

.item-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card);
  cursor: pointer;
  color: var(--admin-text-secondary);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
  background: var(--admin-primary-light);
}

.btn-icon.danger:hover {
  border-color: var(--admin-danger);
  color: var(--admin-danger);
  background: var(--admin-danger-light);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--admin-text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h4 {
  font-size: 1rem;
  color: var(--admin-text-secondary);
  margin-bottom: 0.3rem;
}

.empty-state p {
  font-size: 0.85rem;
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 30, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

/* Scrollable Modal Support */
.modal-overlay {
  overflow-y: auto;
  align-items: flex-start;
  padding: 3rem 1rem;
}

.modal {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 6rem);
  background: var(--admin-card);
  border-radius: 16px;
  box-shadow: var(--admin-shadow-lg);
  animation: modalSlide 0.3s ease;
  overflow-y: auto;
  margin-bottom: 2rem;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--admin-text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--admin-danger-light);
  color: var(--admin-danger);
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .input-group {
  margin-bottom: 1.25rem;
}

.modal-body .input-group:last-of-type {
  margin-bottom: 0;
}

.modal-body textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  font-size: 0.9rem;
  font-family: var(--admin-font);
  color: var(--admin-text);
  background: #fafbfd;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: all var(--admin-transition);
}

.modal-body textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 150, 0.1);
  background: #fff;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-modal-cancel {
  padding: 0.6rem 1.2rem;
  background: var(--admin-bg);
  color: var(--admin-text-secondary);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--admin-font);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: #eee;
}

.btn-modal-save {
  padding: 0.6rem 1.5rem;
  background: var(--admin-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--admin-font);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(26, 86, 150, 0.2);
}

.btn-modal-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 86, 150, 0.3);
}

/* Toggle switch */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--admin-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

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

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--admin-text-secondary);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.8rem 1.5rem;
  background: var(--admin-sidebar-bg);
  color: #fff;
  border-radius: var(--admin-radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--admin-shadow-lg);
  z-index: 2000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}

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

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

/* =============================================
   Photo Previews & Thumbnails
   ============================================= */
.item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 2px solid var(--admin-border);
  margin-bottom: 0.5rem;
}

.item-thumb-wide {
  width: 100%;
  max-width: 200px;
  height: 80px;
  border-radius: 8px;
  -o-object-fit: cover;
     object-fit: cover;
  border: 1px solid var(--admin-border);
  margin-bottom: 0.5rem;
}

.photo-preview {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 2px dashed var(--admin-border);
  border-radius: var(--admin-radius);
  text-align: center;
  background: #fafbfd;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 2px solid var(--admin-border);
}

.photo-preview-wide img {
  max-width: 200px;
  max-height: 120px;
  border-radius: 8px;
}

.photo-preview span {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .dashboard-header {
    padding: 1rem 1.25rem;
  }

  .tab-panel {
    padding: 1.25rem;
  }

  .item-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .item-actions {
    margin-left: 0;
  }

  .panel-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* =============================================
   Contact Management
   ============================================= */
.contact-manage-card {
  margin-top: 1rem;
}
.contact-manage-card form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-manage-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .contact-manage-card .form-row {
    grid-template-columns: 1fr;
  }
}

.contact-manage-card textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  font-size: 0.9rem;
  font-family: var(--admin-font);
  color: var(--admin-text);
  background: #fafbfd;
  transition: all var(--admin-transition);
  outline: none;
  resize: vertical;
}
.contact-manage-card textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 150, 0.1);
  background: #fff;
}

/* =============================================
   Faculty Layout Enhancements
   ============================================= */
.photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--admin-border);
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview-wide {
  width: 100%;
  height: 150px;
  border-radius: var(--admin-radius);
}

.item-card[data-id^="extra-"] {
  border-left: 3px solid var(--admin-accent);
}
