/**
 * VowDreams Event Planner Global Stylesheet
 * Brand: dashboard.vowdreams.com
 */

:root {
  --vd-primary: #0d5c75;
  --vd-primary-dark: #083c4d;
  --vd-primary-light: #eef6f8;
  --vd-gold: #c59b27;
  --vd-gold-light: #fdf5df;
  --vd-sand: #faf7f2;
  --vd-dark: #2a2421;
  --vd-muted: #786c65;
  --vd-border: #e8e2d8;
  --vd-success: #2e7d32;
  --vd-danger: #c62828;
  --vd-warning: #ef6c00;
  --vd-sidebar-width: 260px;
  --vd-radius-lg: 20px;
  --vd-radius-md: 12px;
  --vd-radius-sm: 8px;
  --vd-shadow: 0 10px 30px rgba(13, 92, 117, 0.07);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--vd-sand);
  color: var(--vd-dark);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--vd-dark);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--vd-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--vd-gold);
}

/* App Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--vd-sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--vd-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--vd-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--vd-primary);
  color: var(--vd-gold);
  border-radius: var(--vd-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vd-muted);
  padding: 12px 16px 6px;
  font-weight: 700;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--vd-radius-md);
  color: var(--vd-dark);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-link-item:hover {
  background: var(--vd-primary-light);
  color: var(--vd-primary);
}

.nav-link-item.active {
  background: var(--vd-primary);
  color: #ffffff;
}

.nav-badge-free {
  font-size: 10px;
  background: #e8f5e9;
  color: var(--vd-success);
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: auto;
  font-weight: 700;
}

.nav-badge-pro {
  font-size: 10px;
  background: var(--vd-gold-light);
  color: #9e721d;
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: auto;
  font-weight: 700;
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: var(--vd-sidebar-width);
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header Top Bar */
.app-header {
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  box-shadow: var(--vd-shadow);
}

.header-title-wrap h1 {
  font-size: 22px;
  margin-bottom: 2px;
}

.header-title-wrap p {
  font-size: 13px;
  color: var(--vd-muted);
}

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

/* Expiry Badge Pill */
.expiry-pill {
  background: var(--vd-gold-light);
  border: 1px solid rgba(197, 155, 39, 0.4);
  color: #8c6312;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.expiry-pill.expired {
  background: #ffebee;
  border-color: #ef9a9a;
  color: var(--vd-danger);
}

/* Dashboard Cards & Grid */
.grid-stats,
.grid-stats-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.grid-stats-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.grid-stats-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .grid-stats,
  .grid-stats-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991.98px) {
  .grid-stats-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-stats,
  .grid-stats-4,
  .grid-stats-3,
  .grid-stats-2 {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-lg);
  padding: 22px;
  box-shadow: var(--vd-shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(13, 92, 117, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--vd-radius-md);
  background: var(--vd-primary-light);
  color: var(--vd-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--vd-dark);
  line-height: 1.1;
  margin-top: 6px;
}

.stat-lbl {
  font-size: 13px;
  color: var(--vd-muted);
  font-weight: 500;
}

/* Quick Actions Strip */
.quick-actions-bar {
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-lg);
  padding: 16px 20px;
  box-shadow: var(--vd-shadow);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-actions-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--vd-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-actions-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--vd-sand);
  border: 1px solid var(--vd-border);
  color: var(--vd-dark);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-action-pill:hover {
  background: var(--vd-primary-light);
  border-color: var(--vd-primary);
  color: var(--vd-primary);
  transform: translateY(-1px);
}

.btn-action-pill.gold {
  background: var(--vd-gold-light);
  border-color: rgba(197, 155, 39, 0.4);
  color: #8c6312;
}

.btn-action-pill.gold:hover {
  background: #fbf0cf;
  border-color: var(--vd-gold);
}

/* Responsive Asymmetric Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* Progress Bars & Metric Trackers */
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #f0eae1;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--vd-primary), var(--vd-gold));
  transition: width 0.4s ease;
}

.progress-bar-fill.gold {
  background: linear-gradient(90deg, #c59b27, #e5b84c);
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, #2e7d32, #4caf50);
}

/* Widget Card Items */
.widget-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--vd-sand);
  font-size: 13px;
}

.widget-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Main Card Containers */
.content-card {
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-lg);
  padding: 24px;
  box-shadow: var(--vd-shadow);
  margin-bottom: 24px;
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  background: var(--vd-sand);
  padding: 12px 16px;
  color: var(--vd-dark);
  font-weight: 600;
  border-bottom: 1px solid var(--vd-border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--vd-border);
  color: var(--vd-dark);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #fdfbf7;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: #e8f5e9; color: var(--vd-success); }
.badge-danger { background: #ffebee; color: var(--vd-danger); }
.badge-warning { background: #fff3e0; color: var(--vd-warning); }
.badge-info { background: var(--vd-primary-light); color: var(--vd-primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--vd-radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--vd-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--vd-primary-dark);
  color: #ffffff;
}

.btn-gold {
  background: var(--vd-gold);
  color: #ffffff;
}

.btn-gold:hover {
  background: #a88118;
  color: #ffffff;
}

.btn-outline {
  border-color: var(--vd-border);
  background: #ffffff;
  color: var(--vd-dark);
}

.btn-outline:hover {
  background: var(--vd-sand);
  border-color: var(--vd-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--vd-dark);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-md);
  font-size: 14px;
  background: #ffffff;
  color: var(--vd-dark);
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--vd-primary);
  box-shadow: 0 0 0 3px rgba(13, 92, 117, 0.1);
}

