/* ==========================================================================
   ZUTERE AUDIOVISUAL - DEDICATED ADMIN DASHBOARD STYLESHEET (ULTRA PREMIUM)
   ========================================================================== */

:root {
  --admin-bg: #07090E;
  --admin-sidebar-bg: #0B0E17;
  --admin-card-bg: #111522;
  --admin-card-hover: #161B2E;
  --admin-input-bg: #0B0E17;
  --admin-border: rgba(255, 255, 255, 0.12);
  --admin-border-hover: rgba(255, 91, 0, 0.5);
  
  --admin-primary: #FF5B00;
  --admin-primary-hover: #FF7700;
  --admin-primary-glow: rgba(255, 91, 0, 0.35);

  --admin-text-main: #FFFFFF;
  --admin-text-sub: #CBD5E1;
  --admin-text-muted: #94A3B8;

  --admin-font-heading: 'Montserrat', sans-serif;
  --admin-font-body: 'Inter', sans-serif;
}

/* BASE RESETS FOR ADMIN */
.admin-body {
  background-color: var(--admin-bg) !important;
  color: var(--admin-text-main) !important;
  min-height: 100vh;
  font-family: var(--admin-font-body);
  margin: 0;
  padding: 0;
}

.admin-body * {
  box-sizing: border-box;
}

/* FontAwesome Icons Specificity Fix */
.admin-body i.fa-solid,
.admin-body i.fa-brands,
.admin-body i.fa-regular,
.admin-body i.fas,
.admin-body i.fab,
.admin-body i.far {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", sans-serif !important;
  font-style: normal !important;
}

/* LAYOUT STRUCTURE */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR STYLING */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 24px;
}

.admin-brand img {
  height: 52px;
  width: auto;
}

.admin-brand-info h2 {
  font-family: var(--admin-font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
}

.admin-brand-info span {
  font-size: 0.72rem;
  color: var(--admin-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  color: #CBD5E1 !important;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
}

.admin-nav-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  color: var(--admin-primary);
  transition: all 0.3s ease;
}

.admin-nav-item:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-nav-item.active {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, rgba(255, 91, 0, 0.25), rgba(255, 136, 0, 0.25)) !important;
  border-color: rgba(255, 91, 0, 0.6) !important;
  box-shadow: 0 4px 20px rgba(255, 91, 0, 0.25);
}

.admin-nav-item.active i {
  color: #FF8800 !important;
  transform: scale(1.15);
}

.admin-sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-view-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-view-site:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--admin-primary);
  box-shadow: 0 4px 15px rgba(255, 91, 0, 0.2);
}

