/* ============================================
   assets/css/main.css — Oemah Kost Laksmi Design System
   Color: Deep Teal + Warm Cream + Coral Accent
   ============================================ */

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

/* ---- TOKENS ---- */
:root {
  --teal-900: #0d3d3a;
  --teal-800: #0f4f4a;
  --teal-700: #14675e;
  --teal-600: #1a7e72;
  --teal-500: #21978a;
  --teal-400: #34b3a5;
  --teal-300: #5ecfc3;
  --teal-100: #d4f5f2;
  --teal-50:  #eafaf9;

  --coral:     #e8694a;
  --coral-lt:  #fde9e3;
  --gold:      #f0a500;
  --gold-lt:   #fef3d6;

  --cream:    #f7f4ef;
  --white:    #ffffff;
  --gray-900: #1a1a2e;
  --gray-700: #3d4458;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;

  --success:    #16a34a;
  --success-lt: #dcfce7;
  --danger:     #dc2626;
  --danger-lt:  #fee2e2;
  --warning:    #d97706;
  --warning-lt: #fef3c7;
  --info:       #0369a1;
  --info-lt:    #e0f2fe;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);

  --sidebar-w: 260px;
  --header-h:  64px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--gray-700); background: var(--cream); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ============================================
   LAYOUT
   ============================================ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--teal-900);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--teal-500);
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: white;
  line-height: 1.2;
}

.sidebar-logo .logo-sub {
  font-size: .68rem;
  color: var(--teal-300);
  letter-spacing: .5px;
  font-weight: 500;
}

.sidebar-section-title {
  padding: 20px 20px 6px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal-400);
}

.sidebar nav ul {
  padding: 0 10px 6px;
}

/* ── Nav link base ── */
.sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  font-weight: 500;
  transition: background .18s, color .18s;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Hover ── */
.sidebar nav ul li a:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.95);
}

/* ── Active ── */
.sidebar nav ul li a.active {
  background: var(--teal-600);
  color: #ffffff;
}

/* ── Nav icon — fixed width, never shrinks ── */
.sidebar nav ul li a .nav-icon {
  width: 20px;
  font-size: .9rem;
  text-align: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* no background, no color override — inherits from <a> */
}

/* ── Nav badge (notification count) ── */
.sidebar nav ul li a .nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: white;
  font-size: .62rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ── Sidebar footer ── */
.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
}

.sidebar-user .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal-500);
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: .82rem;
  flex-shrink: 0;
}

.sidebar-user .user-info { min-width: 0; }
.sidebar-user .user-name {
  color: white;
  font-size: .83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-role { color: var(--teal-300); font-size: .68rem; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gray-900);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--gray-700);
  padding: 6px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.sidebar-toggle:hover { background: var(--gray-100); }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: .95rem;
  color: var(--gray-700);
  position: relative;
  transition: background .2s;
}
.btn-icon:hover { background: var(--teal-100); color: var(--teal-700); }

.btn-icon .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid white;
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content { padding: 28px; flex: 1; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--gray-900);
  line-height: 1.2;
}
.page-title i { color: var(--teal-600); margin-right: 8px; }

.page-subtitle { color: var(--gray-500); font-size: .875rem; margin-top: 4px; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--gray-500);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--teal-600); }
.breadcrumb .sep { color: var(--gray-300); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.06);
}

.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: .98rem;
  color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
}

.card-body   { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); }

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.teal  { background: var(--teal-100);   color: var(--teal-700); }
.stat-icon.coral { background: var(--coral-lt);   color: var(--coral); }
.stat-icon.gold  { background: var(--gold-lt);    color: var(--gold); }
.stat-icon.green { background: var(--success-lt); color: var(--success); }
.stat-icon.red   { background: var(--danger-lt);  color: var(--danger); }
.stat-icon.blue  { background: var(--info-lt);    color: var(--info); }

.stat-label { font-size: .76rem; color: var(--gray-500); margin-bottom: 2px; }
.stat-value { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-note  { font-size: .7rem; color: var(--gray-500); margin-top: 4px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: .84rem;
  border: none; cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover  { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--teal-600); color: white; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-coral     { background: var(--coral);    color: white; }
.btn-success   { background: var(--success);  color: white; }
.btn-danger    { background: var(--danger);   color: white; }
.btn-warning   { background: var(--warning);  color: white; }
.btn-outline   { background: transparent; border: 1.5px solid var(--teal-600); color: var(--teal-600); }
.btn-outline:hover { background: var(--teal-600); color: white; }
.btn-wa        { background: #25d366; color: white; border: none; }
.btn-wa:hover  { background: #1da851; opacity: 1; }

.btn-sm    { padding: 6px 12px; font-size: .78rem; }
.btn-lg    { padding: 12px 26px; font-size: .94rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .71rem;
  font-weight: 700;
}
.badge-success   { background: var(--success-lt); color: var(--success); }
.badge-danger    { background: var(--danger-lt);  color: var(--danger); }
.badge-warning   { background: var(--warning-lt); color: var(--warning); }
.badge-info      { background: var(--info-lt);    color: var(--info); }
.badge-secondary { background: var(--gray-100);   color: var(--gray-500); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: .82rem; font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label .required { color: var(--coral); }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color .2s, box-shadow .2s;
  font-size: .875rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(33,151,138,.15);
}
.form-control::placeholder { color: var(--gray-300); }
select.form-control  { cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }

.form-hint  { font-size: .74rem; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: .74rem; color: var(--danger);   margin-top: 4px; }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); flex: 1; }
.input-group .input-addon {
  padding: 10px 14px;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-300);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .875rem; color: var(--gray-500);
  white-space: nowrap;
  display: flex; align-items: center;
}

.form-row   { display: grid; grid-template-columns: 1fr 1fr;       gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 16px; }

/* ============================================
   TABLES
   ============================================ */
.table-wrapper { overflow-x: auto; }

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

thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--gray-500);
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-300);
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
tbody tr:hover         { background: var(--teal-50); }
tbody tr:last-child td { border-bottom: none; }

