/* ========================================================
   Picto Portfolio - Enterprise CMS Admin Dashboard
   Sleek, Formal, Corporate UI (Linear / Vercel / Stripe Style)
   No AI Gradients, No Flashy Shadows, 100% Professional
   ======================================================== */

:root {
  --admin-primary: #0f172a;
  --admin-primary-hover: #1e293b;
  --admin-accent: #2563eb;
  --admin-accent-hover: #1d4ed8;
  --admin-sidebar-bg: #090d16;
  --admin-sidebar-border: #1e293b;
  --admin-sidebar-text: #94a3b8;
  --admin-sidebar-hover: #172033;
  --admin-sidebar-active: #1e293b;
  --admin-sidebar-active-text: #ffffff;
  --admin-bg: #f8fafc;
  --admin-card-bg: #ffffff;
  --admin-border: #e2e8f0;
  --admin-border-subtle: #f1f5f9;
  --admin-text-main: #0f172a;
  --admin-text-muted: #64748b;
  --admin-text-subtle: #94a3b8;
  --admin-success: #059669;
  --admin-warning: #d97706;
  --admin-danger: #dc2626;
  --admin-radius: 8px;
  --admin-radius-sm: 6px;
  --admin-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --admin-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

body.admin-body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* Sidebar */
.admin-sidebar {
  width: 270px;
  background-color: var(--admin-sidebar-bg);
  border-left: 1px solid var(--admin-sidebar-border);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

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

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.admin-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--admin-radius-sm);
  background-color: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  font-size: 15px;
}

.admin-brand-text h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.admin-brand-text span {
  font-size: 11px;
  color: var(--admin-sidebar-text);
  display: block;
}

/* Sidebar Nav */
.admin-nav {
  padding: 14px 10px;
  list-style: none;
  margin: 0;
  flex-grow: 1;
}

.admin-nav-item {
  margin-bottom: 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  border-radius: var(--admin-radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-nav-link i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: #64748b;
  transition: color 0.15s ease;
}

.admin-nav-link:hover {
  background-color: var(--admin-sidebar-hover);
  color: #ffffff;
}

.admin-nav-link:hover i {
  color: #cbd5e1;
}

.admin-nav-link.active {
  background-color: var(--admin-sidebar-active);
  color: var(--admin-sidebar-active-text);
  font-weight: 600;
  border-right: 3px solid #3b82f6;
}

.admin-nav-link.active i {
  color: #60a5fa;
}

.admin-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--admin-sidebar-border);
}

.btn-sidebar-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--admin-radius-sm);
  background-color: #172033;
  border: 1px solid #334155;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-sidebar-view:hover {
  background-color: #1e293b;
  color: #ffffff;
  border-color: #475569;
}

/* Main Content Area */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Header */
.admin-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-header-title h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--admin-text-main);
  letter-spacing: -0.3px;
}

.admin-header-title p {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 2px 0 0 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Admin Container */
.admin-container {
  padding: 28px 32px 60px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

/* Sections */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* Cards */
.admin-card {
  background-color: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text-main);
}

.admin-card-header h3 i {
  color: var(--admin-text-muted);
  font-size: 14px;
}

/* Executive Export Summary Card */
.export-hero-banner {
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  border-right: 4px solid #0f172a;
  border-radius: var(--admin-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.export-hero-content h2 {
  color: var(--admin-text-main);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-hero-content p {
  color: var(--admin-text-muted);
  font-size: 13.5px;
  margin: 0;
  max-width: 620px;
  line-height: 1.6;
}

.export-hero-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Metric Stats Box */
.admin-metric-card {
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 18px 20px;
  box-shadow: var(--admin-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-metric-info span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--admin-text-muted);
  display: block;
  margin-bottom: 4px;
}

.admin-metric-info h4 {
  font-size: 24px;
  font-weight: 700;
  color: var(--admin-text-main);
  margin: 0;
}

.admin-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--admin-radius-sm);
  background-color: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Form Controls */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-main);
  margin-bottom: 6px;
  display: block;
}

.form-label-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--admin-text-muted);
  margin-right: 6px;
}

.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: 9px 13px;
  font-size: 13.5px;
  border: 1px solid #cbd5e1;
  border-radius: var(--admin-radius-sm);
  background-color: #ffffff;
  color: var(--admin-text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  border-color: #0f172a;
  outline: none;
  box-shadow: 0 0 0 1px #0f172a;
}

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

/* Image Upload Box */
.image-uploader-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: #f8fafc;
  border: 1px solid var(--admin-border);
  padding: 14px 16px;
  border-radius: var(--admin-radius-sm);
}

.image-preview-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--admin-radius-sm);
  object-fit: cover;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.image-uploader-controls {
  flex-grow: 1;
}

.image-file-input {
  display: none;
}

/* Formal Corporate Buttons */
.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--admin-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn-admin-primary {
  background-color: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.btn-admin-primary:hover {
  background-color: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

.btn-admin-accent {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-admin-accent:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.btn-admin-success {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

.btn-admin-success:hover {
  background-color: #047857;
  border-color: #047857;
  color: #ffffff;
}

.btn-admin-outline {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.btn-admin-outline:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-admin-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.btn-admin-danger:hover {
  background-color: #fee2e2;
  border-color: #f87171;
  color: #7f1d1d;
}

/* Formal Palette Switcher */
.color-picker-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-preset-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--admin-radius-sm);
  background-color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.color-preset-card .swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.color-preset-card:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.color-preset-card.active {
  border-color: #0f172a;
  background-color: #f1f5f9;
  font-weight: 600;
}

/* Repeater Items */
.repeater-item-box {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
}

.repeater-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.repeater-item-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.repeater-item-title i {
  color: #64748b;
}

/* Info Box */
.admin-info-box {
  padding: 14px 16px;
  background-color: #f8fafc;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
}

.admin-info-box h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--admin-text-main);
}

.admin-info-box p {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Formal Corporate Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--admin-radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-toast.success {
  background-color: #0f172a;
  border-right: 4px solid #10b981;
}

.admin-toast.error {
  background-color: #0f172a;
  border-right: 4px solid #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-left: none;
    border-bottom: 1px solid var(--admin-sidebar-border);
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
  }
  .admin-nav-item {
    flex-shrink: 0;
  }
  .admin-header {
    padding: 14px 16px;
  }
  .admin-container {
    padding: 18px 16px 40px;
  }
}
