/* ==========================================================================
   Wedding Planner Admin — Main Stylesheet
   Fonts: Cormorant Garamond (headings), DM Sans (body) via Google Fonts
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --color-cream:       #FFFDF8;
  --color-blush:       #F9EEF0;
  --color-blush-dark:  #F0DDE1;
  --color-rose:        #E8B4BC;
  --color-rose-dark:   #D4919C;
  --color-gold:        #D4AF37;
  --color-gold-dark:   #B8960C;
  --color-gold-muted:  #C9A84C;
  --color-gold-faint:  rgba(212, 175, 55, 0.15);
  --color-text:        #2C2C2C;
  --color-text-muted:  #8A8580;
  --color-text-light:  #B0ABA5;
  --color-white:       #FFFFFF;
  --color-border:      #E8D5C4;
  --color-border-light: rgba(212, 175, 55, 0.15);

  --color-green:       #4CAF7D;
  --color-green-bg:    #EAF7F0;
  --color-red:         #E05C5C;
  --color-red-bg:      #FDF0F0;
  --color-yellow:      #D4AA3A;
  --color-yellow-bg:   #FDF8E6;
  --color-gray-bg:     #F2F2F0;
  --color-gray:        #9C9C99;

  --sidebar-width:     240px;
  --radius-sm:         6px;
  --radius-md:         8px;
  --radius-lg:         12px;
  --radius-xl:         16px;
  --radius-full:       9999px;

  --shadow-sm:         0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-md:         0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg:         0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-modal:      0 16px 64px rgba(0, 0, 0, 0.18);

  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;

  --font-heading:      'Cormorant Garamond', Georgia, serif;
  --font-body:         'DM Sans', system-ui, -apple-system, sans-serif;

  --z-sidebar:         100;
  --z-modal:           500;
  --z-overlay:         490;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   3. App Shell & Layout
   -------------------------------------------------------------------------- */

.app-shell {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(160deg, var(--color-cream) 0%, var(--color-blush) 100%);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar — Brand */

.sidebar-brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-script {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--color-gold);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.1rem;
}

/* Sidebar — Navigation */

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-group-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold-muted);
  padding: 1rem 1.25rem 0.35rem;
  opacity: 0.85;
}

.nav-item {
  position: relative;
}

.nav-item a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-right: 0.5rem;
}

.nav-soon-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-right: 0.5rem;
  cursor: default;
  box-sizing: border-box;
  width: calc(100% - 0.5rem);
}

.nav-item a:hover {
  background-color: rgba(232, 180, 188, 0.25);
  color: var(--color-text);
}

.nav-item.active a {
  background-color: var(--color-blush);
  color: var(--color-text);
  font-weight: 500;
  border-left-color: var(--color-gold);
}

.nav-item.active a .nav-icon {
  color: var(--color-gold);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.nav-item a:hover .nav-icon {
  color: var(--color-rose-dark);
}

/* Sidebar — Footer */

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border-light);
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color var(--transition-base);
  border-radius: var(--radius-sm);
}

.sidebar-link:hover {
  color: var(--color-text);
}

.sidebar-link .nav-icon {
  width: 14px;
  height: 14px;
}

.sidebar-link.logout {
  color: var(--color-text-muted);
}

.sidebar-link.logout:hover {
  color: var(--color-red);
}

.sidebar-link.logout:hover .nav-icon {
  color: var(--color-red);
}

/* --------------------------------------------------------------------------
   5. Main Content Area
   -------------------------------------------------------------------------- */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  overflow-y: auto;
  padding: 2rem 2.5rem;
  background-color: var(--color-cream);
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   6. Page Structure
   -------------------------------------------------------------------------- */

