/* ===========================
   FINDROOM — GLOBAL CSS
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg:          #0d0d0d;
  --bg-card:     #1a1a1a;
  --bg-elevated: #242424;
  --bg-hover:    #2e2e2e;
  --orange:      #e8510a;
  --orange-light:#ff6b1a;
  --orange-dim:  rgba(232, 81, 10, 0.12);
  --orange-glow: rgba(232, 81, 10, 0.3);
  --text:        #ffffff;
  --text-muted:  #888888;
  --text-dim:    #555555;
  --border:      #2a2a2a;
  --border-light:#333333;
  --success:     #22c55e;
  --error:       #ef4444;
  --warning:     #f59e0b;
  --info:        #3b82f6;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --radius-pill: 50px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 8px 48px rgba(0, 0, 0, 0.6);
  --shadow-orange: 0 4px 20px rgba(232, 81, 10, 0.25);
  --transition:  all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================
   TYPOGRAPHY
   ======================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-muted); line-height: 1.7; }

a {
  color: var(--orange);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--orange-light); }

/* ========================
   NAVBAR
   ======================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.navbar-logo img {
  width: 32px;
  height: 32px;
}

.navbar-logo .brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.navbar-logo .brand b {
  color: var(--orange);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

/* ========================
   BUTTONS
   ======================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn:hover::after {
  background: rgba(255,255,255,0.06);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 81, 10, 0.4);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1rem;
  padding: 16px 32px;
  border-radius: var(--radius);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================
   INPUTS
   ======================== */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

.input::placeholder {
  color: var(--text-dim);
}

.input-prefix {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.input-prefix:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

.input-prefix span {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  white-space: nowrap;
}

.input-prefix input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  padding: 12px 16px;
  flex: 1;
  min-width: 0;
}

.input-prefix input::placeholder {
  color: var(--text-dim);
}

/* ========================
   CARDS
   ======================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition-slow);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-body {
  padding: 20px;
}

/* ========================
   BADGES & CHIPS
   ======================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-orange {
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(232, 81, 10, 0.3);
}

.badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 81, 10, 0.3);
  color: var(--orange);
  background: var(--orange-dim);
  white-space: nowrap;
}

/* ========================
   TOGGLE SWITCH
   ======================== */

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--orange);
  border-color: var(--orange);
}

.toggle input:checked + .toggle-slider::before {
  background: white;
  transform: translate(24px, -50%);
}

/* ========================
   ALERTS / TOASTS
   ======================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideInToast 0.3s ease;
  min-width: 280px;
  max-width: 360px;
}

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

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg  { font-size: 0.875rem; font-weight: 500; color: var(--text); flex: 1; }

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ========================
   LOADER
   ======================== */

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
}

.page-loader .loader {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* ========================
   FOOTER
   ======================== */

.footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.footer-brand .brand b {
  color: var(--orange);
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--orange);
}

.footer-bottom {
  max-width: 1100px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-bottom p span {
  color: var(--orange);
}

/* ========================
   SECTION COMMONS
   ======================== */

.section {
  padding: 80px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.section-header h2 {
  color: var(--text);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ========================
   SCROLLBAR
   ======================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ========================
   UTILITY CLASSES
   ======================== */

.hidden { display: none !important; }
.visible { display: flex !important; }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }

/* ========================
   AVATAR BTN / DROPDOWN
   ======================== */

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  overflow: hidden;
  padding: 0;
}

.avatar-btn:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-btn svg {
  color: var(--text-muted);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
  animation: dropIn 0.2s ease;
}

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

.dropdown-user {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.dropdown-user .name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.dropdown-user .email {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--orange);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.navbar-user-wrap {
  position: relative;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .navbar { padding: 0 16px; }

  .section { padding: 60px 16px; }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
