/* CSS Reset & Global Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');

:root {
  /* --- PREMIUM LUXE PALETTE --- */
  --midnight-900: #1D1D21;
  /* Rich Obsidian */
  --midnight-800: #27272A;
  --midnight-700: #3F3F46;

  --luxury-gold: #D4AF37;
  /* Champagne Gold */
  --luxury-gold-dark: #B59326;
  --luxury-gold-light: #EADDCA;

  /* Typography Defaults */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-ar: 'Cairo', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --primary-main: var(--luxury-gold);
  --primary-dark: var(--luxury-gold-dark);
  --primary-light: var(--luxury-gold-light);
  --primary-contrast: #1D1D21;

  --background-default: #0D0D0F;
  --background-paper: #161618;
  --background-input: #1D1D21;

  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-inverse: #1D1D21;

  --border-color: #27272A;
  --icon-color: #9CA3AF;
}

[data-theme="light"] {
  --primary-main: var(--midnight-900);
  --primary-dark: #000000;
  --primary-light: var(--midnight-700);
  --primary-contrast: #FFFFFF;

  --background-default: #F8F9FA;
  --background-paper: #FFFFFF;
  --background-input: #F3F4F6;

  --text-primary: #1D1D21;
  --text-secondary: #6B7280;
  --text-inverse: #FFFFFF;

  --border-color: #E5E7EB;
  --icon-color: #6B7280;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
  /* Global for numbers */
}

body {
  font-family: var(--font-family);
  background-color: var(--background-default);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* Icons (SVG) */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Premium Button Utility - ULTRA COMPACT */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background-color: var(--primary-main);
  color: var(--primary-contrast);
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  height: 32px;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--background-input);
  border-color: var(--luxury-gold);
}

.card {
  background-color: var(--background-paper);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* --- LOGIN ANIMATION & STYLES --- */
.login-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-scene {
  width: 360px;
  height: 480px;
  perspective: 1000px;
  position: relative;
  transition: height 0.4s ease;
}

.login-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
}

.login-card-3d.flipped {
  transform: rotateY(180deg);
  cursor: default;
}

.login-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--background-paper);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-front {
  z-index: 2;
  background: transparent;
  border: none;
  box-shadow: none;
}

.login-back {
  transform: rotateY(180deg);
  padding: 2.5rem;
}

.brand-logo-hero {
  width: 140px;
  transition: transform 0.3s ease;
}

.login-card-3d:not(.flipped):hover .brand-logo-hero {
  transform: scale(1.1);
}

/* Icon Button Styles (Global) */
.icon-btn {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background-color: var(--luxury-gold-glow);
  transform: translateY(-1px);
}

/* Role Badges */
.role-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-admin {
  background: #3B82F6;
  color: white;
}

.role-reception {
  background: #8B5CF6;
  color: white;
}

.role-tech {
  background: #10B981;
  color: white;
}

/* Utility Spacing */
.mb-1 {
  margin-bottom: 0.25rem;
}

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

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

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

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

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

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

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

.flex {
  display: flex;
}

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

.justify-center {
  justify-content: center;
}

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

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.w-full {
  width: 100%;
}

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

.hidden {
  display: none !important;
}

/* RTL Support Base */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}