/* ============================================
   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: #0A1E3F;
  --teal-800: #0e2950;
  --teal-700: #123465;
  --teal-600: #1b437c;
  --teal-500: #24528f;
  --teal-400: #3d6aa6;
  --teal-300: #8fa3c4;
  --teal-100: #d7deec;
  --teal-50:  #eef2f8;

  --coral:    #D4A950;
  --coral-lt: #f6ecd3;
  --gold:     #D4A950;
  --gold-lt:  #f6ecd3;

  --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;
}

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

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

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

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

.sidebar nav ul { padding: 0 12px 8px; }
.sidebar nav ul li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: rgba(255,255,255,.1);
  color: white;
}

.sidebar nav ul li a.active { background: var(--teal-600); color: white; }

.sidebar nav ul li a .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar nav ul li a .nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: white;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.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: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal-500);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}

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

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

/* HEADER */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  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.1rem;
  color: var(--gray-900);
}

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

.btn-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  border: none; cursor: pointer;
  display: grid; place-items: center;
  font-size: 1rem;
  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: 8px; height: 8px;
  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.6rem;
  color: var(--gray-900);
  line-height: 1.2;
}

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

/* BREADCRUMB */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; 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: 20px 24px 16px;
  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: 1rem;
  color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
}

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

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 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: 48px; height: 48px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.3rem;
  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: .78rem; color: var(--gray-500); margin-bottom: 2px; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-note  { font-size: .72rem; 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: .85rem;
  border: none; cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.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-sm { padding: 6px 12px; font-size: .78rem; }
.btn-lg { padding: 13px 28px; font-size: .95rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  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: .83rem; 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: .88rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(36,82,143,.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: .75rem; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: .75rem; 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: .88rem; 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: .85rem;
}
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: .72rem;
  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: 14px 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: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.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: 16px 0 4px; }
.page-btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  cursor: pointer;
  transition: all .2s;
}
.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: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: min(520px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform .25s;
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  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: 1.05rem; color: var(--gray-900); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--gray-500); padding: 4px; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; 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: .9rem; pointer-events: none;
}
.search-input-wrap input {
  padding-left: 36px;
}

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

/* ---- PROPERTY CARD (User Portal) ---- */
.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: 1.05rem; color: var(--gray-900); margin-bottom: 4px; }
.property-card .prop-location { font-size: .8rem; 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.1rem; color: var(--teal-700); }
.property-card .prop-rooms { font-size: .78rem; 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-200, #e5e7eb);
  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-200, #e5e7eb); opacity: .75; }
.room-number { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--gray-900); }
.room-type-label { font-size: .75rem; 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: .7rem; padding: 3px 8px;
  border-radius: 20px; font-weight: 500;
}

/* ---- 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(36,82,143,.3) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(212,169,80,.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: 30px;
}
.login-logo .logo-icon {
  width: 48px; height: 48px;
  background: var(--teal-600);
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.5rem;
}
.login-logo h1 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.4rem;
  color: var(--gray-900);
}
.login-logo p { font-size: .78rem; color: var(--gray-500); }
.login-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--gray-900); margin-bottom: 4px; }
.login-subtitle { font-size: .85rem; color: var(--gray-500); margin-bottom: 28px; }

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

/* ---- HAMBURGER TOGGLE ---- */
.sidebar-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--gray-700);
  margin-right: 8px;
}

/* ---- 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 22px; }
}

/* ============================================
   BRAND LOGO — Oemah Kost Laksmi
   Show the brand mark in every .logo-icon / .footer-logo box
   and hide the old font icon.
   ============================================ */
.logo-icon,
.nav-logo .logo-icon,
.sidebar-logo .logo-icon,
.login-logo .logo-icon,
.footer-logo {
  background-color: transparent !important;
  background-image: url("../img/omahlaksmi.svg") !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  box-shadow: none !important;
  color: transparent !important;
}
.logo-icon i, .logo-icon svg,
.footer-logo i, .footer-logo svg { display: none !important; }
