/* === LAYOUT DESKTOP === */
.app-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: white; padding: 20px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar .logo h2 { color: white; font-size: 18px; margin: 0; }
.sidebar .logo small { color: #80c7ff; font-size: 11px; letter-spacing: 0.08em; }
.sidebar nav { padding: 16px 0; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: #d6e7f7; font-size: 14px; font-weight: 600;
  border-left: 3px solid transparent; transition: all 0.15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar nav a.active { background: rgba(18,131,236,0.15); border-left-color: var(--blue); color: white; }
.sidebar .user-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}
.sidebar .user-info .name { color: white; font-weight: 700; }
.sidebar .user-info .role { color: #80c7ff; font-size: 11px; text-transform: uppercase; }

.main-content { padding: 24px 32px; overflow-y: auto; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* === MOBILE === */
@media (max-width: 850px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    height: auto; padding: 0; z-index: 100;
    display: flex; justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .sidebar .logo, .sidebar .user-info { display: none; }
  .sidebar nav { padding: 0; display: flex; width: 100%; }
  .sidebar nav a {
    flex: 1; flex-direction: column; gap: 4px; padding: 10px 4px;
    font-size: 11px; border-left: 0; border-top: 3px solid transparent;
    text-align: center;
  }
  .sidebar nav a.active { border-top-color: var(--blue); border-left: 0; }
  .main-content { padding: 16px; padding-bottom: 80px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 22px; }
}

/* === LOGIN PAGE === */
.login-page {
  display: grid; grid-template-columns: 1.35fr 0.9fr;
  min-height: 100vh; background: var(--bg);
}
.login-left {
  background: var(--navy); color: white; padding: 0 56px;
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.login-left:after {
  content: ""; position: absolute; right: -260px; top: -70px;
  width: 620px; height: 1200px; background: var(--bg);
  transform: rotate(42deg);
}
.login-left .content { position: relative; z-index: 2; max-width: 600px; }
.login-left .tag {
  display: inline-block; border: 1px solid var(--navy-2);
  background: var(--navy-2); color: #d8ecff;
  padding: 8px 16px; border-radius: 22px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em;
}
.login-left h1 { color: white; font-size: 38px; line-height: 1.1; margin: 20px 0 24px; }
.login-left .sub { color: #d6e7f7; font-size: 16px; line-height: 1.6; }

.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-panel {
  background: white; border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
  padding: 32px; width: 100%; max-width: 440px;
}
.login-panel .mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--lime);
  display: inline-grid; place-items: center; font-weight: 900; color: var(--navy);
  margin-right: 10px;
}

@media (max-width: 850px) {
  .login-page { grid-template-columns: 1fr; }
  .login-left { display: none; }
}

/* === STEPPER === */
.stepper { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; }
.stepper .step {
  flex: 1; min-width: 80px; padding: 10px 12px;
  background: white; border: 1.5px solid var(--border); border-radius: 10px;
  text-align: center; cursor: pointer; font-weight: 700; font-size: 13px;
  color: var(--muted); transition: all 0.15s;
}
.stepper .step.active { background: var(--navy); color: white; border-color: var(--navy); }
.stepper .step.done { background: var(--lime); color: var(--navy); border-color: var(--lime); }

/* === CHECKLIST === */
.cl-section { background: white; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.cl-section-head {
  padding: 14px 16px; background: var(--soft); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; color: var(--navy);
}
.cl-section-body { padding: 0 16px 16px; display: none; }
.cl-section.open .cl-section-body { display: block; }
.cl-item { padding: 12px 0; border-bottom: 1px solid var(--soft); }
.cl-item:last-child { border-bottom: 0; }
.cl-item .desc { font-size: 14px; margin-bottom: 8px; }
.cl-item .opts { display: flex; gap: 6px; }
.cl-item .opt {
  flex: 1; padding: 8px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 12px; font-weight: 700;
}
.cl-item .opt.sel-ok { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.cl-item .opt.sel-ko { background: var(--danger); color: white; border-color: var(--danger); }
.cl-item .opt.sel-na { background: var(--muted); color: white; border-color: var(--muted); }

/* === FOTO === */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-tile {
  aspect-ratio: 1; background: var(--soft);
  border-radius: 10px; overflow: hidden; position: relative;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .meta { position: absolute; bottom: 4px; left: 4px; right: 4px; color: white; font-size: 10px; background: rgba(0,0,0,0.6); padding: 2px 4px; border-radius: 4px; }

/* === SIGNATURE === */
.signature-pad {
  background: white; border: 2px dashed var(--blue); border-radius: 12px;
  width: 100%; height: 200px; touch-action: none;
}
