/* dynamic-portfolio/admin/css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root,
[data-admin-theme="light"] {
  /* Light Theme (Crisp Apple/Tailwind Studio Light) */
  --admin-bg: #f4f6fb;
  --admin-surface: #ffffff;
  --admin-sidebar: #ffffff;
  --admin-sidebar-border: #e2e8f0;
  --admin-header-border: #e2e8f0;
  --admin-card: #ffffff;
  --admin-card-bg: #ffffff;
  --admin-card-border: #e2e8f0;
  --admin-text-main: #1b2559;
  --admin-text-muted: #8f9bba;
  --admin-text-sub: #707eae;

  /* Dashboard Metric Card Colors */
  --card-green-icon: #10b981;
  --card-green-bg: #e6f9f0;
  --card-blue-icon: #3b82f6;
  --card-blue-bg: #ebf5ff;
  --card-red-icon: #f43f5e;
  --card-red-bg: #fff0f3;
  --card-cyan-icon: #0ea5e9;
  --card-cyan-bg: #e0f8ff;

  --accent-primary: #0284c7;
  --accent-hover: #0369a1;

  --shadow-sm: 0 2px 6px rgba(112, 126, 174, 0.08);
  --shadow-card: 0 4px 18px rgba(112, 126, 174, 0.08);
  --shadow-hover: 0 10px 24px rgba(112, 126, 174, 0.12);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --sidebar-width: 260px;
  --header-height: 72px;
}

[data-admin-theme="dark"] {
  --admin-bg: #0b1437;
  --admin-surface: #111c44;
  --admin-sidebar: #111c44;
  --admin-sidebar-border: rgba(255, 255, 255, 0.08);
  --admin-header-border: rgba(255, 255, 255, 0.08);
  --admin-card: #111c44;
  --admin-card-bg: #111c44;
  --admin-card-border: rgba(255, 255, 255, 0.06);
  --admin-text-main: #ffffff;
  --admin-text-muted: #8f9bba;
  --admin-text-sub: #a3aed0;

  --card-green-icon: #4ade80;
  --card-green-bg: rgba(74, 222, 128, 0.15);
  --card-blue-icon: #60a5fa;
  --card-blue-bg: rgba(96, 165, 250, 0.15);
  --card-red-icon: #fb7185;
  --card-red-bg: rgba(251, 113, 133, 0.15);
  --card-cyan-icon: #38bdf8;
  --card-cyan-bg: rgba(56, 189, 248, 0.15);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   GLOBAL RESET & OVERFLOW-X NORMALIZATION
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: var(--font-main);
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.5;
  min-height: 100vh;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   LOGIN AUTHENTICATION SCREEN
   ========================================================================== */
.admin-login-screen {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: #040714;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
}

.login-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  opacity: 0.4;
}

.login-bg-glow.glow-top {
  width: min(550px, 90vw);
  height: min(550px, 90vw);
  background: radial-gradient(circle, #00f2fe 0%, #0284c7 70%, transparent 100%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

.login-bg-glow.glow-bottom {
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, #6366f1 0%, #4338ca 70%, transparent 100%);
  bottom: -220px;
  right: 15%;
  opacity: 0.35;
}

.login-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 242, 254, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 242, 254, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.login-card-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  box-sizing: border-box;
}

.glass-cyber-card {
  width: 100%;
  max-width: 100%;
  background: rgba(10, 16, 32, 0.85) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 24px !important;
  padding: clamp(1.5rem, 4vw, 2.5rem) !important;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.8), 0 0 60px -10px rgba(0, 242, 254, 0.16) !important;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  box-sizing: border-box;
  transition: all 0.35s ease;
}

.login-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.cyber-shield-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(0, 242, 254, 0.12));
  border: 1px solid rgba(0, 242, 254, 0.55);
  color: #00f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
}

.shield-pulse {
  position: absolute;
  inset: -5px;
  border-radius: 24px;
  border: 1px solid rgba(0, 242, 254, 0.4);
  animation: cyberPulseRing 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes cyberPulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.sec-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 0.32rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  max-width: 100%;
  text-align: center;
}

.sec-status-pill .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
}

.login-header {
  text-align: center;
  width: 100%;
}