.table-actions { display: flex; gap: 6px; align-items: center; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-lt); color: var(--success); border: 1px solid #bbf7d0; }
.alert-error   { background: var(--danger-lt);  color: var(--danger);  border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-lt); color: var(--warning); border: 1px solid #fde68a; }
.alert-info    { background: var(--info-lt);    color: var(--info);    border: 1px solid #bae6fd; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; gap: 4px; align-items: center; padding: 14px 0 4px; }

.page-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  cursor: pointer;
  transition: all .18s;
}
.page-btn:hover  { background: var(--teal-100); border-color: var(--teal-400); color: var(--teal-700); }
.page-btn.active { background: var(--teal-600); border-color: var(--teal-600); color: white; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.show,
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: min(520px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--gray-900); }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--gray-500);
  padding: 4px; border-radius: var(--radius-sm);
  line-height: 1;
}
.modal-close:hover { background: var(--gray-100); }
.modal-body   { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gray-100);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--gray-500); font-size: .88rem; pointer-events: none;
}
.search-input-wrap input { padding-left: 36px; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 2.8rem; margin-bottom: 12px; opacity: .45; }
.empty-state h3 { font-family: var(--font-display); font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p  { font-size: .875rem; }

/* ============================================
   PROPERTY CARD
   ============================================ */
.property-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .25s, transform .25s;
}
.property-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.property-card .card-img {
  height: 200px;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-400));
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.property-card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.property-card .card-img .type-badge { position: absolute; top: 12px; left: 12px; }

.property-card .card-info            { padding: 18px 20px; }
.property-card .prop-name            { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--gray-900); margin-bottom: 4px; }
.property-card .prop-location        { font-size: .78rem; color: var(--gray-500); display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.property-card .prop-price           { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--teal-700); }
.property-card .prop-rooms           { font-size: .76rem; color: var(--gray-500); margin-top: 4px; }
.property-card .card-footer-actions  { padding: 12px 20px 18px; display: flex; gap: 8px; }

/* ============================================
   ROOM CARD
   ============================================ */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.room-card {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 18px; background: white;
  transition: border-color .2s, box-shadow .2s;
}
.room-card:hover    { border-color: var(--teal-400); box-shadow: var(--shadow); }
.room-card.occupied { border-color: var(--gray-300); opacity: .75; }

.room-number    { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--gray-900); }
.room-type-label { font-size: .74rem; color: var(--gray-500); margin-bottom: 10px; }
.room-facilities { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }

.fac-chip {
  background: var(--teal-50); color: var(--teal-700);
  font-size: .68rem; padding: 3px 8px;
  border-radius: 20px; font-weight: 500;
}

/* ============================================
   TABS
   ============================================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-300); margin-bottom: 20px; }
.tab {
  padding: 10px 18px; font-size: .84rem; font-weight: 600;
  color: var(--gray-500); border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; transition: all .18s;
}
.tab:hover  { color: var(--teal-600); }
.tab.active { color: var(--teal-700); border-bottom-color: var(--teal-600); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  background: var(--teal-900);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(33,151,138,.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(232,105,74,.15) 0%, transparent 50%);
}

.login-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: min(440px, 100%);
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}

.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-logo .logo-icon {
  width: 46px; height: 46px;
  background: var(--teal-600);
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.4rem; color: white;
}
.login-logo h1  { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--gray-900); }
.login-logo p   { font-size: .76rem; color: var(--gray-500); }

.login-title    { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--gray-900); margin-bottom: 4px; }
.login-subtitle { font-size: .84rem; color: var(--gray-500); margin-bottom: 26px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .sidebar          { transform: translateX(-100%); }
  .sidebar.open     { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content     { margin-left: 0; }
  .sidebar-toggle   { display: flex; align-items: center; justify-content: center; }
  .form-row         { grid-template-columns: 1fr; }
  .form-row-3       { grid-template-columns: 1fr 1fr; }
  .stats-grid       { grid-template-columns: 1fr 1fr; }
  .page-content     { padding: 18px; }
}

@media (max-width: 560px) {
  .stats-grid  { grid-template-columns: 1fr; }
  .form-row-3  { grid-template-columns: 1fr; }
  .login-box   { padding: 30px 20px; }
}
