/* Modern CSS Design System - PERBAKIN DIY Official Red Accent Theme */
:root {
  --primary: #dc2626; /* Official Red Accent */
  --primary-hover: #b91c1c; /* Deep Red Hover */
  --primary-light: #fee2e2; /* Light Red Tint */
  --accent: #f59e0b; /* Amber/Gold Accent */
  --accent-light: #fef3c7;
  --dark: #0f172a; /* Dark Slate Body Text */
  --sidebar-bg: #111827; /* Dark Charcoal/Navy Sidebar */
  --slate: #475569;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-pill: 9999px;
  --shadow: 0 4px 20px -2px rgba(220, 38, 38, 0.08);
  --shadow-lg: 0 10px 30px -4px rgba(15, 23, 42, 0.15);

  /* Workflow Status Colors */
  --status-draft-bg: #f1f5f9;
  --status-draft-text: #475569;
  --status-pending-bg: #eff6ff;
  --status-pending-text: #2563eb;
  --status-verified-bg: #dcfce7;
  --status-verified-text: #15803d;
  --status-rejected-bg: #fee2e2;
  --status-rejected-text: #b91c1c;
  --status-inactive-bg: #f3f4f6;
  --status-inactive-text: #6b7280;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--light-bg);
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Dedicated Fullscreen Login View */
.login-screen-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  background: #ffffff;
}

.login-screen-wrapper.hidden {
  display: none !important;
}

.login-hero-side {
  flex: 1.2;
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 50%, #111827 100%);
  color: white;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-hero-side::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.login-hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-hero-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.login-hero-brand h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.login-hero-brand p {
  font-size: 12px;
  color: #fecdd3;
}

.login-hero-content h1 {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
}

.login-hero-content p {
  font-size: 14.5px;
  opacity: 0.9;
  max-width: 500px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.feature-pill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-pill-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
}

.login-hero-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #f8fafc;
}

.login-card-box {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.login-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-avatar-icon {
  width: 60px;
  height: 60px;
  background: #fee2e2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-avatar-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.login-card-header h3 {
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 6px;
}

.login-card-header p {
  font-size: 13px;
  color: var(--slate);
}

.quick-demo-accounts {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.quick-demo-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.demo-pills-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.demo-pill:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Sidebar Styling - Dark Theme with Red Highlights */
.sidebar {
  width: 270px;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand h1 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin: 0;
}

.sidebar-brand span {
  font-size: 11px;
  color: #fca5a5;
  font-weight: 600;
}

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

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin: 16px 12px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  border-left: 4px solid #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 11px;
  color: #94a3b8;
}

/* Main Content Area */
.main-wrapper {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Header Navbar */
.top-navbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.top-navbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-navbar-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}

.org-badge {
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Content Container */
.content-area {
  padding: 20px 24px;
}

/* Alert Banners */
.alert-sk-banner {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border: 1px solid #fecdd3;
  border-left: 5px solid #dc2626;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.08);
}

.alert-sk-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alert-sk-icon {
  width: 40px;
  height: 40px;
  background: #fecdd3;
  color: #dc2626;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.alert-sk-text h4 {
  font-size: 14px;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 2px;
}

.alert-sk-text p {
  font-size: 13px;
  color: #be123c;
}

/* Hero & Pengda Profile Banner Card (Red Theme from Reference Screenshot) */
.pengda-profile-card {
  background: linear-gradient(135deg, #1e1e1e 0%, #111827 50%, #000000 100%);
  color: white;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border-left: 6px solid #dc2626;
}

.pengda-profile-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(220, 38, 38, 0.35) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.pengda-info-main {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

.pengda-logo-large {
  width: 72px;
  height: 72px;
  background: #ffffff;
  border-radius: 16px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.pengda-title-details h3 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #ffffff;
}

.pengda-meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Three Pillars Section (Tiga Pilar Bidang Menembak) */
.tiga-pilar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.pilar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
  position: relative;
}

.pilar-card:hover {
  transform: translateY(-3px);
  border-color: #fca5a5;
  box-shadow: var(--shadow-lg);
}

.pilar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.pilar-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.pilar-desc {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 12px;
  line-height: 1.4;
}

.pilar-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pilar-link:hover {
  text-decoration: underline;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.metric-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.metric-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 4px;
}

.metric-subtitle {
  font-size: 11px;
  color: #64748b;
}

/* Quick Actions Section */
.quick-actions-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}

.quick-actions-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons - Red Pill Style */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: #dc2626;
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
  background: #b91c1c;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1f2937;
  color: white;
}

.btn-secondary:hover {
  background: #111827;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid #e2e8f0;
  color: var(--dark);
  border-radius: var(--radius-pill);
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-accent {
  background: #dc2626;
  color: #ffffff;
  font-weight: 700;
}

.btn-accent:hover {
  background: #991b1b;
}

.btn-warning {
  background: #d97706;
  color: white;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

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

/* Status Badges */
.badge-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: capitalize;
}

.badge-draft {
  background: var(--status-draft-bg);
  color: var(--status-draft-text);
  border: 1px solid #cbd5e1;
}

.badge-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid #bfdbfe;
}

.badge-verified {
  background: var(--status-verified-bg);
  color: var(--status-verified-text);
  border: 1px solid #bbf7d0;
}

.badge-rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  border: 1px solid #fecaca;
}

