/* ============================================================
   base.css — Little Boracay Floating Cottages
   Shared variables, reset, typography, and reusable components
   ============================================================ */

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

/* ── TOKENS ── */
:root {
  /* Palette — sampled from the Calatagan floating-cottages photo (public/front.png):
     vivid sky blue, deep ocean blue, tropical turquoise water, and warm cottage-wood coral */
  --sand:       #eef3f9;
  --sand-dark:  #d4e0ed;
  --tide:       #57bdec;
  --ocean:      #0f5fa8;
  --ocean-deep: #071c38;
  --ocean-light:#2f8fcf;
  --seafoam:    #e5f8f5;
  --coral:      #e8845f;
  --coral-light:#fbe9df;
  --sky:        #3fc7c2;
  --sky-light:  #d3f5f1;
  --white:      #fafcff;
  --ink:        #0f1c2e;
  --muted:      #5a7089;
  --border:     #c5d5e8;
  --danger:     #c0392b;
  --success:    #1a6b5a;

  /* Surfaces */
  --card:       rgba(250, 252, 255, 0.97);
  --overlay:    rgba(10, 31, 61, 0.82);

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body:    'Manrope', sans-serif;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(30, 77, 123, 0.08);
  --shadow-md:  0 8px 28px rgba(30, 77, 123, 0.14);
  --shadow-lg:  0 20px 60px rgba(10, 31, 61, 0.2);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Transitions */
  --t: 0.22s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── SHARED NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 40px;
  background: transparent;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
}
.navbar-brand-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  overflow: hidden; flex-shrink: 0;
}
.navbar-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.navbar-brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem; color: var(--ocean-deep);
  line-height: 1.1;
  text-shadow: 0 1px 12px rgba(255,255,255,0.7), 0 4px 5px rgba(0,0,0,0.55), 0 2px 2px rgba(0,0,0,0.6);
}
.navbar-brand-text span { color: var(--ocean-deep); }
.navbar-brand-sub {
  font-size: 0.62rem; color: var(--ocean-deep);
  letter-spacing: 0.12em; text-transform: uppercase;
  display: block;
  text-shadow: 0 1px 10px rgba(255,255,255,0.7), 0 3px 3px rgba(0,0,0,0.55);
}
.navbar-center-group {
  display: flex; align-items: center; gap: 40px;
}
.navbar-logo-center img { height: 44px; width: auto; display: block; }
.navbar-links {
  display: flex; gap: 32px; align-items: center;
}
.navbar-actions {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 10px; align-items: center;
}
.navbar-links a {
  font-size: 1.05rem; font-weight: 500; color: var(--white); transition: color var(--t);
  text-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.6);
}
.navbar-links a:hover { color: var(--coral); }

/* Light variant — for pages with a light body background instead of a dark hero photo */
.navbar--light {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}
.navbar--light .navbar-brand-text { color: var(--ocean-deep); }
.navbar--light .navbar-brand-sub { color: var(--muted); }
.navbar--light .navbar-links a { color: var(--muted); }
.navbar--light .navbar-links a:hover { color: var(--ocean); }
.navbar--light .btn-outline { color: var(--ocean-deep); border-color: var(--border); }
.navbar--light .btn-outline:hover { background: var(--seafoam); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--r-sm);
  border: none; font-size: 0.88rem; font-weight: 500;
  transition: all var(--t); white-space: nowrap;
  font-family: var(--font-body);
}
.btn:disabled {
  opacity: 0.5; cursor: not-allowed;
  transform: none !important; box-shadow: none !important;
}
.btn-primary {
  background: var(--tide); color: var(--ocean-deep);
  box-shadow: 0 3px 12px rgba(107, 184, 232, 0.35);
}
.btn-primary:hover { background: #5aa8d8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(107, 184, 232, 0.45); }
.btn-ocean {
  background: var(--ocean); color: var(--white);
  box-shadow: 0 3px 12px rgba(30, 77, 123, 0.3);
}
.btn-ocean:hover { background: var(--ocean-deep); transform: translateY(-2px); }
.btn-coral {
  background: var(--coral); color: var(--white);
}
.btn-coral:hover { background: #c0552d; transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-ghost {
  background: transparent; color: var(--ocean);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--seafoam); border-color: var(--ocean-light); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--r-md); }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success { background: #d1fae5; color: var(--success); }
.btn-success:hover { background: var(--success); color: white; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--ocean-deep); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.form-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm); background: var(--white);
  font-size: 0.92rem; color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus {
  outline: none; border-color: var(--ocean-light);
  box-shadow: 0 0 0 3px rgba(58, 122, 184, 0.12);
}
.form-input::placeholder { color: #a0b4c8; }

/* Show/hide password button, added by password-toggle.js */
.pw-field { position: relative; display: block; }
.pw-field .form-input { padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--r-sm);
  color: var(--muted); cursor: pointer;
  transition: color var(--t), background var(--t);
}
.pw-toggle:hover { color: var(--ocean); background: rgba(15, 95, 168, 0.06); }
.pw-toggle:focus-visible { outline: 2px solid var(--ocean-light); outline-offset: 1px; }

/* New-password rules checklist, added by password-rules.js */
.pw-rules {
  list-style: none; margin: 6px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
  font-size: 0.75rem; line-height: 1.35; color: var(--muted);
}
.form-row + .pw-rules { margin: -6px 0 14px; }
.pw-rules li::before { content: "○"; display: inline-block; width: 1.1em; }
.pw-rules li.met { color: #15803d; }
.pw-rules li.met::before { content: "✓"; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 0.75rem; color: var(--muted); margin-top: 5px; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem; color: var(--ocean-deep); font-weight: 600;
}
.card-body { padding: 22px; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 11px 18px;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); background: var(--seafoam);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 18px; font-size: 0.87rem; color: var(--ink);
  border-bottom: 1px solid rgba(197, 213, 232, 0.5);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(230, 240, 250, 0.5); }

