/* ============================================
   SIJARAK - Main Stylesheet
   ============================================ */

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

:root {
  --brand:       #7D6453;
  --brand-dark:  #5C473D;
  --brand-light: #E7D7C8;
  --brand-acc:   #9E7F66;
  --text-primary:   #3B342C;
  --text-secondary: #5E554B;
  --text-muted:     #8E7E71;
  --bg:          #EFE5DB;
  --bg-card:     #F8F1E7;
  --border:      rgba(121, 97, 84, 0.22);
  --border-md:   rgba(121, 97, 84, 0.30);
  --radius:      14px;
  --radius-lg:   20px;
  --shadow-sm:   0 2px 8px rgba(107, 91, 79, 0.11);
  --shadow:      0 10px 28px rgba(107, 91, 79, 0.16);
  --shadow-lg:   0 20px 46px rgba(107, 91, 79, 0.18);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Ubuntu', 'Cantarell', 'Noto Sans', sans-serif;
}

body {
  font-family: var(--font);
  background: radial-gradient(circle at top left, rgba(233, 221, 211, 0.35), transparent 30%),
              radial-gradient(circle at bottom right, rgba(190, 178, 165, 0.25), transparent 25%),
              var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---- NAVBAR ---- */
.navbar {
  background: rgba(249, 244, 238, 0.92);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 12px 32px rgba(107, 91, 79, 0.1);
  border-bottom: 1px solid rgba(121, 97, 84, 0.24);
}
.navbar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 20px; height: 72px; gap: 32px;
}
.navbar-brand {
  font-size: 20px; font-weight: 700;
  color: var(--brand-dark); letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 8px;
}
.navbar-brand span { color: var(--brand-acc); }
.navbar-menu { display: flex; gap: 12px; flex: 1; }
.navbar-menu a {
  color: var(--text-primary); font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 12px;
  transition: all .22s ease-out;
}
.navbar-menu a:hover, .navbar-menu a.active {
  background: rgba(121, 97, 84, 0.18); color: var(--brand-dark);
  text-decoration: none;
}
.navbar-user { display: flex; align-items: center; gap: 10px; }
.navbar-user .user-name { color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.btn-logout {
  background: rgba(126, 109, 96, 0.12);
  color: var(--brand-dark); font-size: 13px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(122, 107, 95, 0.18);
  cursor: pointer; transition: all .22s ease-out;
}
.btn-logout:hover { background: rgba(126, 109, 96, 0.18); text-decoration: none; }

/* ---- CONTAINER ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.container-sm { max-width: 700px; margin: 0 auto; padding: 32px 20px; }

.page-wrapper { min-height: calc(100vh - 120px); }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(180deg, rgba(238, 228, 216, 0.98) 0%, rgba(213, 191, 171, 0.98) 100%);
  color: var(--text-primary); padding: 72px 20px;
  text-align: center; position: relative; overflow: hidden;
  border-radius: 24px; margin: 32px 0;
  box-shadow: 0 22px 64px rgba(107, 91, 79, 0.12);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.35), transparent 24%),
              radial-gradient(circle at bottom left, rgba(167, 148, 126, 0.16), transparent 22%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 38px; font-weight: 700; margin-bottom: 14px; line-height: 1.18; letter-spacing: -0.4px; }
.hero h1 span { color: var(--brand-dark); }
.hero p { font-size: 16px; opacity: 0.95; margin-bottom: 28px; line-height: 1.9; color: var(--text-secondary); }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hero-btns .btn { min-width: 150px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .24s ease-out;
  text-decoration: none; line-height: 1; box-shadow: 0 10px 22px rgba(107, 91, 79, 0.06);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-green { background: var(--brand-acc); color: var(--text-primary); border-color: var(--brand-acc); }
.btn-green:hover { background: rgba(154, 133, 111, 0.95); border-color: rgba(154, 133, 111, 0.95); }
.btn-outline { background: transparent; color: var(--brand-dark); border-color: rgba(122,107,95,0.24); }
.btn-outline:hover { background: rgba(122, 107, 95, 0.12); text-decoration: none; }
.btn-outline-dark { background: transparent; color: var(--text-primary); border-color: var(--border-md); }
.btn-outline-dark:hover { background: rgba(242, 238, 232, 0.75); text-decoration: none; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-danger { background: #A05A53; color: #fff; border-color: #A05A53; }
.btn-danger:hover { background: #8C4E47; }
.btn-warning { background: #B09A87; color: var(--text-primary); border-color: #B09A87; }
.btn-warning:hover { background: #9F8B78; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- STATS ---- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin: 32px 0;
}
.stat-card {
  background: linear-gradient(180deg, rgba(250, 245, 241, 0.96), rgba(242, 238, 232, 0.96));
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 24px 28px; text-align: center;
  border: 1px solid rgba(122, 107, 95, 0.14); box-shadow: var(--shadow-sm); transition: all .24s ease-out;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-num { font-size: 38px; font-weight: 700; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.2px; }
.stat-total .stat-num { color: var(--brand-dark); }
.stat-proses .stat-num { color: #957F6D; }
.stat-selesai .stat-num { color: #6C7A66; }
.stat-menunggu .stat-num { color: #8E7C69; }

/* ---- CARDS ---- */
.card {
  background: rgba(250, 245, 240, 0.98); border-radius: var(--radius-lg);
  border: 1px solid rgba(121, 97, 84, 0.18); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: all .25s ease;
}
.card:hover { box-shadow: 0 16px 44px rgba(107, 91, 79, 0.14); transform: translateY(-1px); }
.card-header {
  padding: 22px 26px; border-bottom: 1px solid rgba(121, 97, 84, 0.18);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: rgba(238, 228, 216, 0.96);
}
.card-header h2 { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; color: var(--brand-dark); }
.card-body { padding: 26px; }

/* ---- REPORT LIST ---- */
.report-list { display: flex; flex-direction: column; gap: 0; }
.report-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  transition: background .22s ease-out; cursor: pointer; text-decoration: none; color: inherit;
}
.report-item:last-child { border-bottom: none; }
.report-item:hover { background: rgba(121, 97, 84, 0.14); text-decoration: none; }
.report-item-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(237, 227, 214, 0.96); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; margin-top: 2px;
}
.report-item-icon.icon-parah { background: #E9D6D1; color: #8B5B5B; }
.report-item-icon.icon-sedang { background: #ECE3D9; color: #6B5B4F; }
.report-item-icon.icon-ringan { background: rgba(242, 238, 232, 0.95); color: var(--brand-dark); }
.report-item-body { flex: 1; min-width: 0; }
.report-item-body h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.report-item-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.report-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.meta-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: rgba(250, 245, 241, 0.9); border: 1px solid rgba(122, 107, 95, 0.14);
  color: var(--text-secondary); display: flex; align-items: center; gap: 4px;
}
.report-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

/* ---- BADGES ---- */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.2px;
}
.badge-menunggu { background: #EDE4D3; color: #6B5B4F; }
.badge-proses    { background: #D4C8BD; color: #5A4B43; }
.badge-selesai   { background: #C9D8D1; color: #4A5A52; }
.badge-ringan    { background: var(--brand-light); color: var(--brand-dark); }
.badge-sedang    { background: #EDE4D3; color: #6B5B4F; }
.badge-parah     { background: #E5CFCF; color: #8B5B5B; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 8px; letter-spacing: 0.3px;
}
.form-group label span { color: #A05A53; }
.form-control {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid rgba(121, 97, 84, 0.26); border-radius: calc(var(--radius) + 2px);
  font-size: 15px; font-family: var(--font); color: var(--text-primary);
  background: rgba(255, 255, 255, 0.96); transition: all .22s ease-out;
  outline: none; box-shadow: inset 0 1px 3px rgba(121, 97, 84, 0.10);
}
.form-control:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(107, 91, 79, 0.14); }
textarea.form-control { resize: vertical; min-height: 130px; font-family: inherit; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B7B6F' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 12px; color: #A05A53; margin-top: 6px; }

/* ---- FILE UPLOAD ---- */
.upload-zone {
  border: 2px dashed rgba(121, 97, 84, 0.30); border-radius: calc(var(--radius) + 4px);
  padding: 30px; text-align: center; cursor: pointer; transition: all .24s ease-out;
  background: rgba(246, 240, 233, 0.96); box-shadow: inset 0 1px 2px rgba(121, 97, 84, 0.08);
}
.upload-zone:hover { border-color: var(--brand-dark); background: rgba(239, 231, 220, 0.98); }
.upload-zone.dragging { border-color: var(--brand-dark); background: rgba(239, 231, 220, 0.98); }
.upload-zone .upload-icon { font-size: 32px; color: var(--brand-dark); margin-bottom: 10px; }
.upload-zone p { font-size: 13px; color: var(--text-secondary); }
.upload-zone strong { color: var(--brand-dark); font-weight: 700; }
#preview-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.preview-img { width: 90px; height: 90px; object-fit: cover; border-radius: 12px; border: 1.5px solid rgba(122, 107, 95, 0.16); }

/* ---- FLASH MESSAGES ---- */
.flash {
  padding: 12px 20px; border-radius: var(--radius);
  margin: 16px 0; font-size: 14px; display: flex; align-items: center; gap: 10px;
}
.flash-success { background: #D4E4D8; color: #3A5A4A; border: 1px solid #B8D4C0; }
.flash-error   { background: #E5CFCF; color: #6B3A3A; border: 1px solid #D9B8B8; }
.flash-info    { background: #D4C8BD; color: #5A4B43; border: 1px solid #C9B8AD; }

/* ---- TABLE (ADMIN) ---- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); border-bottom: 2px solid rgba(122, 107, 95, 0.16);
  background: rgba(242, 238, 232, 0.85); white-space: nowrap;
}
.data-table td {
  padding: 14px 18px; border-bottom: 1px solid rgba(122, 107, 95, 0.12);
  color: var(--text-primary); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(122, 107, 95, 0.08); }
.data-table .td-title { max-width: 240px; }
.data-table .td-title a { font-weight: 500; color: var(--text-primary); }
.data-table .td-title a:hover { color: var(--brand-dark); }
.td-actions { display: flex; gap: 6px; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a, .pagination span {
  padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); transition: all .22s ease-out;
}
.pagination a { color: var(--text-primary); background: var(--bg-card); }
.pagination a:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination span { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---- DETAIL PAGE ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.detail-photos img { width: 100%; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; transition: all .22s ease-out; }
.detail-photos img:hover { transform: scale(1.04); box-shadow: var(--shadow); }
.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; gap: 16px; }
.info-list li:last-child { border-bottom: none; }
.info-list .label { color: var(--text-secondary); flex-shrink: 0; font-weight: 500; }
.info-list .value { font-weight: 600; text-align: right; }
.timeline { padding: 8px 0; }
.timeline-item { display: flex; gap: 14px; margin-bottom: 16px; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0; margin-top: 4px;
  position: relative; box-shadow: 0 0 0 3px rgba(107, 91, 79, 0.1);
}
.timeline-dot::after {
  content: ''; position: absolute; top: 12px; left: 5px;
  width: 2px; height: calc(100% + 10px); background: var(--border);
}
.timeline-item:last-child .timeline-dot::after { display: none; }
.timeline-text { font-size: 13px; line-height: 1.6; }
.timeline-text .t-label { font-weight: 600; }
.timeline-text .t-time { color: var(--text-muted); font-size: 11px; }

/* ---- MEMBER PAGE ---- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin: 24px 0; }
.member-card {
  background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(122, 107, 95, 0.14);
  border-radius: var(--radius-lg); padding: 24px 20px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all .24s ease-out;
}
.member-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: rgba(154, 133, 111, 0.34); }
.member-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; margin: 0 auto 14px;
  background: rgba(222, 213, 203, 0.9); color: var(--brand-dark);
}
.member-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.member-card .nim { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.member-card .role-tag {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: rgba(242, 238, 232, 0.96); color: var(--brand-dark); font-weight: 700;
}

/* ---- LOGIN PAGE ---- */
.auth-wrapper {
  min-height: calc(100vh - 60px); display: flex;
  align-items: center; justify-content: center; padding: 40px 20px;
}
.auth-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: 40px; width: 100%; max-width: 420px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: 1px; }
.auth-logo span { color: var(--brand-acc); }
.auth-logo p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.auth-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-card .subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

/* ---- ADMIN SIDEBAR ---- */
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 240px; background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(122, 107, 95, 0.14); flex-shrink: 0;
  padding: 24px 0; box-shadow: inset -1px 0 0 rgba(122, 107, 95, 0.06);
}
.admin-sidebar .side-section { padding: 4px 14px; margin-bottom: 8px; }
.admin-sidebar .side-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 14px 4px;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); transition: all .24s ease-out;
}
.admin-sidebar a:hover { background: rgba(242, 238, 232, 0.96); color: var(--brand-dark); text-decoration: none; }
.admin-sidebar a.active { background: var(--brand-dark); color: #fff; }
.admin-sidebar a .icon { font-size: 16px; width: 20px; text-align: center; }
.admin-main { flex: 1; padding: 32px; overflow-x: hidden; min-width: 0; }
.admin-main h1 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.admin-main .page-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

/* ---- LIGHTBOX ---- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.88);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-overlay img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }

/* ---- FOOTER ---- */
.footer {
  text-align: center; padding: 26px 20px;
  color: var(--text-secondary); font-size: 14px;
  background: rgba(250, 245, 241, 0.94); border-top: 1px solid rgba(122, 107, 95, 0.12);
  margin-top: 40px; line-height: 1.7;
}
.footer p { margin: 0; }
.footer strong { color: var(--brand-dark); }
.footer a { color: var(--brand-acc); transition: color .22s ease-out; }
.footer a:hover { color: #A08B7E; }

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; margin-bottom: 20px;
}
.filter-bar select, .filter-bar input {
  padding: 8px 12px; border-radius: var(--radius);
  border: 1.5px solid var(--border-md); font-size: 13px; font-weight: 500;
  background: var(--bg-card); color: var(--text-primary);
  outline: none; transition: all .22s ease-out;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107, 91, 79, 0.1); }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 48px; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

/* ---- PAGE HEADER ---- */
.page-header {
  padding: 28px 0 20px; border-bottom: 1px solid rgba(122, 107, 95, 0.14);
  margin-bottom: 28px; display: flex; justify-content: space-between; align-items: center;
}
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--brand-dark); }
.page-header p { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.page-header .page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- NO PHOTO ---- */
.no-photo {
  background: var(--bg); border: 2px dashed var(--border);
  border-radius: 8px; padding: 30px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 10px; display: flex; overflow-x: auto; }
  .admin-sidebar .side-label { display: none; }
  .admin-sidebar a { white-space: nowrap; }
  .admin-main { padding: 16px; }
  .navbar-menu { display: none; }
  .report-item { padding: 14px 16px; }
}
