/* =============================================================================
   OMNISOFT ALBUS — Design System v3
   #1D2E3D (navy) · #23809D (teal)
============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=DM+Sans:wght@400;500&display=swap');

:root {
  --navy:      #1D2E3D;
  --teal:      #23809D;
  --teal-dk:   #1A6478;
  --teal-lt:   #E8F5F9;
  --green:     #16A34A;
  --green-lt:  #F0FDF4;
  --red:       #DC2626;
  --red-lt:    #FEF2F2;
  --amber:     #D97706;
  --amber-lt:  #FFFBEB;
  --bg:        #F0F5F7;
  --surface:   #FFFFFF;
  --border:    #D8E6EA;
  --txt-1:     #1D2E3D;
  --txt-2:     #4B6475;
  --txt-3:     #94B0BA;
  --sidebar-w: 240px;
  --header-h:  56px;
  --r:         8px;
  --r-lg:      12px;
  --shadow:    0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body   { font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--txt-1); background: var(--bg); }
a      { color: var(--teal); text-decoration: none; }
a:hover{ color: var(--teal-dk); }
img    { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── GUEST LAYOUT ─────────────────────────────────────────────────────── */
.guest-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 440px;
}
.guest-brand {
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 64px;
  background: linear-gradient(135deg, var(--navy) 0%, #1A3A4A 100%);
  position: relative; overflow: hidden;
}
.guest-brand::after {
  content: ''; position: absolute; bottom: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(35,128,157,.25) 0%, transparent 70%);
}
.guest-brand img { height: 40px; max-width: 280px; margin-bottom: 48px; }
.guest-brand h1  { font-family: 'Outfit', sans-serif; font-size: 30px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 16px; }
.guest-brand h1 em { color: #7DD3E8; font-style: normal; }
.guest-brand p   { color: rgba(255,255,255,.5); font-size: 14px; line-height: 1.7; max-width: 340px; }
.guest-stats     { display: flex; gap: 32px; margin-top: 48px; }
.guest-stat-n    { font-family: 'Outfit', sans-serif; font-size: 26px; font-weight: 700; color: #fff; }
.guest-stat-l    { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 2px; letter-spacing: .04em; text-transform: uppercase; }
.guest-form      { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 56px 48px; }
.guest-form h2   { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.guest-form .sub { color: var(--txt-2); font-size: 13px; margin-bottom: 32px; }

/* ── APP LAYOUT ───────────────────────────────────────────────────────── */
.app-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto;
}
.sidebar-logo { padding: 18px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-logo img { height: 28px; max-width: 180px; }
.sidebar-search { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.sidebar-search form { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border-radius: 6px; padding: 7px 10px; }
.sidebar-search input { background: none; border: none; outline: none; color: #fff; font-size: 13px; width: 100%; }
.sidebar-search input::placeholder { color: rgba(255,255,255,.3); }
.sidebar-search svg { width: 14px; height: 14px; fill: rgba(255,255,255,.3); flex-shrink: 0; }
.sidebar-nav { flex: 1; padding: 8px 10px; }
.nav-section { margin-bottom: 4px; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.25); padding: 10px 10px 4px; display: block; }
.nav-link { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; color: rgba(255,255,255,.55); font-size: 13.5px; transition: all .15s; margin-bottom: 1px; }
.nav-link svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-link.active { background: rgba(35,128,157,.25); color: #fff; }
.nav-link .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.nav-link .badge.teal { background: var(--teal); }
.sidebar-user { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 7px; transition: background .15s; width: 100%; background: none; border: none; text-align: left; }
.user-btn:hover { background: rgba(255,255,255,.07); }
.user-av { width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; background: linear-gradient(135deg, var(--teal), var(--teal-dk)); display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 700; color: #fff; overflow: hidden; }
.user-av img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.85); }
.user-role { font-size: 11px; color: rgba(255,255,255,.35); }
.nav-link.signout { color: rgba(255,255,255,.3); font-size: 13px; margin-top: 2px; }
.nav-link.signout:hover { color: rgba(255,255,255,.6); }

.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.topbar { height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 50; }
.topbar-left { flex: 1; display: flex; align-items: center; gap: 8px; }
.breadcrumb  { display: flex; align-items: center; gap: 6px; }
.breadcrumb a   { font-size: 13px; color: var(--txt-3); }
.breadcrumb a:hover { color: var(--txt-2); }
.breadcrumb .sep { color: var(--txt-3); }
.breadcrumb .cur { font-size: 13px; font-weight: 500; color: var(--txt-1); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.tb-btn { width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--txt-2); transition: all .15s; }
.tb-btn:hover { background: var(--bg); }
.tb-btn svg { width: 16px; height: 16px; fill: currentColor; }

.page { padding: 24px 28px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; color: var(--txt-1); }
.page-sub   { font-size: 13px; color: var(--txt-2); margin-top: 3px; }

/* ── COMPONENTS ───────────────────────────────────────────────────────── */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; }
.flash.success { background: var(--green-lt); color: var(--green); }
.flash.danger  { background: var(--red-lt);   color: var(--red);   }
.flash.warning { background: var(--amber-lt); color: var(--amber); }
.flash-close   { background: none; border: none; font-size: 18px; line-height: 1; color: inherit; opacity: .6; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; border: 1.5px solid transparent; transition: all .15s; white-space: nowrap; font-family: 'Outfit', sans-serif; }
.btn svg { width: 14px; height: 14px; fill: currentColor; }
.btn-primary   { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 1px 4px rgba(35,128,157,.25); }
.btn-primary:hover { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--txt-1); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger    { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm        { padding: 5px 11px; font-size: 12.5px; }
.btn-full      { width: 100%; justify-content: center; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--txt-2); margin-bottom: 5px; }
.form-control, .form-select { width: 100%; padding: 9px 12px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--bg); font-family: 'DM Sans', sans-serif; font-size: 13.5px; color: var(--txt-1); outline: none; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(35,128,157,.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 13px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--bg); }
.card-title  { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; }
.card-body   { padding: 18px; }
.card-link   { font-size: 12px; color: var(--teal); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-top   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--txt-2); }
.stat-icon  { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; }
.stat-icon svg { width: 16px; height: 16px; fill: currentColor; }
.stat-icon.teal  { background: var(--teal-lt); color: var(--teal); }
.stat-icon.green { background: var(--green-lt); color: var(--green); }
.stat-icon.amber { background: var(--amber-lt); color: var(--amber); }
.stat-icon.red   { background: var(--red-lt);   color: var(--red);   }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 700; line-height: 1; }
.stat-note  { font-size: 12px; color: var(--txt-3); margin-top: 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--txt-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td  { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #F3F8FA; }
.td-main { font-weight: 500; color: var(--txt-1); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; background: linear-gradient(135deg, var(--teal), var(--teal-dk)); display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700; color: #fff; }
.table-footer { padding: 11px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--txt-2); background: var(--bg); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-active   { background: var(--green-lt); color: var(--green); }
.badge-inactive { background: var(--bg);       color: var(--txt-2); }
.badge-archived { background: var(--red-lt);   color: var(--red);   }
.badge-task     { background: var(--amber-lt); color: var(--amber); }
.badge-urgent   { background: var(--red-lt);   color: var(--red);   }
.badge-teal     { background: var(--teal-lt);  color: var(--teal);  }
.badge-done     { background: var(--green-lt); color: var(--green); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 8px 12px; flex: 1; max-width: 340px; }
.search-box input { border: none; background: none; outline: none; font-size: 13.5px; color: var(--txt-1); flex: 1; font-family: 'DM Sans', sans-serif; }
.search-box input::placeholder { color: var(--txt-3); }
.search-box svg { width: 14px; height: 14px; fill: var(--txt-3); flex-shrink: 0; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; color: var(--txt-2); transition: all .15s; cursor: pointer; }
.filter-btn:hover { background: var(--bg); }
.filter-btn.on { border-color: var(--teal); color: var(--teal); background: var(--teal-lt); }

.pagination { display: flex; gap: 4px; }
.pg { width: 30px; height: 30px; border-radius: 6px; border: 1.5px solid var(--border); background: var(--surface); display: grid; place-items: center; font-size: 13px; color: var(--txt-2); transition: all .15s; }
.pg:hover { background: var(--bg); }
.pg.active { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }

.detail-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: calc(var(--header-h) + 16px); }
.profile-top  { padding: 24px 20px; background: var(--navy); text-align: center; }
.profile-av   { width: 72px; height: 72px; border-radius: 14px; background: linear-gradient(135deg, var(--teal), var(--teal-dk)); display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 700; color: #fff; margin: 0 auto 12px; border: 2px solid rgba(255,255,255,.15); }
.profile-name { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: #fff; }
.profile-sub  { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 3px; }
.profile-rows { padding: 4px 0 8px; }
.profile-row  { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.profile-row:last-child { border-bottom: none; }
.profile-row svg { width: 14px; height: 14px; fill: var(--txt-3); flex-shrink: 0; margin-top: 2px; }
.profile-key { font-size: 11px; color: var(--txt-3); font-weight: 500; }
.profile-val { font-size: 13px; font-weight: 500; color: var(--txt-1); margin-top: 1px; }
.profile-actions { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--border); }

.tabs { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 3px; width: fit-content; margin-bottom: 18px; }
.tab { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--txt-2); cursor: pointer; transition: all .15s; border: none; background: none; }
.tab:hover { color: var(--txt-1); }
.tab.active { background: var(--teal); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.section-title { font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.section-title svg { width: 14px; height: 14px; fill: var(--teal); }

.history-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: none; }
.history-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; margin-top: 5px; }
.history-title { font-size: 13px; font-weight: 500; }
.history-meta  { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

.task-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-bar        { width: 3px; min-height: 40px; border-radius: 3px; flex-shrink: 0; }
.task-bar.urgent { background: var(--red); }
.task-bar.normal { background: var(--amber); }
.task-name { font-size: 13.5px; font-weight: 500; }
.task-meta { font-size: 12px; color: var(--txt-3); margin-top: 3px; }

.save-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.dash-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }

.form-link  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.check-row  { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--txt-2); }
.check-row input { accent-color: var(--teal); }
.divider    { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--txt-3); }
.text-center{ text-align: center; }
.small-link { font-size: 13px; color: var(--txt-2); }
.small-link a { color: var(--teal); font-weight: 500; }

.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; background: var(--bg); }
.error-code { font-family: 'Outfit', sans-serif; font-size: 72px; font-weight: 700; color: var(--teal); line-height: 1; }
.error-msg  { font-size: 18px; font-weight: 500; margin: 12px 0 24px; }