/* ── SKELETON LOADING ── */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, #e4eaf2 25%, #f2f5f9 37%, #e4eaf2 63%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  vertical-align: middle;
}
.skeleton-line { height: 13px; width: 80%; }
.skeleton-line.w-short { width: 45%; }
.skeleton-line.w-long { width: 95%; }
.skeleton-badge { height: 21px; width: 68px; border-radius: 20px; }
.skeleton-btn { height: 30px; width: 64px; border-radius: var(--r-sm); }
.skeleton-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.skeleton-card-img { height: 160px; width: 100%; border-radius: 0; }
.skeleton-card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
}
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-confirmed{ background: #dbeafe; color: #1e3a8a; }
.badge-cancelled{ background: #fee2e2; color: #991b1b; }
.badge-approved { background: #dbeafe; color: #1e3a8a; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-active   { background: #dbeafe; color: #1e40af; }
.badge-expired  { background: #f3f4f6; color: #6b7280; }

/* ── ALERTS ── */
.alert {
  padding: 11px 16px; border-radius: var(--r-sm);
  font-size: 0.84rem; margin-bottom: 16px; display: none;
  line-height: 1.5;
}
.alert.show { display: block; }
.alert-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-info    { background: var(--sky-light); color: #1e5f74; border: 1px solid #bae6fd; }
.alert-warn    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── SIDEBAR LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--ocean-deep);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  display: flex; flex-direction: column;
  transition: transform var(--t), width var(--t);
}
.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand-icon {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem; color: var(--white); line-height: 1.2;
}
.sidebar-brand-role {
  font-size: 0.68rem; color: var(--tide);
  text-transform: uppercase; letter-spacing: 0.14em; margin-top: 3px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--tide); color: var(--ocean-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
  font-size: 0.85rem; color: var(--white); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-email {
  font-size: 0.68rem; color: rgba(255,255,255,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-section-label {
  font-size: 0.62rem; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.15em;
  padding: 12px 20px 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; color: rgba(255,255,255,0.55);
  font-size: 0.87rem; transition: all var(--t);
  border-left: 3px solid transparent; cursor: pointer;
}
.sidebar-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.sidebar-item.active {
  color: var(--white); background: rgba(107, 184, 232, 0.12);
  border-left-color: var(--tide);
}
.sidebar-item .si-icon,
.sidebar-logout .si-icon {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
}
.si-icon svg { width: 17px; height: 17px; }
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logout {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.35); font-size: 0.82rem;
  background: none; border: none; transition: color var(--t);
  font-family: var(--font-body); padding: 0;
}
.sidebar-logout:hover { color: #fc8181; }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: 240px; flex: 1;
  padding: 88px 36px 40px;
  min-height: 100vh;
  transition: margin-left var(--t);
}
.page-header {
  margin-bottom: 28px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--ocean-deep); line-height: 1.2;
}
.page-subtitle { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--card); border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  border-top: 3px solid var(--ocean);
  position: relative; overflow: hidden;
}
.stat-card-icon {
  position: absolute; bottom: -10px; right: 6px;
  opacity: 0.09; line-height: 1; color: var(--ocean-deep);
  pointer-events: none;
}
.stat-card-icon svg { width: 58px; height: 58px; }
.stat-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.1rem; color: var(--ocean-deep); line-height: 1;
}
.stat-note { font-size: 0.74rem; color: var(--muted); margin-top: 5px; }

/* ── FOOTER (public pages) ── */
.site-footer {
  background: var(--ocean-deep);
  border-top: 1px solid rgba(107, 184, 232, 0.2);
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-social { display: flex; gap: 10px; }
.footer-social-link {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); font-size: 0.85rem; font-weight: 700;
  transition: all var(--t);
}
.footer-social-link:hover { background: #1877f2; color: white; border-color: #1877f2; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 20px; border-radius: var(--r-sm);
  font-size: 0.86rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  background: var(--ocean-deep); color: var(--white);
  display: none; animation: slideToast 0.3s ease;
  max-width: 320px;
}
.toast.show { display: block; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warn    { background: #d97706; }

/* ── MODAL ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--card); border-radius: var(--r-lg);
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  position: relative;
  border: 1px solid var(--border);
}
.modal-header {
  padding: 24px 28px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem; color: var(--ocean-deep);
}
.modal-sub { font-size: 0.84rem; color: var(--muted); margin-top: 4px; }
.modal-close {
  background: none; border: none; font-size: 1.2rem;
  color: var(--muted); line-height: 1; transition: color var(--t);
  padding: 4px; margin-left: 16px; flex-shrink: 0;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 20px 28px; }
.modal-footer { padding: 0 28px 24px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 0.9rem; }

/* ── DIVIDER ── */
.divider {
  position: relative; text-align: center;
  color: var(--muted); font-size: 0.8rem; margin: 16px 0;
}
.divider::before, .divider::after {
  content: ''; position: absolute; top: 50%;
  width: 42%; height: 1px; background: var(--border);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }

/* ── LINK BTN ── */
.link-btn {
  background: none; border: none;
  color: var(--ocean-light); font-family: var(--font-body);
  font-size: inherit; cursor: pointer;
  text-decoration: underline; transition: color var(--t);
}
.link-btn:hover { color: var(--ocean-deep); }

/* ── KEYFRAMES ── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideToast { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wave    { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(0.7)} }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; padding: 80px 18px 32px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 12px 18px; }
}
