/* ==========================================================================
   AL-PRINCE LUXURY ADMIN DASHBOARD STYLES
   ========================================================================== */

:root {
  --admin-sidebar-bg: #141210;
  --admin-sidebar-active: #231F1C;
  --admin-body-bg: #F4F1EC;
  --admin-card-bg: #FFFFFF;
  --admin-primary: #C5A059;
  --admin-primary-dark: #9F7A36;
  --admin-text-main: #1D1A17;
  --admin-text-muted: #746E68;
  --admin-border: #E5DFD7;
  --admin-radius: 12px;
}

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

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--admin-body-bg);
  color: var(--admin-text-main);
  direction: rtl;
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar-bg);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  border-left: 1px solid rgba(197, 160, 89, 0.2);
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ECC880, #C5A059);
  color: #12100E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
}

.sidebar-brand-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  color: var(--admin-primary);
  letter-spacing: 0.5px;
}

.sidebar-nav {
  list-style: none;
  padding: 20px 14px;
  overflow-y: auto;
  flex-grow: 1;
}

.sidebar-nav li {
  margin-bottom: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 10px;
  color: #CFC7BF;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.sidebar-nav a .nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-nav a i {
  font-size: 1.1rem;
  color: var(--admin-primary);
  width: 22px;
  text-align: center;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
  background: var(--admin-sidebar-active);
  color: #FFFFFF;
  border-right: 3px solid var(--admin-primary);
}

.sidebar-badge {
  background: #E53935;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #D32F2F;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(211, 47, 47, 0.1);
  transition: 0.2s;
}

.sidebar-footer a:hover {
  background: #D32F2F;
  color: #FFFFFF;
}

/* Main Content Area */
.admin-main {
  flex-grow: 1;
  margin-right: 280px;
  padding: 34px 40px;
  max-width: calc(100% - 280px);
}

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

.admin-title-area h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--admin-text-main);
}

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

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  transition: 0.2s;
}

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

/* Flash Messages */
.admin-alert {
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.admin-alert.success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}

.admin-alert.danger {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
}

/* Admin Cards & Content Sections */
.admin-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  padding: 28px;
  margin-bottom: 30px;
}

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

.admin-card-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

/* Form Styles */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

.admin-form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--admin-text-main);
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #FAF8F5;
  color: var(--admin-text-main);
  outline: none;
  transition: 0.2s;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  border-color: var(--admin-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.btn-primary-admin {
  padding: 12px 28px;
  background: linear-gradient(135deg, #ECC880, #C5A059);
  color: #12100E;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.btn-primary-admin:hover {
  background: linear-gradient(135deg, #F3D799, #D4AF37);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

/* Requests Table */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.admin-table th {
  padding: 14px 18px;
  background: #F8F6F2;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  border-bottom: 2px solid var(--admin-border);
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.92rem;
  vertical-align: middle;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-block;
}

.status-badge.new {
  background: #FFEBEE;
  color: #C62828;
}

.status-badge.contacted {
  background: #FFF8E1;
  color: #F57F17;
}

.status-badge.scheduled {
  background: #E3F2FD;
  color: #1565C0;
}

.status-badge.completed {
  background: #E8F5E9;
  color: #2E7D32;
}

.btn-wa-reply {
  background: #25D366;
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.btn-wa-reply:hover {
  background: #1EBE5D;
}

/* Modals */
.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.admin-modal-content {
  background: #FFFFFF;
  border-radius: var(--admin-radius);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.admin-modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--admin-text-muted);
}

/* Login Page Specific */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #26221E 0%, #12100E 100%);
  padding: 24px;
}

.admin-login-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 44px 38px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(197, 160, 89, 0.3);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-brand-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ECC880, #C5A059);
  color: #12100E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
}
