/* =============================================================
   Leave Portal — app.css  v1.0
   ============================================================= */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --lp-primary:      #1E3A5F;
  --lp-primary-dark: #152B47;
  --lp-accent:       #2E86AB;
  --lp-accent2:      #A23B72;
  --lp-success:      #27AE60;
  --lp-warning:      #E67E22;
  --lp-danger:       #C0392B;
  --lp-bg:           #F0F4F8;
  --lp-card:         #FFFFFF;
  --lp-text:         #2C3E50;
  --lp-muted:        #6C757D;
  --lp-border:       #DEE2E6;
  --lp-sidebar-w:    240px;
  --lp-topbar-h:     58px;
  --lp-radius:       10px;
  --lp-shadow:       0 2px 12px rgba(0,0,0,.08);
  --lp-shadow-md:    0 4px 20px rgba(0,0,0,.12);
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.lp-body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--lp-bg);
  color: var(--lp-text);
  margin: 0;
  font-size: .9375rem;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.lp-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--lp-topbar-h);
  background: var(--lp-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  z-index: 1050;
  display: flex;
  align-items: center;
}

.lp-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .3px;
  text-decoration: none;
}

.lp-topbar-btn {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  font-size: .82rem;
}
.lp-topbar-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.2);
}

.lp-sidebar-toggle {
  color: rgba(255,255,255,.85);
  background: transparent;
  border: none;
  padding: .25rem .4rem;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.lp-sidebar {
  position: fixed;
  top: var(--lp-topbar-h);
  left: 0;
  width: var(--lp-sidebar-w);
  height: calc(100vh - var(--lp-topbar-h));
  background: var(--lp-primary);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
  transition: transform .25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.lp-sidebar-inner { padding: .5rem 0 2rem; }

.lp-sidebar .nav-link {
  color: rgba(255,255,255,.72);
  font-size: .875rem;
  padding: .52rem 1.25rem;
  border-radius: 0;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.lp-sidebar .nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.lp-sidebar .nav-link.active {
  background: var(--lp-accent);
  color: #fff;
  font-weight: 600;
}

.lp-sidebar-section {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  padding: 1.1rem 1.25rem .35rem;
}

/* Mobile sidebar */
@media (max-width: 767px) {
  .lp-sidebar { transform: translateX(-100%); }
  .lp-sidebar.open { transform: translateX(0); }
}

.lp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1039;
}
.lp-overlay.show { display: block; }

/* ── Layout wrapper ─────────────────────────────────────────── */
.lp-wrapper {
  display: flex;
  padding-top: var(--lp-topbar-h);
  min-height: 100vh;
}

.lp-main {
  flex: 1;
  margin-left: var(--lp-sidebar-w);
  min-width: 0;
  transition: margin-left .25s ease;
}

@media (max-width: 767px) {
  .lp-main { margin-left: 0; }
}

.lp-content {
  padding: 1.75rem 1.5rem 3rem;
}

/* ── Page header ─────────────────────────────────────────────── */
.lp-page-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: .9rem;
  border-bottom: 2px solid var(--lp-border);
}

.lp-page-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--lp-primary);
  margin: 0;
}

.lp-page-header .lp-page-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--lp-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--lp-border);
  font-weight: 600;
  color: var(--lp-primary);
  padding: .85rem 1.25rem;
  border-radius: var(--lp-radius) var(--lp-radius) 0 0 !important;
}

/* ── Landing tiles ───────────────────────────────────────────── */
.lp-tile {
  border: none;
  border-radius: 16px;
  padding: 2.2rem 1.5rem 1.8rem;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--lp-shadow);
  text-decoration: none;
  display: block;
  background: var(--lp-card);
  color: inherit;
  position: relative;
  overflow: hidden;
}
.lp-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tile-color, var(--lp-accent));
}
.lp-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--lp-shadow-md);
  color: inherit;
}
.lp-tile:active { transform: translateY(-2px); }

.lp-tile-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.1rem;
  background: color-mix(in srgb, var(--tile-color, var(--lp-accent)) 12%, white);
  color: var(--tile-color, var(--lp-accent));
}

.lp-tile h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lp-primary);
  margin-bottom: .35rem;
}

.lp-tile p {
  font-size: .845rem;
  color: var(--lp-muted);
  margin: 0;
}

.lp-tile-badge {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .55rem;
  border-radius: 20px;
  margin-top: .9rem;
  font-weight: 600;
  letter-spacing: .3px;
}
.lp-tile-badge.available { background: #d4edda; color: #155724; }
.lp-tile-badge.coming-soon { background: #fff3cd; color: #856404; }

/* ── Tables ──────────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table thead th {
  background: var(--lp-primary);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: .65rem .85rem;
  white-space: nowrap;
}
.table > tbody > tr:hover { background: rgba(46,134,171,.05); }
.table td { padding: .6rem .85rem; vertical-align: middle; }

/* Column filter inputs inside thead */
thead input.col-filter {
  width: 100%;
  padding: .25rem .4rem;
  font-size: .78rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  background: rgba(255,255,255,.12);
  color: #fff;
  margin-top: .35rem;
}
thead input.col-filter::placeholder { color: rgba(255,255,255,.55); }
thead input.col-filter:focus {
  outline: none;
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.6);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary   { background: var(--lp-accent);   border-color: var(--lp-accent); }
.btn-primary:hover { background: #2575a0; border-color: #2575a0; }

.btn-lp-primary {
  background: var(--lp-primary);
  border-color: var(--lp-primary);
  color: #fff;
}
.btn-lp-primary:hover { background: var(--lp-primary-dark); color: #fff; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: .875rem; color: var(--lp-text); }
.form-control:focus, .form-select:focus {
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 .2rem rgba(46,134,171,.2);
}

/* ── Tabs (employee form) ────────────────────────────────────── */
.nav-tabs .nav-link { color: var(--lp-muted); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--lp-primary); font-weight: 700; }

/* ── Balance summary box ─────────────────────────────────────── */
.lp-balance-box {
  background: linear-gradient(135deg, var(--lp-primary) 0%, var(--lp-accent) 100%);
  color: #fff;
  border-radius: var(--lp-radius);
  padding: 1.1rem 1.4rem;
}
.lp-balance-box .label { font-size: .75rem; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.lp-balance-box .value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }

/* ── DataTables overrides ────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--lp-border);
  border-radius: 6px;
  padding: .3rem .65rem;
}
.dataTables_wrapper .dt-buttons .btn {
  font-size: .8rem;
  padding: .3rem .75rem;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 3px; }

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 575px) {
  .lp-content { padding: 1rem .75rem 2rem; }
  .lp-page-header h1 { font-size: 1.2rem; }
}
