/* ===============================
   0. ROOT & THEME
   =============================== */

:root {
  /* Paletă de culori – temă „evenimente, bucurie, relaxare” */
  --color-primary: #ff5a7a;
  --color-primary-soft: #ffe5ec;
  --color-primary-dark: #e04463;

  --color-secondary: #ffb347;
  --color-secondary-soft: #fff1de;

  --color-accent: #4fd1c5;
  --color-accent-soft: #e3faf7;

  --color-success: #38a169;
  --color-warning: #dd6b20;
  --color-danger: #e53e3e;
  --color-info: #3182ce;

  --color-bg: #050816;
  --color-bg-alt: #0b1020;
  --color-surface: #111827;
  --color-surface-soft: #1f2937;
  --color-surface-elevated: #111827f0;

  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.16);

  --color-text: #f9fafb;
  --color-text-soft: #d1d5db;
  --color-text-muted: #9ca3af;
  --color-text-invert: #050816;

  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.45);
  --shadow-sharp: 0 15px 35px rgba(15, 23, 42, 0.6);

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;

  --transition-fast: 150ms ease-out;
  --transition-med: 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-slow: 320ms cubic-bezier(0.22, 0.61, 0.36, 1);

  --nav-height: 64px;
  --container-max-width: 1200px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "Liberation Sans", sans-serif;
}

/* ===============================
   1. RESET & BASE
   =============================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ===============================
   2. LAYOUT GENERAL
   =============================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.page {
  padding-block: 1.5rem 3rem;
}

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

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Simple responsive grid */
.grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

/* ===============================
   3. TOPBAR & NAV OVERLAY
   =============================== */

.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.8)
  );
  border-bottom: 1px solid var(--color-border-subtle);
}

.topbar-inner {
  width: 100%;
  max-width: var(--container-max-width);
  padding-inline: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.topbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 0.75rem;
  background: radial-gradient(circle at 20% 0, #ffb347 0, #ff5a7a 45%, #4fd1c5 100%);
  box-shadow: var(--shadow-soft);
}

.topbar-title {
  font-weight: 600;
  font-size: 1rem;
}

.topbar-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.topbar-user-role {
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(79, 209, 197, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(79, 209, 197, 0.5);
}

.topbar-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.topbar-menu-toggle:hover {
  background: rgba(15, 23, 42, 1);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

/* Fullscreen overlay navigation */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--transition-med),
    transform var(--transition-med),
    visibility 0s linear var(--transition-med);
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--transition-med),
    transform var(--transition-med),
    visibility 0s;
}

.nav-overlay-inner {
  height: 100%;
  padding: calc(var(--nav-height) + 1.5rem) 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.nav-link {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--color-text-soft);
  cursor: pointer;
  transition:
    color var(--transition-med),
    background var(--transition-med),
    border-color var(--transition-med),
    transform var(--transition-fast);
}

.nav-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff5a7a, #ffb347);
  border-color: transparent;
  transform: translateY(-1px);
}

.nav-link--active {
  color: #fff;
  background: linear-gradient(135deg, #ff5a7a, #ffb347);
  border-color: transparent;
}

/* ===============================
   4. CARDS, PANELS & SURFACES
   =============================== */

.card {
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at top right, rgba(255, 90, 122, 0.09), transparent 55%),
    radial-gradient(circle at bottom left, rgba(79, 209, 197, 0.06), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.card-header,
.card-body,
.card-footer {
  position: relative;
  z-index: 1;
}

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

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ===============================
   5. BUTTONS
   =============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition-med),
    color var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ff5a7a, #ffb347);
  color: var(--color-text-invert);
  box-shadow: 0 12px 30px rgba(248, 113, 113, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(248, 113, 113, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--color-border-subtle);
  color: var(--color-text-soft);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--color-border-strong);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--color-text-soft);
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.8);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-soft);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.8);
}

.btn-danger {
  background: linear-gradient(135deg, #f97373, #e53e3e);
  color: var(--color-text-invert);
}

.btn-success {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: var(--color-text-invert);
}

.btn-sm {
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
}

/* Icon helper */
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  padding: 0;
}

/* ===============================
   6. FORMS
   =============================== */