/* MAIN CONTENT CONTAINER */
.admin-main {
  margin-left: 280px;
  flex: 1;
  padding: 40px;
  min-height: 100vh;
  background: var(--admin-bg);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  background: var(--admin-card-bg);
  padding: 24px 30px;
  border-radius: 20px;
  border: 1px solid var(--admin-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.admin-title-wrap h1 {
  font-family: var(--admin-font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}

.admin-title-wrap p {
  color: var(--admin-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.admin-header-actions {
  display: flex;
  gap: 14px;
}

/* TAB PANELS & HIDING RULES */
.admin-tab-panel {
  display: none !important;
}

.admin-tab-panel.active {
  display: block !important;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* OVERVIEW STATS GRID */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 34px;
}

.admin-stat-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.admin-stat-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(255, 91, 0, 0.15);
}

.admin-stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 91, 0, 0.15);
  border: 1px solid rgba(255, 91, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-primary);
  font-size: 1.5rem;
}

.admin-stat-info h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px 0;
  line-height: 1;
}

.admin-stat-info p {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  margin: 0;
  font-weight: 500;
}

/* PANEL CARDS */
.admin-panel-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.admin-panel-title {
  font-family: var(--admin-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-panel-title i {
  color: var(--admin-primary);
}

/* QUICK ACTIONS BUTTONS */
.btn-admin {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: none;
  font-family: var(--admin-font-body);
}

.btn-admin-primary {
  background: linear-gradient(135deg, #FF5B00, #FF8800) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(255, 91, 0, 0.4) !important;
}

.btn-admin-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 91, 0, 0.6) !important;
  background: linear-gradient(135deg, #FF6A14, #FF951A) !important;
}

.btn-admin-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.btn-admin-secondary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
  border-color: var(--admin-primary) !important;
  box-shadow: 0 4px 15px rgba(255, 91, 0, 0.2);
}

.btn-admin-danger {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #EF4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.btn-admin-danger:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.3);
}

.btn-admin-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 10px;
}

/* FORM FIELDS & INPUTS */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-label i {
  color: var(--admin-primary);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--admin-input-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  color: #FFFFFF !important;
  font-family: var(--admin-font-body) !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease !important;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none !important;
  border-color: var(--admin-primary) !important;
  box-shadow: 0 0 18px rgba(255, 91, 0, 0.35) !important;
  background: #07090E !important;
}

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

/* ITEMS GRID & CARDS */
.admin-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.admin-item-card {
  background: #0B0E17;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.admin-item-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
}

.admin-item-media {
  width: 100%;
  height: 180px;
  position: relative;
  background: #000000;
  overflow: hidden;
}

.admin-item-media img, .admin-item-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.admin-item-card:hover .admin-item-media img {
  transform: scale(1.05);
}

.admin-item-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-item-type-badge i {
  color: var(--admin-primary);
}

.admin-item-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.admin-item-desc {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.admin-item-meta {
  font-size: 0.8rem;
  color: #CBD5E1;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-item-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* TOAST NOTIFICATION FLOATING */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: #111522;
  border: 1px solid var(--admin-primary);
  border-radius: 14px;
  padding: 16px 26px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
  border-color: #10B981;
}

.toast.success i {
  color: #10B981;
}

.toast.error {
  border-color: #EF4444;
}

.toast.error i {
  color: #EF4444;
}

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

/* MODAL OVERLAY & BOX */
.admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 11, 0.9);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  padding: 20px;
}

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

.admin-modal-box {
  background: #111522;
  border: 1px solid rgba(255, 91, 0, 0.4);
  border-radius: 22px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-modal-title {
  font-family: var(--admin-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.admin-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.admin-modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

/* RESPONSIVE LAYOUT FOR TABLETS & PHONES */
@media (max-width: 992px) {
  .admin-sidebar {
    width: 240px;
  }
  .admin-main {
    margin-left: 240px;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
    padding: 16px;
  }
  .admin-brand {
    margin-bottom: 16px;
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .admin-nav-item {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .admin-sidebar-footer {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
  }
  .admin-sidebar-footer .btn-view-site {
    flex: 1;
    font-size: 0.8rem;
  }
  .admin-main {
    margin-left: 0;
    padding: 16px 12px;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .admin-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .admin-form-grid,
  .admin-items-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .admin-panel-card {
    padding: 16px;
  }
  .admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .admin-modal-box {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto !important;
  }
  #proposalPrintDocument {
    padding: 12px !important;
  }
}

/* ==========================================================================
   PRINT STYLES FOR COMMERCIAL PROPOSAL PDF GENERATION
   ========================================================================== */
@page {
  size: A4 portrait;
  margin: 4mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Force hide dashboard layout, sidebar, headers, tabs, cards and toasts */
  html, body, .admin-body {
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .admin-layout,
  .admin-sidebar,
  .admin-main,
  .admin-header,
  .admin-tab-panel,
  .admin-panel-card,
  .toast-container,
  #formQuoteGenerator {
    display: none !important;
  }

  /* Isolate modal wrapper for print */
  .admin-modal-backdrop {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #FFFFFF !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .admin-modal-box {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    overflow: visible !important;
  }

  /* Hide header controls inside modal (Close and Print buttons) */
  .admin-modal-box > div:first-child {
    display: none !important;
  }

  /* Proposal printable document fills page cleanly */
  #proposalPrintDocument {
    display: block !important;
    padding: 8px !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
  }
}