.login-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.gradient-cyan {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.login-card .form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.label-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.input-icon {
  position: absolute;
  left: 1.1rem;
  font-size: 1.05rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
}

.cyber-input {
  width: 100% !important;
  max-width: 100% !important;
  background: rgba(2, 6, 23, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 14px !important;
  padding: 0.9rem 2.8rem 0.9rem 3.1rem !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
}

.cyber-input:focus {
  outline: none !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25) !important;
  background: rgba(2, 6, 23, 0.95) !important;
}

.pwd-eye-btn {
  position: absolute;
  right: 0.85rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 3;
}

.pwd-eye-btn:hover {
  color: #00f2fe;
  transform: scale(1.1);
}

.btn-admin-auth {
  width: 100%;
  max-width: 100%;
  padding: 0.95rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  color: #020617;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-sizing: border-box;
  transition: all 0.25s ease;
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.35);
  margin-top: 0.5rem;
}

.btn-admin-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.5);
  background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
}

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

.login-footer-security {
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.sec-telemetry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.telemetry-item .t-label {
  color: #64748b;
  margin-right: 0.3rem;
}

.telemetry-item .t-val {
  color: #94a3b8;
  font-weight: 600;
}

.telemetry-item .t-val.text-green {
  color: #22c55e;
}

/* ==========================================================================
   FORM CONTROLS & SHARED INPUT STYLES
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--admin-text-main);
  margin-bottom: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-input, .form-textarea, .form-select,
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="file"],
textarea, select {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.85rem 1.1rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-sm);
  color: var(--admin-text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  outline: none;
  box-sizing: border-box !important;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus,
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  background: var(--admin-surface);
}

.form-textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.5;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  text-decoration: none;
  max-width: 100%;
  white-space: nowrap;
}

.btn-admin-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-admin-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-admin-secondary {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.btn-admin-secondary:hover {
  background: rgba(2, 132, 199, 0.2);
  color: #ffffff;
}

.btn-admin-outline {
  background: transparent;
  border: 1px solid var(--admin-card-border);
  color: var(--admin-text-main);
}

.btn-admin-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-group-wrap, .form-actions-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.login-hint {
  padding: 0.85rem 1rem;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0ea5e9;
  border-radius: 4px;
  font-size: 0.84rem;
  color: var(--admin-text-sub);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

/* ==========================================================================
   ADMIN APP LAYOUT (Sidebar + Main Content)
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Left Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  max-width: 260px;
  flex-shrink: 0;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 1.4rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--admin-sidebar-border);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar-brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--admin-text-main);
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
}

/* Admin Profile Card in Sidebar */
.sidebar-user-pill {
  margin: 1.1rem 0.85rem 0.4rem 0.85rem;
  padding: 0.75rem 0.85rem;
  background: var(--admin-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
  overflow: hidden;
}

.sidebar-user-info h4 {
  font-size: 0.9rem;
  color: var(--admin-text-main);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info p {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Nav List */
.sidebar-nav {
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-grow: 1;
  box-sizing: border-box;
}

.nav-category-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-text-muted);
  padding: 0.6rem 0.75rem 0.2rem 0.75rem;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--admin-text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.sidebar-link:hover {
  background: var(--admin-bg);
  color: var(--accent-primary);
}

.sidebar-link.active {
  background: var(--card-blue-bg);
  color: var(--accent-primary);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.link-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}

.link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-pill {
  background: #f43f5e;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--admin-sidebar-border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.admin-main {
  flex: 1;
  min-width: 0; /* Crucial for flex child width calculation */
  width: 100%;
  max-width: 100%;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-main.expanded {
  margin-left: 0;
}

/* Top Navigation Bar */
.admin-topbar {
  height: var(--header-height);
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1.2rem);
  min-width: 0;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--admin-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--admin-bg);
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--admin-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 1.2rem);
  flex-shrink: 0;
}

.btn-view-website {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: #0284c7;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: background 0.2s ease;
  white-space: nowrap;
}

.btn-view-website:hover {
  background: #0369a1;
}

.topbar-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--admin-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--admin-text-main);
  position: relative;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.topbar-action-btn:hover {
  transform: scale(1.05);
}

.topbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #f43f5e;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