.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-row {
  display: flex;
  gap: 0.85rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 90, 122, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 90, 122, 0.6);
  background: rgba(15, 23, 42, 1);
}

.form-help {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
}

/* ===============================
   7. TABLES
   =============================== */

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

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

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.table th {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.6);
}

.table tr:hover td {
  background: rgba(15, 23, 42, 0.95);
}

/* Sort icon placeholder */
.table-sortable th {
  cursor: pointer;
}

/* ===============================
   8. BADGES & STATUS
   =============================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-pill {
  border-radius: var(--radius-pill);
}

.badge-outline {
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--color-text-soft);
}

/* Event statuses */
.badge-event-activ {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.55);
}

.badge-event-inactiv {
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.badge-event-inchis {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
}

/* User statuses */
.badge-user-activ {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.badge-user-suspendat {
  background: rgba(234, 179, 8, 0.18);
  color: #fef9c3;
}

.badge-user-blocat {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

/* ===============================
   9. MODALS
   =============================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal {
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
  box-shadow: var(--shadow-sharp);
  padding: 1.25rem 1.4rem 1.3rem;
}

/* ===============================
   10. HOSTESS PAGE – HERO & GRID
   =============================== */

.hero-event {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 220px;
  background: #0f172a;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sharp);
}

.hero-event-cover {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.02);
  filter: brightness(0.7) saturate(1.2);
}

.hero-event-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.95)),
    radial-gradient(circle at top left, rgba(255, 90, 122, 0.3), transparent 55%);
}

.hero-event-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 1.25rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
}

.hero-meta {
  max-width: 70%;
}

.hero-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);
}

.hero-subline {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.hero-salon {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-soft);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.hero-actions-left,
.hero-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Floating stats card */
.hero-stats {
  position: absolute;
  left: 50%;
  bottom: -1rem;
  transform: translateX(-50%);
  min-width: 260px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.hero-stats-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-stats-label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.hero-stats-value {
  font-weight: 600;
}

/* Filter + board layout */
.hostess-toolbar {
  margin-top: 2.3rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.hostess-filter {
  min-width: 220px;
}

.hostess-board {
  display: grid;
  grid-template-columns: 3fr 1.1fr;
  gap: 1rem;
}

/* Tables + guests container */
.tables-column {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.8rem;
  max-height: calc(100vh - 260px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tables-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Individual table */
.table-block {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top, #1f2933 0, #020617 55%);
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.6rem;
}

.table-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.table-block-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.table-block-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(79, 209, 197, 0.16);
  color: var(--color-accent);
}

/* Guest cards inside a table */
.guest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.guest-chip {
  font-size: 0.78rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text-soft);
  cursor: pointer;
  user-select: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.guest-chip:hover {
  transform: translateY(-1px);
}

/* Status prezent/absent */
.guest-chip--present {
  border-color: rgba(34, 197, 94, 0.7);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.32), rgba(15, 23, 42, 0.95));
  color: #dcfce7;
}

.guest-chip--absent {
  opacity: 0.7;
}

/* Unassigned guests column */
.unassigned-column {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.92);
  padding: 0.75rem 0.8rem;
  max-height: calc(100vh - 260px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.unassigned-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.unassigned-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.35rem;
}

/* ===============================
   11. SCROLL CONTROLS & FULLSCREEN
   =============================== */

.scroll-controls {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scroll-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--color-text-soft);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.scroll-btn:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

/* ===============================
   12. UTILITARE
   =============================== */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-muted  { color: var(--color-text-muted) !important; }

.hide { display: none !important; }

/* ===============================
   13. RESPONSIVE
   =============================== */

@media (max-width: 1024px) {
  .container {
    padding-inline: 1rem;
  }

  .hostess-board {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    max-width: 100%;
  }

  .hero-stats {
    left: auto;
    right: 1rem;
    transform: none;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    padding-inline: 0.75rem;
  }

  .container {
    padding-inline: 0.9rem;
  }

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

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

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

  .hero-event-inner {
    padding: 1rem 1rem 1.3rem;
  }

  .hero-stats {
    position: static;
    margin-top: 0.75rem;
  }

  .hostess-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

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

  .hero-title {
    font-size: 1.2rem;
  }

  .hero-event {
    min-height: 190px;
  }
}
