/* =============================================
   IEMS — Shared Enterprise Design System
   ============================================= */

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

/* ── CSS Custom Properties ── */
:root {
  /* Primary palette */
  --primary: #1E3A8A;
  --primary-light: #3B5FBF;
  --primary-dark: #152C6B;
  --primary-50: #EFF3FF;
  --primary-100: #D9E2FF;

  /* Accent */
  --accent: #10B981;
  --accent-light: #34D399;
  --accent-dark: #059669;
  --accent-50: #ECFDF5;

  /* Neutrals */
  --bg: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-sidebar: #111827;
  --bg-sidebar-hover: #1F2937;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-white: #FFFFFF;
  --text-sidebar: #D1D5DB;

  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.35s ease;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: var(--primary);
}

img {
  max-width: 100%;
  display: block;
}

/* ── Login Screen ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #0F1F4E 50%, #0B1736 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.5s ease;
}

.login-card .logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .logo h1 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-card .logo span {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.login-card .role-badge {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}

/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-header h2 {
  color: var(--text-white);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header h2 span.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius);
  font-size: 16px;
}

.sidebar-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-nav .nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 12px 12px 8px;
  font-weight: 600;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-sidebar);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
}

.sidebar-nav a:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-white);
}

.sidebar-nav a.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-light);
}

.sidebar-nav a .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav a .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

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

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-footer .user-info:hover {
  background: var(--bg-sidebar-hover);
}

.sidebar-footer .avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-footer .user-details {
  flex: 1;
  min-width: 0;
}

.sidebar-footer .user-details .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .user-details .role {
  font-size: 11px;
  color: var(--text-muted);
}

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

/* ── Top Header ── */
.top-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.top-header .header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-header .header-left h2 {
  font-size: 18px;
  font-weight: 600;
}

.top-header .mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

.top-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-header .header-right .btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  position: relative;
}

.top-header .header-right .btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.top-header .header-right .btn-icon .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ── Page Content ── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.kpi-card.blue::before {
  background: var(--primary);
}

.kpi-card.green::before {
  background: var(--accent);
}

.kpi-card.orange::before {
  background: var(--warning);
}

.kpi-card.red::before {
  background: var(--danger);
}

.kpi-card .kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-card .kpi-header .kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.kpi-card.blue .kpi-icon {
  background: var(--primary-50);
  color: var(--primary);
}

.kpi-card.green .kpi-icon {
  background: var(--accent-50);
  color: var(--accent);
}

.kpi-card.orange .kpi-icon {
  background: #FFF7ED;
  color: var(--warning);
}

.kpi-card.red .kpi-icon {
  background: #FEF2F2;
  color: var(--danger);
}

.kpi-card .kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.kpi-card .kpi-value {
  font-family: 'Figtree', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.kpi-card .kpi-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-card .kpi-change.up {
  color: var(--success);
}

.kpi-card .kpi-change.down {
  color: var(--danger);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

.card-body.no-padding {
  padding: 0;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Figtree', sans-serif;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Figtree', sans-serif;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  background: var(--bg);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

table tbody tr {
  transition: var(--transition);
}

table tbody tr:hover {
  background: var(--primary-50);
}

table tbody tr:last-child td {
  border-bottom: none;
}

.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.table-user .user-name {
  font-weight: 600;
  font-size: 14px;
}

.table-user .user-email {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-success {
  background: #ECFDF5;
  color: #065F46;
}

.badge-warning {
  background: #FFFBEB;
  color: #92400E;
}

.badge-danger {
  background: #FEF2F2;
  color: #991B1B;
}

.badge-info {
  background: #EFF6FF;
  color: #1E40AF;
}

.badge-gray {
  background: #F3F4F6;
  color: #4B5563;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.3s ease;
}

.modal-lg {
  max-width: 800px;
}

.modal-sm {
  max-width: 440px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--danger);
  color: white;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Search & Filter Bar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Figtree', sans-serif;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text-primary);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.filter-select {
  padding: 9px 36px 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Figtree', sans-serif;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

.pagination .page-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination .page-btns {
  display: flex;
  gap: 4px;
}

.pagination .page-btns button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination .page-btns button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .page-btns button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination .page-btns button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.5s ease;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  animation: slideInRight 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast .toast-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ── Loading Spinner ── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.long {
  width: 100%;
}

/* ── Profile Section ── */
.profile-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-field {
  padding: 12px 0;
}

.profile-field .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.profile-field .value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Feedback / Notes ── */
.feedback-item {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: var(--transition);
}

.feedback-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.feedback-item .feedback-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feedback-item .feedback-meta .author {
  font-weight: 600;
  font-size: 13px;
}

.feedback-item .feedback-meta .date {
  font-size: 12px;
  color: var(--text-muted);
}

.feedback-item .feedback-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Certificate Card ── */
.cert-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cert-card .cert-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cert-card .cert-info {
  flex: 1;
}

.cert-card .cert-info .cert-type {
  font-weight: 600;
  font-size: 14px;
}

.cert-card .cert-info .cert-date {
  font-size: 12px;
  color: var(--text-muted);
}

.cert-card .cert-actions {
  display: flex;
  gap: 6px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.tabs .tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tabs .tab:hover {
  color: var(--text-primary);
}

.tabs .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.upload-zone .upload-icon {
  font-size: 36px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.upload-zone p {
  color: var(--text-secondary);
  font-size: 14px;
}

.upload-zone p span {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Utility Classes ── */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-sm {
  font-size: 13px;
}

.text-muted {
  color: var(--text-muted);
}

.fw-600 {
  font-weight: 600;
}

.w-full {
  width: 100%;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-header .mobile-menu-btn {
    display: flex;
  }

  .page-content {
    padding: 20px 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .profile-section {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: auto;
  }

  .modal {
    max-height: 95vh;
    margin: 10px;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .top-header {
    padding: 0 16px;
  }

  .page-content {
    padding: 16px 12px;
  }

  .card-header {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }
}

/* ── Mobile Overlay ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

/* ── Contact Bar ── */
.contact-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 18px;
  color: white;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
}

.contact-btn.whatsapp {
  background: #25D366;
  color: white;
}

.contact-btn.facebook {
  background: #1877F2;
  color: white;
}

.contact-btn.linkedin {
  background: #0A66C2;
  color: white;
}

.contact-btn.sms {
  background: #6B7280;
  color: white;
}

.contact-btn.phone {
  background: #10B981;
  color: white;
}

.contact-btn.disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: default;
  pointer-events: none;
}

.contact-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}