/* da3watk Digital Invitation Atelier - Admin Dashboard Styles */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --bg-main: #0f0c13;
  --bg-card: #181320;
  --bg-card-hover: #221b2d;
  --bg-glass: rgba(24, 19, 32, 0.85);
  
  --color-border: rgba(220, 180, 160, 0.15);
  --color-border-glow: rgba(212, 155, 139, 0.4);
  
  --color-text-main: #f8f6f0;
  --color-text-muted: #b3a8b8;
  --color-text-dim: #7a7082;
  
  --rose-gold-gradient: linear-gradient(135deg, #e6b8a2 0%, #d49b8b 50%, #b87968 100%);
  --rose-gold-light: #f4d6cb;
  --rose-gold-accent: #d49b8b;
  
  --teal-accent: #3a86c8;
  --success-color: #2ec4b6;
  --danger-color: #e71d36;
  
  --font-display: 'Amiri', serif;
  --font-body: 'Tajawal', 'Cairo', sans-serif;
  
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(212, 155, 139, 0.25);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--color-text-main);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 155, 139, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(184, 121, 104, 0.05) 0%, transparent 40%);
}

a {
  color: var(--rose-gold-accent);
  text-decoration: none;
}

/* Header Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 2rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-monogram {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rose-gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1017;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--rose-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--rose-gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--rose-gold-gradient);
  color: #181016;
  box-shadow: 0 4px 15px rgba(212, 155, 139, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 155, 139, 0.45);
}

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

.btn-outline:hover {
  border-color: var(--rose-gold-accent);
  background: rgba(212, 155, 139, 0.1);
}

.btn-danger {
  background: rgba(231, 29, 54, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231, 29, 54, 0.3);
}

.btn-danger:hover {
  background: #e71d36;
  color: #fff;
}

/* Main Layout */
.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Navigation Tabs */
.tab-navigation {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--color-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #181016;
  background: var(--rose-gold-gradient);
  box-shadow: var(--shadow-glow);
}

/* Section Header */
.section-intro {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-intro h2 {
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.input-search {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  min-width: 250px;
  font-family: inherit;
}

.input-search:focus {
  outline: none;
  border-color: var(--rose-gold-accent);
}

.category-pill {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.category-pill:hover, .category-pill.active {
  background: var(--rose-gold-accent);
  color: #181016;
  border-color: var(--rose-gold-accent);
}

/* Template Grid Cards */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.tpl-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tpl-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.tpl-media {
  position: relative;
  height: 220px;
  background: #120e18;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpl-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}

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

.tpl-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--rose-gold-gradient);
  color: #181016;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

.tpl-occ {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 12, 19, 0.75);
  backdrop-filter: blur(4px);
  color: var(--rose-gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tpl-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tpl-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpl-blurb {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex: 1;
}

.tpl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Customer Invitations Table */
.data-table-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--rose-gold-light);
  font-weight: 700;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: var(--color-text-main);
  vertical-align: middle;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-stat.success {
  background: rgba(46, 196, 182, 0.15);
  color: var(--success-color);
  border: 1px solid rgba(46, 196, 182, 0.3);
}

/* Modal Overlay & Drawer */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

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

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--color-border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--rose-gold-light);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.8rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
}

/* Form Styles */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--rose-gold-light);
}

.form-control {
  width: 100%;
  background: #110d17;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--rose-gold-accent);
  box-shadow: 0 0 10px rgba(212, 155, 139, 0.2);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Preview Frame */
.preview-box {
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  height: 520px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.preview-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}
