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

:root {
  color-scheme: only light;
  --ink: #0f1828;
  --muted: #4a515d;
  --surface: #c6baac;
  --surface-strong: #aa9882;
  --accent: #8f795c;
  --accent-strong: #7a7f88;
  --cool: #2b3341;
  --success: #2b3341;
  --shadow: 0 24px 40px rgba(15, 24, 40, 0.14);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(143, 121, 92, 0.35), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(43, 51, 65, 0.25), transparent 45%),
    linear-gradient(135deg, #d5c8b7 0%, #c6baac 45%, #aa9882 100%);
}

.screen {
  min-height: 100vh;
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.room-title {
  font-family: "Tajawal", "Tahoma", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  flex: 1;
}

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

.lang-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 24, 40, 0.12);
}

.lang-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--accent);
  color: #fff;
}

.logo-slot {
  width: 240px;
  height: 96px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: rgba(15, 24, 40, 0.5);
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.logo-slot img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

.clock {
  text-align: right;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  min-width: 220px;
}

.clock-time {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.clock-date {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 4px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.hero-text {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  color: var(--cool);
  margin: 0;
}

.title {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 3.4rem;
  margin: 10px 0 6px;
}

.subtitle {
  color: var(--muted);
  font-size: 1.25rem;
  margin: 0;
}

.status-card {
  background: linear-gradient(140deg, #f3eee7, #ffffff 60%);
  border-radius: 28px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  border: 1px solid rgba(143, 121, 92, 0.35);
}

.status-card.live {
  background: linear-gradient(140deg, #e7ecef, #ffffff 60%);
  border-color: rgba(43, 51, 65, 0.3);
}

.status-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.status-title {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2.3rem;
}

.status-time,
.status-meta {
  font-size: 1.2rem;
  color: var(--muted);
}

.schedule {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 24px 28px 28px;
  box-shadow: var(--shadow);
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.schedule-header h2 {
  margin: 0;
  font-size: 1.85rem;
}

.timezone {
  font-size: 0.9rem;
  color: var(--muted);
}

.schedule-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 1rem;
}

.schedule-date {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 24, 40, 0.08);
}

.schedule-grid {
  display: grid;
  gap: 14px;
}

.add-meeting {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 24, 40, 0.1);
  margin-bottom: 16px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.field input {
  border: 1px solid rgba(15, 24, 40, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 1.05rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  background: #fff;
}

.time-range {
  border: 1px dashed rgba(15, 24, 40, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 1.05rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
}

.timeline {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 24, 40, 0.08);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.timeline-slots {
  --slot-count: 18;
  display: grid;
  grid-template-columns: repeat(var(--slot-count), 1fr);
  gap: 6px;
}

.timeline-slot {
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(15, 24, 40, 0.1);
  background: #b8d1c1;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(15, 24, 40, 0.12);
}

.timeline-slot.taken {
  background: #5f8f6c;
  cursor: not-allowed;
}

.timeline-slot.selected {
  background: #3f6f4f;
  box-shadow: 0 10px 16px rgba(63, 111, 79, 0.25);
}

.timeline-slot:disabled {
  opacity: 0.7;
}

.add-button {
  border: none;
  border-radius: 16px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 18px rgba(143, 121, 92, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  grid-column: -2 / -1;
  justify-self: end;
}

.add-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(143, 121, 92, 0.32);
}

.form-note {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--muted);
}

.meeting-card {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 24, 40, 0.08);
}

.meeting-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cool);
}

.meeting-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.meeting-meta {
  font-size: 1.05rem;
  color: var(--muted);
}

.meeting-state {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
  background: rgba(15, 24, 40, 0.08);
  color: var(--muted);
}

.meeting-state.live {
  background: rgba(43, 51, 65, 0.18);
  color: var(--cool);
  font-weight: 600;
}

.meeting-state.next {
  background: rgba(143, 121, 92, 0.18);
  color: var(--accent-strong);
  font-weight: 600;
}

.meeting-state.done {
  background: rgba(15, 24, 40, 0.06);
  color: var(--muted);
  font-weight: 600;
}

.meeting-actions {
  display: flex;
  align-items: center;
}

.delete-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(15, 24, 40, 0.08);
  color: var(--muted);
  cursor: pointer;
}

.delete-button:hover {
  background: rgba(15, 24, 40, 0.14);
}

.meeting-card.live {
  border-color: rgba(43, 51, 65, 0.35);
  box-shadow: 0 18px 24px rgba(15, 24, 40, 0.18);
  transform: translateY(-2px);
}

.meeting-card.next {
  border-color: rgba(143, 121, 92, 0.35);
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule,
.hero-text,
.status-card,
.clock {
  animation: floatIn 0.8s ease both;
}

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

@media (max-width: 820px) {
  .screen {
    padding: 24px;
  }

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

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

  .room-title {
    width: 100%;
    text-align: left;
    font-size: 1.6rem;
  }

  .logo-slot {
    width: 180px;
    height: 72px;
  }

  .top-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .clock {
    width: 100%;
    text-align: left;
  }

  .hero-text,
  .status-card,
  .schedule {
    padding: 20px;
  }

  .meeting-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .add-meeting {
    grid-template-columns: 1fr;
  }

  .add-button {
    width: 100%;
    justify-self: stretch;
  }

  .timeline {
    overflow-x: auto;
  }

  .timeline-labels,
  .timeline-slots {
    min-width: 640px;
  }
}

[dir="rtl"] body {
  font-family: "Tajawal", "Tahoma", sans-serif;
}

[dir="rtl"] .clock {
  text-align: left;
}

[dir="rtl"] .topbar,
[dir="rtl"] .schedule-header {
  direction: rtl;
}

[dir="rtl"] .title,
[dir="rtl"] .status-title,
[dir="rtl"] .meeting-title {
  font-family: "Tajawal", "Tahoma", sans-serif;
}

[dir="rtl"] .hero-text,
[dir="rtl"] .status-card,
[dir="rtl"] .meeting-details {
  text-align: right;
}

[dir="rtl"] .meeting-card {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

[dir="rtl"] .meeting-time {
  text-align: right;
  min-width: 110px;
}

[dir="rtl"] .meeting-state {
  min-width: 90px;
  text-align: center;
}

[dir="rtl"] .time-range {
  text-align: right;
}
