/* ================================================================
   Minutes of Meeting — Design System
   Premium Indigo + Dark Sidebar Theme
   ================================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --primary:        #4F46E5;
  --primary-dark:   #3730A3;
  --primary-light:  #818CF8;
  --accent:         #06B6D4;
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --sidebar-bg:     #1E1B4B;
  --sidebar-hover:  rgba(255,255,255,0.08);
  --sidebar-text:   #C7D2FE;
  --sidebar-width:  260px;
  --body-bg:        #F1F5F9;
  --card-bg:        #FFFFFF;
  --text-primary:   #0F172A;
  --text-secondary: #64748B;
  --border-color:   #E2E8F0;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.15);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --transition:     all 0.2s ease;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #1E1B4B 0%, #1a1744 60%, #14123a 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-logo {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.sidebar-logo-text {
  color: white;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.3;
}
.sidebar-logo-text span {
  display: block;
  color: var(--sidebar-text);
  font-size: 11px;
  font-weight: 400;
}

.sidebar-nav { padding: 14px 10px; flex: 1; }

.nav-section-label {
  color: rgba(199,210,254,0.45);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 10px 6px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
  transform: translateX(2px);
}
.sidebar-nav-link.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(79,70,229,0.45);
}
.sidebar-nav-link i { font-size: 16px; flex-shrink: 0; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-user-info {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; }
.sidebar-user-role { color: var(--sidebar-text); font-size: 11px; }

.sidebar-logout {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
  border: none; cursor: pointer;
}
.sidebar-logout:hover { background: rgba(239,68,68,0.3); color: #FEE2E2; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-content { padding: 28px; flex: 1; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header-custom {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--primary); }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  transition: var(--transition);
  text-decoration: none; color: inherit;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.primary { background: rgba(79,70,229,0.12); color: var(--primary); }
.stat-icon.success { background: rgba(16,185,129,0.12); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-icon.danger  { background: rgba(239,68,68,0.12);  color: var(--danger);  }
.stat-icon.accent  { background: rgba(6,182,212,0.12);  color: var(--accent);  }

.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-top: 4px; }

/* ================================================================
   MEETING CARDS
   ================================================================ */
