/* =========================================================
   SIPRO TELKOM AKSES — Design System
   ========================================================= */

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

:root {
  /* Brand */
  --brand: #E4002B;
  --brand-dark: #A80D1C;
  --brand-light: #FFE7EA;
  --navy: #0B1F3A;
  --navy-soft: #13294F;
  --cyan: #00AEEF;

  /* Neutrals */
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --border: #E7EAF0;
  --text: #1C2434;
  --text-muted: #6B7686;

  /* Status */
  --s-secondary: #8A93A6;
  --s-info: #0FA3D1;
  --s-primary: #2E5CE6;
  --s-warning: #F2A20C;
  --s-danger: #E4002B;
  --s-purple: #7B4EE0;
  --s-orange: #F2660C;
  --s-success: #15A362;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--navy); }

a { text-decoration: none; }

::selection { background: var(--brand); color: #fff; }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, .form-control:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* =========================
   NAVBAR
   ========================= */
.app-navbar {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-soft) 55%, var(--brand-dark) 130%);
  box-shadow: var(--shadow-sm);
  padding: .6rem 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.brand-mark img { width: 34px; height: 34px; display: block; }
.brand-text { line-height: 1.05; }
.brand-text .brand-name { font-weight: 800; font-size: 1.02rem; color: #fff; letter-spacing: -.01em; }
.brand-text .brand-tag { font-size: .66rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

.app-navbar .nav-link { font-weight: 500; }
.app-navbar .dropdown-toggle::after { vertical-align: .1em; }

.navbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem; color: #fff;
  margin-right: .5rem;
}

.role-pill {
  font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  padding: .28em .6em; border-radius: 20px;
  background: rgba(255,255,255,.16); color: #fff;
}

/* =========================
   SIDEBAR
   ========================= */
.app-sidebar {
  width: 264px;
  min-height: calc(100vh - 62px);
  background: var(--navy);
  background-image: url('../img/fiber-pattern.svg');
  background-size: 420px;
  background-repeat: no-repeat;
  background-position: bottom -60px right -80px;
  position: sticky;
  top: 62px;
  align-self: flex-start;
}

.sidebar-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.35);
  padding: 1rem .75rem .4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,.72);
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: .89rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar-link i { font-size: 1.02rem; width: 20px; text-align: center; opacity: .85; }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(228,0,43,.35);
}
.sidebar-link.active i { opacity: 1; }

.app-sidebar hr { border-color: rgba(255,255,255,.1); margin: .6rem .3rem; }

.app-sidebar-offcanvas {
  width: 270px;
  background: var(--navy);
  background-image: url('../img/fiber-pattern.svg');
  background-size: 420px;
  background-repeat: no-repeat;
  background-position: bottom -60px right -80px;
  color: #fff;
}
.app-sidebar-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 1rem 1.1rem;
}
.app-sidebar-offcanvas .brand-mark { gap: .6rem; }
.navbar-toggler:focus { box-shadow: none; }

/* =========================
   LAYOUT / CONTENT
   ========================= */
.app-content { min-height: calc(100vh - 62px); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-head h4 { margin-bottom: .15rem; }
.page-head small { color: var(--text-muted); }

/* =========================
   CARDS
   ========================= */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.card-header {
  border-radius: var(--radius) var(--radius) 0 0 !important;
  background: #fff;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.15rem;
}

/* Stat / summary cards on dashboard */
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }

/* =========================
   BUTTONS
   ========================= */
.btn { font-weight: 600; border-radius: var(--radius-sm); font-size: .9rem; }
.btn-danger {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
}
.btn-danger:hover { background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark)); }
.btn-outline-danger { border-color: var(--brand); color: var(--brand); }
.btn-outline-danger:hover { background: var(--brand); border-color: var(--brand); }

/* =========================
   TABLES
   ========================= */
.table thead.table-light th {
  background: #F7F8FB;
  color: var(--text-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.table td, .table th { vertical-align: middle; padding: .85rem .9rem; }
.table-hover tbody tr:hover { background: #FBF7F8; }

/* =========================
   BADGES / STATUS
   ========================= */
.badge-status { font-size: .74rem; padding: .48em .8em; border-radius: 30px; font-weight: 600; }
.bg-purple { background-color: var(--s-purple) !important; color:#fff; }
.bg-orange { background-color: var(--s-orange) !important; color:#fff; }

/* =========================
   TIMELINE
   ========================= */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-item::before {
  content: ''; position: absolute; left: -25px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand);
}

/* =========================
   STEPPER (alur status project — semua tahap terlihat)
   ========================= */
.stepper { position: relative; padding-left: 34px; }
.stepper::before {
  content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border);
}
.stepper-item { position: relative; padding-bottom: 24px; }
.stepper-item:last-child { padding-bottom: 0; }
.stepper-dot {
  position: absolute; left: -34px; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700;
  background: #fff; border: 2px solid var(--border); color: var(--text-muted);
  z-index: 1;
}
.stepper-label { font-size: .87rem; font-weight: 600; color: var(--text-muted); line-height: 24px; }

.stepper-item.is-done .stepper-dot { background: var(--s-success); border-color: var(--s-success); color: #fff; }
.stepper-item.is-done::after {
  content: ''; position: absolute; left: -23px; top: 24px; width: 2px; height: calc(100% - 24px);
  background: var(--s-success);
}
.stepper-item.is-done .stepper-label { color: var(--text); }

.stepper-item.is-current .stepper-dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-light);
}
.stepper-item.is-current .stepper-label { color: var(--brand); font-weight: 700; }

.stepper-item.is-blocked .stepper-dot { background: var(--brand-light); border-color: var(--s-danger); color: var(--s-danger); }
.stepper-item.is-blocked .stepper-label { color: var(--s-danger); font-weight: 700; }

.evidence-thumb {
  width: 100%; height: 130px; object-fit: cover; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border);
  transition: transform .15s ease, box-shadow .15s ease;
}
.evidence-thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }

/* =========================
   LOGIN PAGE
   ========================= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}
.login-brand-panel {
  flex: 1 1 46%;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 55%, var(--brand-dark) 140%);
  background-image: url('../img/fiber-pattern.svg'), linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 55%, var(--brand-dark) 140%);
  background-size: 480px, cover;
  background-position: bottom -80px right -100px, center;
  background-repeat: no-repeat, no-repeat;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
}
.login-brand-panel .brand-mark img { width: 42px; height: 42px; }
.login-brand-panel .brand-text .brand-name { font-size: 1.2rem; }
.login-brand-panel .brand-headline {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 420px;
  letter-spacing: -.01em;
}
.login-brand-panel .brand-sub { color: rgba(255,255,255,.65); font-size: .92rem; max-width: 380px; }
.login-brand-panel .brand-footnote { color: rgba(255,255,255,.4); font-size: .78rem; }

.login-form-panel {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-card {
  max-width: 400px;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.login-card .form-label { font-weight: 600; font-size: .84rem; color: var(--navy); }
.login-card .form-control { border-radius: 10px; padding: .6rem .85rem; border-color: var(--border); }
.login-card .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(228,0,43,.12); }

@media (max-width: 900px) {
  .login-brand-panel { display: none; }
}

/* =========================
   MISC
   ========================= */
.app-footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: .78rem;
  padding: 1.5rem 0 .5rem;
}

@media print {
  .no-print { display: none !important; }
  .app-sidebar, .app-navbar { display: none !important; }
  .app-content { width: 100% !important; }
}
