/* ── Alwathaaeq Meeting Rooms — glass design system with dual themes ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Brand / Accents (Default: Red Wine Theme) */
  --theme-color-rgb: 137, 36, 36;
  --theme-color: #892424;
  --accent: linear-gradient(135deg, #b83232, var(--theme-color));
  --accent-hover: linear-gradient(135deg, #cf3a3a, #9e2a2a);
  --purple: var(--theme-color);
  --gold: #b83232;
  --gold-soft: rgba(var(--theme-color-rgb), 0.08);
  --lightblue: #8a6060;
  --blue: #b83232;
  --navy: #3d1414;

  /* Surfaces */
  --bg-0: #f7f3f3;
  --bg-1: #faecee;
  --bg-2: #f1f2f2;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-2: rgba(255, 255, 255, 0.82);
  --hair: rgba(255, 255, 255, 0.85);
  --hair-soft: rgba(255, 255, 255, 0.50);

  /* Text */
  --ink: #3d1414;
  /* Deep wine black */
  --muted: #7a6e6e;
  /* Muted warm slate */
  --faint: #bdaeae;
  /* Faint warm slate */

  /* States */
  --danger: #892424;
  --ok: #4a9e70;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(var(--theme-color-rgb), 0.06);

  --font-display: 'Almarai', sans-serif;
  --font-body: 'Almarai', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Amber Theme variables override */
html.theme-amber {
  --theme-color-rgb: 217, 119, 6;
  --theme-color: #d97706;
  /* Elegant Amber/Orange */
  --accent: linear-gradient(135deg, #f59e0b, var(--theme-color));
  --accent-hover: linear-gradient(135deg, #fbbf24, #b45309);
  --purple: var(--theme-color);
  --gold: #d97706;
  --gold-soft: rgba(var(--theme-color-rgb), 0.08);
  --lightblue: #a16207;
  --blue: #d97706;
  --navy: #451a03;

  /* Surfaces - Warm Beige / Sand / wood tones */
  --bg-0: #fdfbf7;
  --bg-1: #fef3c7;
  --bg-2: #f7f5f0;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-2: rgba(255, 255, 255, 0.85);
  --hair: rgba(255, 255, 255, 0.88);
  --hair-soft: rgba(255, 255, 255, 0.55);

  /* Text - Deep warm charcoal brown */
  --ink: #3b2314;
  --muted: #7c6a5e;
  --faint: #bcaea5;

  /* States */
  --danger: #c2410c;
  /* Orange-red danger */

  --shadow: 0 8px 32px rgba(var(--theme-color-rgb), 0.06);
}

/* Ice Theme variables override */
html.theme-ice {
  --theme-color-rgb: 182, 201, 202;
  --theme-color: #b6c9ca;
  --accent: linear-gradient(135deg, #cfd1de, #bcc2d2);
  --accent-hover: linear-gradient(135deg, #cfd1de, #b6c9ca);
  --purple: #bcc2d2;
  --gold: #b6c9ca;
  --gold-soft: rgba(182, 201, 202, 0.15);
  --lightblue: #b6c9ca;
  --blue: #bcc2d2;
  --navy: #38424b;
  --bg-0: #f5f7fa;
  --bg-1: #cfd1de;
  --bg-2: #eef1f6;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-2: rgba(255, 255, 255, 0.88);
  --hair: rgba(255, 255, 255, 0.9);
  --hair-soft: rgba(255, 255, 255, 0.6);
  --ink: #2f3b43;
  --muted: #5a6a75;
  --faint: #8e9ba5;
  --danger: #c05b63;
  --shadow: 0 8px 32px rgba(182, 201, 202, 0.12);
}

/* Graphite Theme — All 5 shades: #999, #777, #555, #333, #111 */
html.theme-graphite {
  --theme-color-rgb: 85, 85, 85;
  --theme-color: #555555;
  --accent: linear-gradient(135deg, #999999, #777777, #555555, #333333, #111111);
  --accent-hover: linear-gradient(135deg, #777777, #555555, #333333);
  --purple: #555555;
  --gold: #777777;
  --gold-soft: rgba(85, 85, 85, 0.06);
  --lightblue: #333333;
  --blue: #555555;
  --navy: #111111;

  /* Surfaces — Lighter, whiter like the login block */
  --bg-0: #edebe9;
  --bg-1: #c5c3c0;
  --bg-2: #dddbd8;
  --glass: rgba(255, 255, 255, 0.88);
  --glass-2: rgba(255, 255, 255, 0.94);
  --hair: rgba(255, 255, 255, 0.95);
  --hair-soft: rgba(255, 255, 255, 0.7);

  /* Text — Deep graphite */
  --ink: #111111;
  --muted: #444444;
  --faint: #888888;

  /* States */
  --danger: #8a2020;

  --shadow: 0 8px 32px rgba(51, 51, 51, 0.1);
}

/* Hide subtle grid overlay lines for Graphite theme */
html.theme-graphite body::before {
  display: none;
}

/* Clean up sidebar and panel borders for Graphite */
html.theme-graphite .rail {
  border-right: none !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

html.theme-graphite .glass {
  border: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

/* All buttons — remove borders completely */
html.theme-graphite .btn,
html.theme-graphite button,
html.theme-graphite .weeknav button,
html.theme-graphite .navlink {
  border: none !important;
  box-shadow: none !important;
}

html.theme-graphite .btn-primary,
html.theme-graphite .weeknav button.active,
html.theme-graphite .navlink.active {
  border: none !important;
  box-shadow: none !important;
}

/* Meeting cards — borderless */
html.theme-graphite .mtg {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

html.theme-graphite .mtg:hover {
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Table and dividers */
html.theme-graphite table.grid td {
  border-top: none !important;
}

html.theme-graphite .who {
  border-top: none !important;
}

/* Inputs */
html.theme-graphite input,
html.theme-graphite select,
html.theme-graphite textarea {
  border: none !important;
  box-shadow: none !important;
}

/* Badge */
html.theme-graphite .badge {
  border: none !important;
}

/* Logo & Branding layouts */
.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  color: #000000;
  /* As requested, set logo color in both designs to normal color (black) */
  flex-shrink: 0;
}

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

.brand-text .mark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.brand-text .sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 1px;
}


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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 80%, var(--bg-0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* subtle overlay grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(var(--theme-color-rgb), 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--theme-color-rgb), 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Glass primitives ─────────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  box-shadow: var(--shadow);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wordmark .dot {
  color: var(--theme-color);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

/* ── Buttons & inputs ─────────────────────────────────────────────────── */
button,
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 16px;
  transition: .18s ease;
  backdrop-filter: blur(8px);
}

button:hover,
.btn:hover {
  border-color: rgba(var(--theme-color-rgb), 0.4);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.06);
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--theme-color);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: white !important;
  box-shadow: 0 4px 14px rgba(var(--theme-color-rgb), 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(var(--theme-color-rgb), 0.35);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-0));
  color: var(--ink);
  border-color: var(--hair);
}

.btn-gold:hover {
  background: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.35);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(var(--theme-color-rgb), 0.3);
}

.btn-danger:hover {
  background: rgba(var(--theme-color-rgb), 0.1);
  border-color: var(--danger);
}

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

label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hair-soft);
  border-radius: 11px;
  padding: 11px 13px;
  transition: .18s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(var(--theme-color-rgb), 0.5);
  box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb), 0.1);
  outline: none;
}

select option {
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 76px;
}

.field {
  margin-bottom: 15px;
}

.row {
  display: grid;
  gap: 14px;
}

@media (min-width: 560px) {
  .row.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  color: var(--muted);
}

.badge.admin {
  color: var(--theme-color);
  border-color: rgba(var(--theme-color-rgb), 0.2);
  background: rgba(var(--theme-color-rgb), 0.05);
}

.badge.live {
  color: white;
  background: var(--accent);
  border-color: transparent;
}

.error-banner {
  background: rgba(var(--theme-color-rgb), 0.05);
  border: 1px solid rgba(var(--theme-color-rgb), 0.25);
  color: var(--danger);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 12px;
}

.empty {
  text-align: center;
  color: var(--faint);
  padding: 38px 18px;
  font-size: 14px;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--theme-color-rgb), 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--theme-color-rgb), 0.3);
}