.meeting-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 18px 22px;
  transition: var(--transition);
  cursor: pointer; text-decoration: none; color: inherit; display: block;
  margin-bottom: 10px;
}
.meeting-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 20px rgba(79,70,229,0.12);
  color: inherit; transform: translateY(-1px);
}
.meeting-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.meeting-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.meeting-card-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px; color: var(--text-secondary); font-size: 13px;
}
.meeting-card-meta i { margin-right: 4px; color: var(--primary-light); }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-draft       { background: #F1F5F9; color: #64748B; }
.badge-berlangsung { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.badge-selesai     { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.badge-dibatalkan  { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: white; border: none;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
  font-family: inherit;
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,0.4); color: white; }

.btn-secondary-custom {
  background: white; color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-family: inherit;
}
.btn-secondary-custom:hover { border-color: var(--primary); color: var(--primary); background: rgba(79,70,229,0.04); }

.btn-danger-custom {
  background: #FEF2F2; color: var(--danger);
  border: 1.5px solid #FECACA;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-family: inherit;
}
.btn-danger-custom:hover { background: var(--danger); color: white; border-color: var(--danger); }

.btn-success-custom {
  background: linear-gradient(135deg, #059669, #047857);
  color: white; border: none;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(5,150,105,0.3); font-family: inherit;
}
.btn-success-custom:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(5,150,105,0.4); color: white; }

.btn-accent-custom {
  background: linear-gradient(135deg, var(--accent), #0284C7);
  color: white; border: none;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-family: inherit;
  box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}
.btn-accent-custom:hover { transform: translateY(-1px); color: white; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group { margin-bottom: 20px; }

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

.form-control-custom {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--text-primary); background: white;
  transition: var(--transition); outline: none;
}
.form-control-custom:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-control-custom::placeholder { color: #94A3B8; }

select.form-control-custom {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748B' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}

textarea.form-control-custom { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ================================================================
   TABLES
   ================================================================ */
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom th {
  background: #F8FAFD;
  color: var(--text-secondary);
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left; white-space: nowrap;
}
.table-custom td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13.5px; vertical-align: middle;
}
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: #F8FAFD; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert-custom {
  padding: 13px 18px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; border: 1px solid transparent;
}
.alert-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.alert-danger  { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }

/* ================================================================
   TABS
   ================================================================ */
.tab-nav {
  display: flex; gap: 4px;
  background: #F1F5F9;
  border-radius: var(--radius-md);
  padding: 4px; margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1; min-width: 120px;
  padding: 9px 14px; border: none;
  background: transparent; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit;
}
.tab-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-header {
  margin-bottom: 24px;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.page-breadcrumb { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.page-breadcrumb a { color: var(--primary); text-decoration: none; }
.page-breadcrumb a:hover { text-decoration: underline; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; color: #CBD5E1; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }

/* ================================================================
   SIGNATURE
   ================================================================ */
.signature-wrapper {
  background: #F8FAFD;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px; text-align: center;
  transition: var(--transition);
}
.signature-wrapper:hover { border-color: var(--primary); }
.signature-canvas {
  background: white; border-radius: var(--radius-sm);
  cursor: crosshair; touch-action: none;
  max-width: 100%; display: block;
}

/* ================================================================
   PHOTO GRID
   ================================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.photo-item {
  position: relative;
  border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border-color); background: #F8FAFD;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.photo-item:hover img { transform: scale(1.05); }
.photo-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.photo-item:hover .photo-item-overlay { opacity: 1; }

/* ================================================================
   SIGN PAGE (PUBLIC)
   ================================================================ */
.sign-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #1E1B4B 100%);
  display: flex; flex-direction: column;
  align-items: center; padding: 40px 16px;
}
.sign-container { width: 100%; max-width: 580px; }
.sign-header { text-align: center; margin-bottom: 28px; }
.sign-header-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
}
.sign-header h1 { color: white; font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sign-header p { color: rgba(255,255,255,0.7); font-size: 13px; }
.sign-card { background: white; border-radius: 20px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

.participant-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color); margin-bottom: 8px;
  transition: var(--transition); cursor: pointer;
}
.participant-list-item:hover { border-color: var(--primary); background: rgba(79,70,229,0.04); }
.participant-list-item.signed { border-color: var(--success); background: #ECFDF5; cursor: default; }
.participant-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.participant-position { font-size: 12px; color: var(--text-secondary); }
.participant-sign-status { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F0C29 0%, #302B63 50%, #24243E 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  background: white; border-radius: 24px; padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(79,70,229,0.35);
}
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.login-logo p { font-size: 13px; color: var(--text-secondary); }

/* ================================================================
   MISC UTILITIES
   ================================================================ */
.divider { height: 1px; background: var(--border-color); margin: 20px 0; }
.no-mb { margin-bottom: 0 !important; }

.link-token {
  background: #F8FAFD; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; font-family: monospace;
  word-break: break-all; color: var(--text-primary);
}

.upload-zone {
  border: 2px dashed var(--border-color); border-radius: var(--radius-md);
  padding: 32px; text-align: center; background: #F8FAFD;
  cursor: pointer; transition: var(--transition);
}
.upload-zone:hover { border-color: var(--primary); background: rgba(79,70,229,0.04); }
.upload-zone input[type="file"] { display: none; }

.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   RESPONSIVE
   ================================================================ */
.sidebar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent; cursor: pointer;
  font-size: 18px; color: var(--text-secondary);
}

.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 999;
}
.overlay.active { display: block; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .sidebar-toggle { display: flex !important; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 22px; }
  .tab-btn { font-size: 12px; padding: 8px 10px; min-width: auto; }
}