/* Main Dashboard Body */
.admin-content {
  padding: clamp(1rem, 2.2vw, 2rem);
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.admin-tab-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   FLUID RESPONSIVE METRIC CARDS GRID
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 1.6vw, 1.4rem);
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.metric-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-md);
  padding: clamp(1.1rem, 2vw, 1.4rem) 1.4rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.metric-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.metric-title {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: var(--admin-text-main);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Color Styles for Cards */
.card-green .metric-icon-box {
  background: var(--card-green-bg);
  color: var(--card-green-icon);
}

.card-blue .metric-icon-box {
  background: var(--card-blue-bg);
  color: var(--card-blue-icon);
}

.card-red .metric-icon-box {
  background: var(--card-red-bg);
  color: var(--card-red-icon);
}

.card-cyan .metric-icon-box {
  background: var(--card-cyan-bg);
  color: var(--card-cyan-icon);
}

/* ==========================================================================
   DATA TABLES & CMS CARD PANELS
   ========================================================================== */
.admin-card-panel, .admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.8rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.panel-header, .admin-card-header {
  padding: clamp(1rem, 2vw, 1.4rem) clamp(1.2rem, 2.5vw, 1.8rem);
  border-bottom: 1px solid var(--admin-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.panel-title, .admin-card-title {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--admin-text-main);
  font-weight: 700;
}

.admin-card-desc {
  font-size: 0.85rem;
  color: var(--admin-text-sub);
  margin-top: 0.3rem;
}

.panel-body {
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.admin-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 0.95rem 1.1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-card-border);
  font-weight: 700;
  white-space: nowrap;
}

.admin-table td {
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--admin-card-border);
  color: var(--admin-text-main);
}

.admin-table tr:hover td {
  background: var(--admin-bg);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-tag.new {
  background: #ffe4e6;
  color: #e11d48;
}

.status-tag.contacted {
  background: #dbeafe;
  color: #2563eb;
}

.status-tag.completed {
  background: #dcfce7;
  color: #16a34a;
}

.action-btn-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-table-action {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--admin-card-border);
  background: var(--admin-surface);
  color: var(--admin-text-main);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-table-action:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-table-action.delete:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fee2e2;
}

/* ==========================================================================
   FLUID RESPONSIVE CMS GRIDS & CONTAINERS
   ========================================================================== */
.cms-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 1.8vw, 1.4rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cms-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 1.8vw, 1.4rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cms-grid-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)) auto;
  gap: 1rem;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cms-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.photo-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 55, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 1.5rem);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  overflow-y: auto;
  transition: opacity 0.25s ease;
}

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

.admin-modal-box {
  background: var(--admin-surface);
  border-radius: var(--radius-lg);
  max-width: min(650px, 95vw);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.admin-modal-overlay.active .admin-modal-box {
  transform: scale(1);
}

.modal-close-cross {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--admin-bg);
  color: var(--admin-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* =========================================================================
   UNIVERSAL ADMIN RESPONSIVE BREAKPOINT ARCHITECTURE
   ========================================================================= */
.sidebar-backdrop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 20, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99;
}

@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.15rem;
  }
}

@media (max-width: 992px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 85vw);
    max-width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-sidebar.open + .sidebar-backdrop-overlay,
  .sidebar-backdrop-overlay.active {
    display: block;
  }
  .admin-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
  .sidebar-toggle-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 1rem;
    height: 64px;
  }
  .topbar-title {
    font-size: 1.15rem;
  }
  .btn-view-website span {
    display: none;
  }
  .btn-view-website {
    padding: 0.5rem 0.65rem;
  }
  .admin-content {
    padding: 1.1rem 0.85rem;
  }
  .panel-header, .admin-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 0.85rem;
  }
  .metric-card {
    padding: 1rem 1.1rem;
  }
  .metric-value {
    font-size: 1.4rem;
  }
  .cms-grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .cms-grid-skills {
    grid-template-columns: 1fr;
  }
  .cms-skills-grid {
    grid-template-columns: 1fr;
  }
  .photo-manager-grid {
    grid-template-columns: 1fr;
  }
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
  .admin-modal-box {
    padding: 1.35rem 1.1rem;
    max-width: 95vw;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    gap: 0.4rem;
    padding: 0 0.75rem;
  }
  .topbar-right {
    gap: 0.4rem;
  }
  .topbar-action-btn {
    width: 36px;
    height: 36px;
  }
  .form-input, .form-textarea, .form-select {
    font-size: 0.9rem;
    padding: 0.75rem 0.9rem;
  }
  .btn-admin {
    width: 100%;
    justify-content: center;
  }
  .btn-group-wrap {
    flex-direction: column;
    width: 100%;
  }
  .btn-group-wrap .btn-admin {
    width: 100%;
  }
}

/* ==========================================================================
   ADMIN NOTIFICATIONS DROPDOWN
   ========================================================================== */
.topbar-notif-wrapper {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  background: rgba(11, 20, 55, 0.98) !important;
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 242, 254, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: notifSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 242, 254, 0.08);
  border-bottom: 1px solid var(--admin-card-border);
  box-sizing: border-box;
}

