/* iClick Leave Portal — Main Stylesheet */

:root {
  --sidebar-width: 220px;
  --navbar-height: 60px;
  --brand-blue: #0d6efd;
  --brand-blue-light: #e8f0fe;
}

/* ── Layout ─────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  background: #f4f6f9;
  color: #212529;
}

.main-content {
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--navbar-height));
  padding-top: var(--navbar-height);
}

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

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 1px 8px;
  border-radius: 8px;
  color: #495057;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link i {
  font-size: 15px;
  width: 18px;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: #f0f4ff;
  color: var(--brand-blue);
}

.sidebar-link.active {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  font-weight: 600;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 6px;
  line-height: 1.5;
}

.btn-primary {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* ── Tables ──────────────────────────────────────── */
.table {
  font-size: 13.5px;
}

.table thead th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  border-bottom-width: 1px;
  padding: 10px 12px;
}

.table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: #f8f9ff;
}

/* ── Badges ──────────────────────────────────────── */
.badge {
  font-weight: 500;
}

/* ── Forms ───────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 8px;
  font-size: 13.5px;
  border-color: #dee2e6;
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.input-group-text {
  border-radius: 8px;
}

.input-group > :first-child { border-radius: 8px 0 0 8px !important; }
.input-group > :last-child  { border-radius: 0 8px 8px 0 !important; }
.input-group > :not(:first-child):not(:last-child) { border-radius: 0 !important; }

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* ── Alerts ──────────────────────────────────────── */
.alert {
  border-radius: 10px;
  font-size: 13.5px;
}

/* ── Progress ────────────────────────────────────── */
.progress {
  border-radius: 4px;
  background: #e9ecef;
}

/* ── Pagination ──────────────────────────────────── */
.page-link {
  border-radius: 6px !important;
  font-size: 13px;
  color: var(--brand-blue);
  border: 1px solid #dee2e6;
  margin: 0 2px;
}
.page-item.active .page-link {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* ── Subtle badge variants (Bootstrap 5.3+) ──────── */
.bg-success-subtle  { background-color: #d1e7dd !important; }
.bg-danger-subtle   { background-color: #f8d7da !important; }
.bg-warning-subtle  { background-color: #fff3cd !important; }
.bg-primary-subtle  { background-color: #cfe2ff !important; }
.bg-secondary-subtle{ background-color: #e2e3e5 !important; }
.bg-info-subtle     { background-color: #cff4fc !important; }

.text-success  { color: #146c43 !important; }
.text-danger   { color: #842029 !important; }
.text-warning  { color: #664d03 !important; }
.text-primary  { color: #084298 !important; }
.text-secondary{ color: #41464b !important; }
.text-info     { color: #0a58ca !important; }

.border-success-subtle  { border-color: #a3cfbb !important; }
.border-danger-subtle   { border-color: #f1aeb5 !important; }
.border-warning-subtle  { border-color: #ffe69c !important; }
.border-primary-subtle  { border-color: #9ec5fe !important; }
.border-secondary-subtle{ border-color: #c4c8cb !important; }
.border-info-subtle     { border-color: #9eeaf9 !important; }

/* ── Alert subtle variants ───────────────────────── */
.alert-success-subtle { background: #d1e7dd; border-color: #a3cfbb; color: #0a3622; }
.alert-danger-subtle  { background: #f8d7da; border-color: #f1aeb5; color: #58151c; }
.alert-warning-subtle { background: #fff3cd; border-color: #ffe69c; color: #332701; }
.alert-info-subtle    { background: #cff4fc; border-color: #9eeaf9; color: #055160; }

/* ── FullCalendar overrides ──────────────────────── */
.fc {
  font-size: 13px;
}
.fc-button {
  border-radius: 6px !important;
}
.fc-button-primary {
  background: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}

/* ── Utilities ───────────────────────────────────── */
.last-border-0:last-child { border-bottom: 0 !important; }

/* ── Scrollbar (webkit) ──────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #adb5bd; }