/* Auth Center Box (Login Page) */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, rgba(13, 92, 117, 0.08), transparent 30%),
              radial-gradient(circle at 90% 80%, rgba(197, 155, 39, 0.08), transparent 30%),
              var(--vd-sand);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(13, 92, 117, 0.1);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--vd-radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
  /* Tablet & Mobile */
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
    padding: 16px;
  }

  .mobile-menu-toggle {
    display: block !important;
  }
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--vd-dark);
  cursor: pointer;
}

/* Full-space responsive polish */
body.sidebar-open {
  overflow: hidden;
}

.app-container {
  width: 100%;
}

.app-sidebar::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(197, 155, 39, 0.45), transparent);
}

.sidebar-brand {
  justify-content: space-between;
}

.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-md);
  background: #ffffff;
  color: var(--vd-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  scrollbar-width: thin;
}

.nav-link-item {
  min-height: 44px;
}

.app-main {
  width: calc(100% - var(--vd-sidebar-width));
  padding: 24px clamp(20px, 2.5vw, 44px) 48px;
  position: relative;
}

.app-main::before {
  content: "";
  position: fixed;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(28px, 6vw, 90px);
  width: clamp(150px, 18vw, 310px);
  aspect-ratio: 1 / 1;
  background: url("../img/logo.png") center / contain no-repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
}

.content-card,
.app-header {
  width: 100%;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 760px;
}

.form-control {
  min-height: 44px;
}

.mobile-menu-toggle {
  min-height: 44px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-md);
  font-size: 16px;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(13, 92, 117, 0.08);
}

.mobile-menu-toggle i {
  font-size: 22px;
}

.mobile-menu-toggle span {
  font-size: 13px;
  font-weight: 700;
}

@media only screen and (min-width: 1200px) {
  :root {
    --vd-sidebar-width: 292px;
  }

  .app-main {
    padding-left: clamp(28px, 3vw, 56px);
    padding-right: clamp(28px, 3vw, 56px);
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 0.85fr);
  }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
  :root {
    --vd-sidebar-width: 248px;
  }

  .app-main {
    padding: 20px 22px 44px;
  }

  .app-header {
    padding: 15px 18px;
    border-radius: 16px;
  }

  .grid-stats,
  .grid-stats-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
    gap: 18px;
  }

  .content-card {
    padding: 20px;
  }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
  .app-sidebar {
    width: min(360px, 84vw);
    box-shadow: 20px 0 60px rgba(13, 92, 117, 0.18);
  }

  .app-main {
    width: 100%;
    padding: 18px 22px 42px;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .sidebar-close {
    display: inline-flex;
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(42, 36, 33, 0.36);
    z-index: 900;
  }

  .app-header {
    position: sticky;
    top: 12px;
    z-index: 850;
    padding: 14px 16px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .grid-stats,
  .grid-stats-4,
  .grid-stats-3,
  .grid-stats-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .quick-actions-bar {
    align-items: stretch;
  }

  .quick-actions-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .btn-action-pill {
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: min(324px, 88vw);
    box-shadow: 20px 0 60px rgba(13, 92, 117, 0.2);
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .sidebar-brand {
    padding: 16px;
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-nav {
    padding: 10px;
  }

  .nav-group-title {
    padding: 14px 12px 6px;
  }

  .nav-link-item {
    padding: 12px 14px;
    font-size: 15px;
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(42, 36, 33, 0.42);
    z-index: 900;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
    padding: 12px 12px 34px;
  }

  .app-main::before {
    width: 170px;
    right: -36px;
    bottom: 24px;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .app-header {
    position: sticky;
    top: 8px;
    z-index: 850;
    padding: 12px;
    border-radius: 14px;
    align-items: flex-start;
    gap: 12px;
  }

  .header-title-wrap h1 {
    font-size: 18px;
    line-height: 1.2;
  }

  .header-title-wrap p {
    font-size: 12px;
  }

  .header-actions {
    display: none;
  }

  .content-card {
    padding: 16px;
    border-radius: 16px;
  }

  .content-card-header {
    align-items: stretch;
  }

  .content-card-header > div:last-child,
  .content-card-header .btn,
  .content-card-header a.btn {
    width: 100%;
  }

  .content-card-header > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .btn {
    min-height: 44px;
    padding: 10px 14px;
  }

  .grid-stats,
  .grid-stats-4,
  .grid-stats-3,
  .grid-stats-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .quick-actions-bar {
    align-items: stretch;
    padding: 14px;
  }

  .quick-actions-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .btn-action-pill {
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
  }

  form[method="GET"] .form-control,
  form[method="GET"] .btn {
    max-width: none !important;
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-dialog {
    max-height: 88vh;
    padding: 20px;
    border-radius: 16px 16px 0 0;
  }
}