.badge-inactive {
  background: var(--status-inactive-bg);
  color: var(--status-inactive-text);
}

/* Dashboard Grid Charts */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 280px;
  overflow: hidden;
}

.chart-card canvas {
  max-width: 100% !important;
  box-sizing: border-box;
}

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

.card-header-clean h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
}

/* Data Table Styling - Konsisten & Presisi Sesuai Standar Tabel Klub */
.table-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 20px;
}

.table-toolbar {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 600px; /* prevent collapse before scrolling */
}

.data-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid #cbd5e1;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--dark);
  vertical-align: middle;
}

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

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

/* Action column consistent width */
.data-table td:last-child,
.data-table th:last-child {
  text-align: center;
  width: 175px;
  min-width: 165px;
  max-width: 195px;
}

.action-btn-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 170px !important;
  margin: 0 auto !important;
}

.action-btn-group .btn {
  display: flex !important;
  width: 100% !important;
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  font-size: 11px !important;
  padding: 5px 10px !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--dark);
}

.modal-body {
  padding: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

/* Digital Membership Card (KTA Red Theme) */
.digital-kta-card {
  width: 380px;
  height: 235px;
  background: linear-gradient(135deg, #7f1d1d, #dc2626, #991b1b);
  border-radius: 16px;
  color: white;
  padding: 18px 20px;
  position: relative;
  box-shadow: 0 14px 35px rgba(220, 38, 38, 0.4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto;
}

.digital-kta-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.kta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.kta-org-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.kta-subtitle {
  font-size: 8.5px;
  color: #fecdd3;
}

.kta-body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.kta-photo {
  width: 72px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #ffffff;
  background: #fff;
}

.kta-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kta-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.kta-no {
  font-size: 11px;
  color: #fef08a;
  font-weight: 700;
  font-family: monospace;
}

.kta-meta-item {
  font-size: 9.5px;
  color: #ffe4e6;
}

.kta-qr-box {
  background: white;
  padding: 4px;
  border-radius: 6px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tabs */
.nav-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-item {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* View Sections */
.view-section {
  display: none !important;
}

.view-section.active {
  display: block !important;
}

/* Sidebar Close Button for Mobile Drawer */
.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: auto;
  transition: all 0.2s ease;
}
.sidebar-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* =============================================
   RESPONSIVE: TABLET ONLY (769px - 1024px)
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .login-screen-wrapper {
    flex-direction: column;
  }
  .login-hero-side {
    padding: 30px 24px;
    flex: none;
  }
  .sidebar {
    width: 80px;
  }
  .sidebar-brand,
  .nav-section-label,
  .nav-item span,
  .sidebar-footer .user-info {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 80px;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tiga-pilar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   RESPONSIVE: MOBILE (max-width: 768px)
   ============================================= */
@media (max-width: 768px) {
  /* Global horizontal overflow lock */
  html,
  body,
  .app-container,
  .main-wrapper,
  .content-area {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Dedicated Mobile Login Screen Layout */
  .login-screen-wrapper {
    flex-direction: column !important;
    overflow-y: auto !important;
    position: fixed !important;
    inset: 0 !important;
  }
  .login-hero-side {
    flex: none !important;
    padding: 20px 16px !important;
    min-height: auto !important;
    background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
  }
  .login-hero-content,
  .login-hero-footer,
  .feature-pill-list {
    display: none !important;
  }
  .login-hero-brand {
    gap: 12px !important;
  }
  .login-hero-brand img {
    width: 38px !important;
    height: 38px !important;
    padding: 4px !important;
  }
  .login-hero-brand h2 {
    font-size: 16px !important;
  }
  .login-hero-brand p {
    font-size: 11px !important;
  }
  .login-form-side {
    flex: 1 !important;
    padding: 20px 14px !important;
    align-items: flex-start !important;
    background: #f8fafc !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .login-card-box {
    max-width: 100% !important;
    width: 100% !important;
    padding: 24px 18px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    box-sizing: border-box !important;
  }
  .login-card-header {
    margin-bottom: 20px !important;
  }
  .login-avatar-icon {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 10px !important;
  }
  .login-avatar-icon img {
    width: 26px !important;
    height: 26px !important;
  }
  .login-card-header h3 {
    font-size: 18px !important;
  }
  .login-card-header p {
    font-size: 12px !important;
  }

  /* Sidebar: fully visible 270px off-canvas drawer on mobile */
  .sidebar {
    width: 270px !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-brand {
    display: flex !important;
  }
  .nav-section-label {
    display: block !important;
  }
  .nav-item span {
    display: inline !important;
  }
  .sidebar-footer .user-info {
    display: flex !important;
  }
  .sidebar-close-btn {
    display: block !important;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
  }
  .sidebar-overlay.visible {
    display: block;
  }
  .main-wrapper {
    margin-left: 0;
    width: 100% !important;
  }

  /* Top Navbar - Compact & Non-Overflowing */
  .top-navbar {
    padding: 0 10px;
    height: 56px;
    gap: 8px;
    overflow: hidden;
  }
  .top-navbar-title {
    flex: 1;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
  }
  .top-navbar-title h2 {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
  }
  .org-badge {
    display: none !important;
  }
  .navbar-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .navbar-actions label {
    display: none !important;
  }
  #roleSelector {
    font-size: 11px;
    padding: 4px 6px;
    max-width: 115px;
    text-overflow: ellipsis;
  }
  .navbar-actions .btn:last-child {
    display: none !important; /* Hide secondary export button on mobile top navbar */
  }

  /* Content Area */
  .content-area {
    padding: 10px;
    width: 100% !important;
  }

  /* Alert banner */
  .alert-sk-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  /* Dashboard Hero Card */
  .pengda-profile-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
    overflow: hidden;
  }
  .pengda-info-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  .pengda-title-details h3 {
    font-size: 16px;
    word-break: break-word;
  }
  .pengda-profile-card > div:last-child {
    width: 100%;
    text-align: left;
  }

  /* Grids */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tiga-pilar-grid {
    grid-template-columns: 1fr;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }

  /* Quick Actions Bar */
  .quick-actions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }
  .action-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .action-buttons-group .btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 11.5px;
    padding: 7px 10px;
  }

  /* Table Card & Toolbar */
  .table-card {
    border-radius: 10px;
    width: 100% !important;
    box-sizing: border-box;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .table-search-box {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .table-search-box .form-control,
  .table-search-box select,
  .table-search-box input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .table-toolbar > .btn {
    width: 100%;
    justify-content: center;
  }

  /* Data Table Card View for Mobile */
  .table-responsive {
    overflow-x: visible !important;
  }
  .data-table {
    min-width: 0 !important;
    width: 100% !important;
  }
  .data-table thead {
    display: none !important;
  }
  .data-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .data-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 0 !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    font-size: 13px;
    gap: 8px;
    width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 100px;
    max-width: 120px;
    flex-shrink: 0;
    text-align: left;
  }
  .data-table td:last-child {
    padding-top: 10px !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    margin-top: 6px;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .data-table td:last-child::before {
    content: none !important;
  }
  .data-table td:last-child .btn {
    flex: 1 1 auto;
    min-width: 80px;
    justify-content: center;
    text-align: center;
    font-size: 11.5px;
    padding: 6px 8px;
  }

  /* Form & Modals Mobile Bottom Sheet */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .form-group.full-width {
    grid-column: span 1 !important;
  }
  .form-group,
  .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-card {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(100%);
    box-sizing: border-box !important;
  }
  .modal-overlay.active .modal-card {
    transform: translateY(0);
  }
  .modal-body {
    padding: 14px !important;
  }
  .modal-footer {
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .modal-footer .btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  /* KTA Card Mobile Fit */
  .digital-kta-card {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 180px;
    padding: 14px !important;
    box-sizing: border-box !important;
  }
}

/* =============================================
   RESPONSIVE: SMALL MOBILE (max-width: 480px)
   ============================================= */
@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric-card {
    padding: 10px 12px;
  }
  .metric-value {
    font-size: 20px;
  }
  .top-navbar-title img {
    display: none;
  }
  .top-navbar-title h2 {
    font-size: 12px;
  }
  .content-area {
    padding: 8px;
  }
  .action-buttons-group .btn {
    flex: 1 1 100%;
  }
  .btn {
    padding: 7px 12px;
    font-size: 11.5px;
  }
  .btn-sm {
    padding: 5px 8px;
    font-size: 10.5px;
  }
}

/* =============================================
   HAMBURGER MENU BUTTON (mobile only)
   ============================================= */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--dark);
  font-size: 20px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: #f1f5f9;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