.page-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.page-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.card-sm {
  padding: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-header .card-title {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              opacity var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — gold */
.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background-color: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.btn-primary:active {
  background-color: var(--color-gold-dark);
  box-shadow: none;
}

/* Secondary — blush */
.btn-secondary {
  background-color: var(--color-blush);
  color: var(--color-rose-dark);
  border-color: var(--color-rose);
}

.btn-secondary:hover {
  background-color: var(--color-blush-dark);
  border-color: var(--color-rose-dark);
}

.btn-secondary:active {
  background-color: var(--color-rose);
  color: var(--color-white);
}

/* Ghost — outlined rose */
.btn-ghost {
  background-color: transparent;
  color: var(--color-rose-dark);
  border-color: var(--color-rose);
}

.btn-ghost:hover {
  background-color: var(--color-blush);
  border-color: var(--color-rose-dark);
}

.btn-ghost:active {
  background-color: var(--color-blush-dark);
}

/* Danger */
.btn-danger {
  background-color: var(--color-red-bg);
  color: var(--color-red);
  border-color: rgba(224, 92, 92, 0.35);
}

.btn-danger:hover {
  background-color: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.btn-danger:active {
  background-color: #c44a4a;
  border-color: #c44a4a;
  color: var(--color-white);
}

/* Small variant */
.btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

/* Extra-small variant (used in table toggles) */
.btn-xs {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

/* Icon-only square */
.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  padding: 0.3rem;
}

/* Toggle button group */
.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border, #e5e7eb);
}

.btn-group .btn {
  border-radius: 0;
  border: none;
  margin: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}

.form-control::placeholder {
  color: var(--color-text-light);
}

.form-control:hover {
  border-color: var(--color-rose);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

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

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8580' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.form-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.form-hint.error {
  color: var(--color-red);
}

.form-control.is-invalid {
  border-color: var(--color-red);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(224, 92, 92, 0.15);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-gold);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   10. Data Table
   -------------------------------------------------------------------------- */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.data-table thead {
  background-color: var(--color-cream);
}

.data-table th {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(232, 213, 196, 0.5);
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background-color: rgba(249, 238, 240, 0.55);
}

.data-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. Badges
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  padding: 2px 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.6;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  padding: 1px 7px;
  letter-spacing: 0.03em;
  background-color: var(--color-blush);
  color: var(--color-rose-dark);
  margin-left: auto;
}

/* RSVP variants */
.badge-green {
  background-color: var(--color-green-bg);
  color: var(--color-green);
  border: 1px solid rgba(76, 175, 125, 0.25);
}

.badge-red {
  background-color: var(--color-red-bg);
  color: var(--color-red);
  border: 1px solid rgba(224, 92, 92, 0.25);
}

.badge-yellow {
  background-color: var(--color-yellow-bg);
  color: var(--color-yellow);
  border: 1px solid rgba(212, 170, 58, 0.25);
}

.badge-gray {
  background-color: var(--color-gray-bg);
  color: var(--color-gray);
  border: 1px solid rgba(156, 156, 153, 0.25);
}

/* Relation badge */
.badge-relation {
  background-color: var(--color-blush);
  color: var(--color-rose-dark);
  border: 1px solid var(--color-rose);
}

/* Gold accent badge */
.badge-gold {
  background-color: rgba(212, 175, 55, 0.12);
  color: var(--color-gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* --------------------------------------------------------------------------
   12. Dashboard Widgets
   -------------------------------------------------------------------------- */

.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.widget {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-gold);
}

.widget-icon svg {
  width: 18px;
  height: 18px;
}

.widget-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.widget-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.widget-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.widget-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.widget-meta .positive {
  color: var(--color-green);
  font-weight: 500;
}

.widget-meta .negative {
  color: var(--color-red);
  font-weight: 500;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-blush);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background-color: var(--color-green);
  transition: width var(--transition-slow);
}

.progress-fill.yellow {
  background-color: var(--color-yellow);
}

.progress-fill.red {
  background-color: var(--color-red);
}

.progress-fill.gold {
  background-color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   13. Modal
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(44, 44, 44, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  padding: 1.5rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  background-color: var(--color-white);
  max-width: 560px;
  width: 100%;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--color-border-light);
  z-index: var(--z-modal);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.modal-sm {
  max-width: 400px;
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base);
  flex-shrink: 0;
}

.modal-close:hover {
  background-color: var(--color-blush);
  color: var(--color-rose-dark);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

/* --------------------------------------------------------------------------
   14. Budget
   -------------------------------------------------------------------------- */

.budget-summary {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-end;
  padding: 1.5rem 2rem;
  background: linear-gradient(120deg, var(--color-cream) 0%, var(--color-blush) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.budget-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.budget-summary-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
  font-weight: 500;
}

.budget-summary-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.1;
}

.budget-summary-value.over-budget {
  color: var(--color-red);
}

.budget-summary-value.on-track {
  color: var(--color-green);
}

.budget-summary-divider {
  width: 1px;
  height: 48px;
  background-color: var(--color-border);
  align-self: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ── Budget table ───────────────────────────────────────────────────────── */

.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.budget-table th {
  padding: .65rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-muted, #6b7280);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  white-space: nowrap;
}

.budget-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--color-border-light, #f3f4f6);
  vertical-align: middle;
}

.budget-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.budget-category-row:hover td {
  background: var(--color-cream, #FFFDF8);
}

.budget-category-row:last-child td {
  border-bottom: none;
}

.expense-sub-rows td {
  padding: 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.expense-sub-table {
  background: var(--color-cream, #FFFDF8);
}

.expense-sub-table table td {
  border-bottom: 1px solid var(--color-border-light, #f3f4f6);
  font-size: .85rem;
}

.expense-sub-table table tr:last-child td {
  border-bottom: none;
}

.expense-sub-table table tr:hover td {
  background: var(--color-blush, #F9EEF0);
}

.expense-empty-row {
  padding: .75rem .75rem .75rem 3.5rem !important;
  font-size: .85rem;
}

.expand-icon {
  transition: transform .15s ease;
}

.expand-icon.expanded {
  transform: rotate(90deg);
}

.budget-mode-badge {
  font-size: .65rem;
  vertical-align: middle;
  margin-left: .3rem;
}

.badge-rose {
  background: var(--color-blush, #F9EEF0);
  color: var(--color-rose, #E8B4BC);
  border: 1px solid var(--color-rose, #E8B4BC);
}

.gap-xs {
  gap: .25rem;
}

/* Priority group separator in guest table */
.priority-separator td {
  padding: 0 !important;
  height: 0;
  border-bottom: 3px solid var(--color-border, #e5e7eb) !important;
}

.category-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.category-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.category-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.category-card-total {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.expense-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.expense-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-cream);
  font-size: 0.82rem;
  gap: 0.5rem;
  transition: background-color var(--transition-base);
}

.expense-row:hover {
  background-color: var(--color-blush);
}

.expense-description {
  flex: 1;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-amount {
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}

.expense-paid {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.expense-paid-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-green);
  flex-shrink: 0;
}

.expense-paid-dot.unpaid {
  background-color: var(--color-yellow);
}

/* --------------------------------------------------------------------------
   15. Seating Chart
   -------------------------------------------------------------------------- */

.seating-layout {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 7rem);
  min-height: 600px;
  gap: 0;
  overflow: hidden;
}

.unassigned-panel {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border-light);
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.unassigned-panel-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.unassigned-guests {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.seating-canvas {
  flex: 1;
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background-color: var(--color-cream);
  background-image:
    radial-gradient(circle, rgba(212, 175, 55, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  cursor: default;
}

/* Table Shapes */
.table-shape {
  position: absolute;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.table-shape:active {
  cursor: grabbing;
  z-index: 50;
}

.table-shape:hover {
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.table-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-align: center;
  margin-top: 0.25rem;
  pointer-events: none;
}

.table-round {
  border-radius: 50%;
  background-color: var(--color-white);
  border: 2px solid rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-md);
}

.table-rect {
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  border: 2px solid rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-md);
}

/* Seat Slots */
.seat-slot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px dashed var(--color-gold);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}

.seat-slot:hover {
  background-color: rgba(212, 175, 55, 0.15);
  border-color: var(--color-gold-dark);
  transform: scale(1.1);
}

.seat-slot.occupied {
  background-color: var(--color-blush);
  border: 2px solid var(--color-rose);
  border-style: solid;
}

.seat-slot.occupied:hover {
  background-color: var(--color-blush-dark);
}

/* Guest Chips */
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  background-color: var(--color-blush);
  color: var(--color-text);
  border: 1px solid var(--color-rose);
  border-radius: var(--radius-full);
  cursor: grab;
  user-select: none;
  white-space: nowrap;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base),
              opacity var(--transition-base);
}

.guest-chip:hover {
  background-color: var(--color-blush-dark);
  box-shadow: var(--shadow-sm);
}

.guest-chip:active {
  cursor: grabbing;
}

.guest-chip.dragging {
  opacity: 0.5;
  box-shadow: var(--shadow-lg);
  cursor: grabbing;
}

/* --------------------------------------------------------------------------
   15b. Floor Plan (fixed seating layout)
   -------------------------------------------------------------------------- */

.floor-plan {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.guest-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 9rem);
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.guest-panel-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
  font-weight: 600;
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.unplaced-guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.unplaced-guest:last-of-type {
  border-bottom: none;
}

.floor-room {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  overflow-x: auto;
}

.floor-room-inner {
  min-width: 780px;
}

.floor-head-section {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.floor-row-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.floor-row-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  flex-shrink: 0;
  width: 18px;
}

.long-table {
  display: flex;
  flex-direction: row;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.table-unit {
  display: flex;
  flex-direction: column;
}

.table-unit + .table-unit {
  border-left: 1px dashed rgba(212, 175, 55, 0.35);
}

.table-unit-body {
  background: rgba(212, 175, 55, 0.08);
  border-top: 1.5px solid rgba(212, 175, 55, 0.4);
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.4);
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.seat-row {
  display: flex;
  flex-direction: row;
}

.head-table-wrap {
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.head-table-body {
  background: rgba(212, 175, 55, 0.1);
  border-top: 1.5px solid rgba(212, 175, 55, 0.45);
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.45);
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 1rem;
}

/* Floor Seats */
.fp-seat {
  width: 56px;
  height: 38px;
  background: var(--color-cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.59rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  transition: background-color 0.12s;
  padding: 2px;
  line-height: 1.2;
  border: none;
}

.fp-seat + .fp-seat {
  border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.fp-seat.empty:hover {
  background: rgba(212, 175, 55, 0.1);
}

.fp-seat.empty::after {
  content: '+';
  font-size: 1rem;
  color: var(--color-text-light);
  font-weight: 300;
}

.fp-seat.rsvp-yes {
  background: var(--color-green-bg);
  color: #1f6b45;
}
.fp-seat.rsvp-yes:hover { background: #ceeee0; }

.fp-seat.rsvp-no {
  background: var(--color-red-bg);
  color: #a83535;
}
.fp-seat.rsvp-no:hover { background: #fbd7d7; }

.fp-seat.rsvp-pending {
  background: var(--color-gray-bg);
  color: #555;
}
.fp-seat.rsvp-pending:hover { background: #e5e5e3; }

.fp-seat.rsvp-maybe {
  background: var(--color-yellow-bg);
  color: #7a5f00;
}
.fp-seat.rsvp-maybe:hover { background: #f6edbb; }

/* Horseshoe layout */
.horseshoe-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.rows-col {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.rows-col .floor-row-section {
  margin-bottom: 0;
}

.head-col {
  display: flex;
  align-items: center;
  margin-left: 2.5rem;
  flex-shrink: 0;
}

.head-table-v {
  display: flex;
  flex-direction: row;
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.head-seats-v {
  display: flex;
  flex-direction: column;
}

.head-seats-v .fp-seat {
  width: 56px;
  height: 38px;
  border-left: none;
}

.head-seats-v .fp-seat + .fp-seat {
  border-left: none;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.head-table-body-v {
  width: 22px;
  background: rgba(212, 175, 55, 0.1);
  border-left: 1.5px solid rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.5rem 0;
}

/* Drag and drop */
.unplaced-guest[draggable] { cursor: grab; }
.fp-seat[draggable]        { cursor: grab; }

.unplaced-guest.dragging { opacity: 0.4; }
.fp-seat.dragging         { opacity: 0.35; }

.fp-seat.drag-over {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
  background: rgba(212, 175, 55, 0.18) !important;
}

.guest-panel.drag-over-panel {
  background: var(--color-blush);
  border-color: var(--color-rose);
}

/* Guest list in seat modal */
.seat-guest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border-light);
  transition: background-color 0.1s;
}

.seat-guest-item:last-child { border-bottom: none; }
.seat-guest-item:hover { background: var(--color-blush); }
.seat-guest-item.seat-guest-current {
  background: var(--color-blush);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   16. Utskick (Mailings) / Invitation Builder
   -------------------------------------------------------------------------- */

.invitation-layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 2rem;
  align-items: flex-start;
}

.invitation-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.invitation-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 2rem;
}

.invitation-preview {
  width: 420px;
  height: 595px;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow: hidden;
  position: relative;
  text-align: center;
}

/* Template: Classic */
.preview-classic {
  background-color: var(--color-cream);
  font-family: var(--font-heading);
}

.preview-classic .preview-heading {
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.preview-classic .preview-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0.75rem auto;
}

.preview-classic .preview-body {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.preview-classic .preview-date {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-gold);
  margin-top: 1.25rem;
}

/* Template: Modern */
.preview-modern {
  background-color: #F5F1EC;
  border-radius: var(--radius-lg);
}

.preview-modern .preview-heading {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.preview-modern .preview-body {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  letter-spacing: 0.03em;
}

.preview-modern .preview-date {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 1.25rem;
  background-color: var(--color-gold);
  color: var(--color-white);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

/* Template: Botanisk (Botanical) */
.preview-botanisk {
  background-color: #F4F7F0;
  border-radius: var(--radius-lg);
}

.preview-botanisk::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 10% 15%, rgba(100, 150, 80, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 85%, rgba(100, 150, 80, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.preview-botanisk .preview-heading {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 400;
  font-style: italic;
  color: #3D5A3E;
  margin-bottom: 0.75rem;
  position: relative;
}

.preview-botanisk .preview-body {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #5A7A5B;
  line-height: 1.9;
  position: relative;
}

.preview-botanisk .preview-date {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #3D5A3E;
  font-style: italic;
  margin-top: 1rem;
  position: relative;
}

/* --------------------------------------------------------------------------
   17. Inspiration Board
   -------------------------------------------------------------------------- */

.inspo-grid {
  columns: 3;
  column-gap: 1.25rem;
}

.inspo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  break-inside: avoid;
  cursor: pointer;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.inspo-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.inspo-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow);
}

.inspo-card:hover img {
  transform: scale(1.04);
}

.inspo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(44, 44, 44, 0.0) 0%,
    rgba(44, 44, 44, 0.55) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.inspo-card:hover .inspo-card-overlay {
  opacity: 1;
}

.inspo-card-actions {
  display: flex;
  gap: 0.4rem;
}

.inspo-card-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* Link cards with thumbnail */
.inspo-link-thumb {
  display: block;
  position: relative;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.inspo-link-thumb img {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow);
}

.inspo-card:hover .inspo-link-thumb img {
  transform: scale(1.04);
}

.inspo-link-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .5rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .35rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Link cards without thumbnail */
.inspo-link-card {
  background: var(--color-blush, #F9EEF0);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-height: 100px;
  display: flex;
  align-items: center;
}

.inspo-link-info a {
  color: var(--color-text);
  font-size: .9rem;
  word-break: break-all;
}

.inspo-link-domain {
  display: block;
  font-size: .75rem;
  color: var(--color-muted);
  margin-top: .2rem;
}

/* Instagram card */
.inspo-instagram-card {
  background: #fff0f5;
  gap: .75rem;
}

.inspo-instagram-icon {
  flex-shrink: 0;
  line-height: 0;
}

/* Ikon-knappar i overlay (vit färg mot mörk bakgrund) */
.inspo-action-btn {
  color: #fff;
}

/* Color Swatches */
.color-swatches {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-border), var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px var(--color-gold), var(--shadow-sm);
}

.color-swatch.selected {
  box-shadow: 0 0 0 2px var(--color-gold), 0 0 0 4px rgba(212, 175, 55, 0.3);
}

/* --------------------------------------------------------------------------
   18. Login Page
   -------------------------------------------------------------------------- */

.login-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-blush) 0%, var(--color-cream) 50%, var(--color-blush) 100%);
  padding: 1.5rem;
}

.login-card {
  background-color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
}

.login-brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: 2.5rem;
  color: var(--color-gold);
  line-height: 1.1;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.login-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-form .form-group:last-of-type {
  margin-bottom: 1.25rem;
}

.login-footer {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */

/* Text */
.text-muted {
  color: var(--color-text-muted);
}

.text-gold {
  color: var(--color-gold);
}

.text-sm {
  font-size: 0.8rem;
}

.text-xs {
  font-size: 0.7rem;
}

.text-lg {
  font-size: 1.05rem;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-italic {
  font-style: italic;
}

/* Display */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

/* Gaps */
.gap-sm {
  gap: 0.5rem;
}

.gap-md {
  gap: 1rem;
}

.gap-lg {
  gap: 1.5rem;
}

/* Margin Top */
.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

/* Margin Bottom */
.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Width helpers */
.w-full {
  width: 100%;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  border: none;
  margin: 1.5rem 0;
}

/* Empty state */
/* ── Noteringar ─────────────────────────────────────────────────────────── */

.memo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.memo-card {
  display: flex;
  flex-direction: column;
  cursor: default;
}

.memo-card-body {
  flex: 1;
  padding: 1.25rem 1.25rem 0.75rem;
}

.memo-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
  color: var(--color-text);
}

.memo-content {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.memo-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border-light);
  margin-top: 1.25rem;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
  gap: 0.75rem;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-text);
}

.empty-state-text {
  font-size: 0.82rem;
  max-width: 280px;
  line-height: 1.6;
}

/* Scroll area */
.scroll-area {
  overflow-y: auto;
}

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   20. Notification / Toast
   -------------------------------------------------------------------------- */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
  font-size: 0.83rem;
  max-width: 320px;
  pointer-events: auto;
  animation: toast-in 200ms ease forwards;
}

.toast.success {
  border-left: 3px solid var(--color-green);
}

.toast.error {
  border-left: 3px solid var(--color-red);
}

.toast.info {
  border-left: 3px solid var(--color-gold);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   21. Dropdown
   -------------------------------------------------------------------------- */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background-color: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 0;
  z-index: 200;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  background: none;
  border: none;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--color-blush);
}

.dropdown-item.danger {
  color: var(--color-red);
}

.dropdown-item.danger:hover {
  background-color: var(--color-red-bg);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--color-border-light);
  margin: 0.3rem 0;
}

/* --------------------------------------------------------------------------
   22. Tabs
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-direction: row;
  border-bottom: 2px solid var(--color-border-light);
  gap: 0;
  margin-bottom: 1.5rem;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-base), border-color var(--transition-base);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  text-decoration: none;
}

.tab:hover {
  color: var(--color-text);
}

.tab.active {
  color: var(--color-gold-dark);
  font-weight: 500;
  border-bottom-color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   23. Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.breadcrumbs a:hover {
  color: var(--color-gold-dark);
}

.breadcrumbs .separator {
  color: var(--color-text-light);
  user-select: none;
}

.breadcrumbs .current {
  color: var(--color-text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   24. Search Input
   -------------------------------------------------------------------------- */

.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  width: 14px;
  height: 14px;
  color: var(--color-text-light);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  padding-left: 2.25rem;
  min-width: 220px;
}

/* --------------------------------------------------------------------------
   25. Stat Row (compact single-line stats)
   -------------------------------------------------------------------------- */

.stat-row {
  display: flex;
  flex-direction: row;
  gap: 0.4rem;
  align-items: baseline;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   26. Guest Detail Panel (side sheet / drawer)
   -------------------------------------------------------------------------- */

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background-color: var(--color-white);
  border-left: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-modal);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.detail-panel.open {
  transform: translateX(0);
}

.detail-panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.detail-panel-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
}

.detail-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.detail-panel-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   27. Scrollbar Styling
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(212, 175, 55, 0.45);
}

/* --------------------------------------------------------------------------
   28. Print Styles
   -------------------------------------------------------------------------- */

@media print {
  .sidebar,
  .sidebar-footer,
  .page-actions,
  .btn,
  .modal-overlay,
  .toast-container,
  .detail-panel {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
    overflow: visible;
  }

  .invitation-preview {
    box-shadow: none;
    border: none;
    page-break-inside: avoid;
  }

  body {
    background-color: white;
    color: black;
    font-size: 11pt;
  }

  a {
    text-decoration: none;
    color: black;
  }

  .card,
  .widget {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* --------------------------------------------------------------------------
   29. Responsive Adjustments
   -------------------------------------------------------------------------- */

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

  .invitation-preview-wrapper {
    position: static;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .budget-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .inspo-grid {
    columns: 2;
  }
}

@media (max-width: 900px) {
  .main-content {
    padding: 1.5rem 1.25rem;
  }

  .widget-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .inspo-grid {
    columns: 2;
  }

  .budget-summary {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .budget-summary-divider {
    display: none;
  }
}

@media (max-width: 680px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .form-row {
    flex-direction: column;
  }

  .inspo-grid {
    columns: 1;
  }

  .modal {
    padding: 1.5rem 1.25rem;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    width: 100%;
    position: fixed;
    bottom: 0;
    top: auto;
    max-height: 90vh;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .seating-layout {
    flex-direction: column;
    height: auto;
  }

  .unassigned-panel {
    width: 100%;
    height: 150px;
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .unassigned-guests {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}