.notif-link-btn {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.notif-link-btn:hover {
  text-decoration: underline;
}

.notif-body {
  max-height: 330px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.notif-item {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.notif-item:hover {
  background: rgba(0, 242, 254, 0.08);
}

.notif-item.unread {
  background: rgba(0, 242, 254, 0.07);
  border-left: 3px solid #00f2fe;
}

.notif-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--admin-text-main);
}

.notif-item-time {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.notif-item-subject {
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
}

.notif-item-msg {
  font-size: 0.8rem;
  color: var(--admin-text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 0.88rem;
}

.notif-footer {
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--admin-card-border);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

/* =========================================================================
   SWITCH TOGGLE STYLES (CMS CONTROLS)
   ========================================================================= */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.switch-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, #0284c7, #00f2fe);
  border-color: #00f2fe;
}

.switch-toggle input:checked + .toggle-slider::before {
  transform: translateX(24px);
  background-color: #020617;
}

/* ==========================================================================
   EXPLICIT LIGHT THEME COMPONENT OVERRIDES
   ========================================================================== */
[data-admin-theme="light"] body,
[data-admin-theme="light"] .admin-layout {
  background-color: #f4f6fb !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .admin-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

[data-admin-theme="light"] .sidebar-header {
  border-bottom: 1px solid #edf2f7 !important;
}

[data-admin-theme="light"] .sidebar-user-pill {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-admin-theme="light"] .sidebar-link {
  color: #707eae !important;
}

[data-admin-theme="light"] .sidebar-link:hover {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
}

[data-admin-theme="light"] .sidebar-link.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

[data-admin-theme="light"] .admin-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-admin-theme="light"] .topbar-title {
  color: #1b2559 !important;
}

[data-admin-theme="light"] .sidebar-toggle-btn {
  color: #1b2559 !important;
}

[data-admin-theme="light"] .sidebar-toggle-btn:hover {
  background: #f1f5f9 !important;
}

[data-admin-theme="light"] .topbar-action-btn {
  background: #f4f6fb !important;
  border: 1px solid #e2e8f0 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .topbar-action-btn:hover {
  background: #e2e8f0 !important;
}

[data-admin-theme="light"] .admin-card-panel,
[data-admin-theme="light"] .admin-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(112, 126, 174, 0.08) !important;
}

[data-admin-theme="light"] .panel-header,
[data-admin-theme="light"] .admin-card-header {
  border-bottom: 1px solid #edf2f7 !important;
}

[data-admin-theme="light"] .panel-title,
[data-admin-theme="light"] .admin-card-title {
  color: #1b2559 !important;
}

[data-admin-theme="light"] .admin-card-desc {
  color: #707eae !important;
}

[data-admin-theme="light"] .metric-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(112, 126, 174, 0.06) !important;
}

[data-admin-theme="light"] .metric-title {
  color: #8f9bba !important;
}

[data-admin-theme="light"] .metric-value {
  color: #1b2559 !important;
}

[data-admin-theme="light"] .form-input,
[data-admin-theme="light"] .form-textarea,
[data-admin-theme="light"] .form-select,
[data-admin-theme="light"] input[type="text"],
[data-admin-theme="light"] input[type="email"],
[data-admin-theme="light"] input[type="password"],
[data-admin-theme="light"] input[type="url"],
[data-admin-theme="light"] input[type="number"],
[data-admin-theme="light"] textarea,
[data-admin-theme="light"] select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .form-input:focus,
[data-admin-theme="light"] .form-textarea:focus,
[data-admin-theme="light"] .form-select:focus,
[data-admin-theme="light"] input:focus,
[data-admin-theme="light"] textarea:focus,
[data-admin-theme="light"] select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
  background: #ffffff !important;
}

[data-admin-theme="light"] .admin-table th {
  background: #f8fafc !important;
  color: #707eae !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-admin-theme="light"] .admin-table td {
  border-bottom: 1px solid #edf2f7 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .admin-table tr:hover td {
  background: #f8fafc !important;
}

[data-admin-theme="light"] .btn-table-action {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .btn-table-action:hover {
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

[data-admin-theme="light"] .btn-admin-outline {
  border: 1px solid #cbd5e1 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .notif-dropdown {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 15px 45px rgba(112, 126, 174, 0.15) !important;
}

[data-admin-theme="light"] .notif-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-admin-theme="light"] .notif-item {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1b2559 !important;
}

[data-admin-theme="light"] .notif-item:hover {
  background: #f8fafc !important;
}

[data-admin-theme="light"] .admin-modal-box {
  background: #ffffff !important;
  color: #1b2559 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(112, 126, 174, 0.2) !important;
}

[data-admin-theme="light"] .toggle-slider {
  background-color: #cbd5e1 !important;
  border-color: #94a3b8 !important;
}