/* Live meeting row styling */
table.grid tr.live-row td {
  background: rgba(255, 255, 255, 0.7);
  border-top: 1.5px solid var(--theme-color);
  border-bottom: 1.5px solid var(--theme-color);
}

/* Today meeting row styling */
table.grid tr.today-row:not(.live-row) td {
  background: rgba(var(--theme-color-rgb), 0.08) !important;
}

table.grid tr.today-row:not(.live-row) td:first-child {
  position: relative;
}

table.grid tr.today-row:not(.live-row) td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--theme-color);
}

.live-dot-mini {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.5);
  animation: pulse-mini 2s infinite;
}

@keyframes pulse-mini {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(var(--theme-color-rgb), 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Style for active view toggles in toolbar */
.weeknav button.active {
  background: var(--accent) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.2);
}

/* Additional UI utilities for theme switcher */
.btn-theme-mini:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  color: var(--theme-color) !important;
}

/* Table Action Button Layouts (fixes broken borders) */
.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.cell-actions-inner {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  vertical-align: middle;
}

/* Redesigned squircle glass action buttons */
.btn-action-edit,
.btn-action-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border-radius: 10px;
  border: 1px solid var(--hair-soft) !important;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease !important;
}

.btn-action-edit {
  color: var(--theme-color) !important;
}

.btn-action-edit:hover {
  background: rgba(var(--theme-color-rgb), 0.08) !important;
  border-color: rgba(var(--theme-color-rgb), 0.35) !important;
  box-shadow: 0 4px 10px rgba(var(--theme-color-rgb), 0.1) !important;
  transform: translateY(-1px);
}

.btn-action-delete {
  color: var(--danger) !important;
  border-color: rgba(var(--theme-color-rgb), 0.15) !important;
}

.btn-action-delete:hover {
  background: rgba(var(--theme-color-rgb), 0.1) !important;
  border-color: var(--danger) !important;
  box-shadow: 0 4px 10px rgba(var(--theme-color-rgb), 0.12) !important;
  transform: translateY(-1px);
}