/* ============================================================
   MEMBUAT_JADWAL.CSS — Jadwal-in
   Clean, responsive, no duplicates
   ============================================================ */

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

body,
input,
button,
select,
textarea {
      font-family: 'Poppins', sans-serif;
}

body {
      background: #f4f7fb;
      color: #1f3042;
      min-height: 100vh;
}

a {
      text-decoration: none;
}

input,
button {
      font-size: 14px;
}

/* ── Navbar ── */
/* sudah diganti dengan navbar.css sebagai css global */

.logout-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: rgba(255, 255, 255, 0.7);
      border-radius: 8px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      transition: background 0.2s, color 0.2s;
}

.logout-btn:hover {
      background: rgba(197, 48, 48, 0.35);
      color: #fff;
      border-color: rgba(197, 48, 48, 0.4);
}

/* ── Page header ── */
.page-header {
      background: white;
      border-bottom: 1px solid #dde3ee;
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
}

.page-header-content h2 {
      font-size: 17px;
      color: #1f3042;
      font-weight: 600;
      margin-bottom: 3px;
      display: flex;
      align-items: center;
      gap: 8px;
}

.page-header-content h2 i {
      color: #3f6ea0;
}

.page-header-content p {
      font-size: 13px;
      color: #6b7a90;
}

.page-header-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-outline {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      background: white;
      color: #1f3042;
      border: 1.5px solid #c5d0e0;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
      background: #1f3042;
      color: white;
      border-color: #1f3042;
}

.btn-primary {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      background: #1f3042;
      color: white;
      border: 1.5px solid #1f3042;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s;
}

.btn-primary:hover {
      background: #2d4a6b;
}

.btn-success {
      background: #276749 !important;
      border-color: #276749 !important;
}

.btn-success:hover {
      background: #2f7d32 !important;
}

/* ── Main layout ── */
main {
      display: flex;
      gap: 16px;
      padding: 20px;
      max-width: 1400px;
      margin: 0 auto;
      align-items: flex-start;
}

.input_section {
      width: 380px;
      flex-shrink: 0;
      background: white;
      border-radius: 16px;
      padding: 20px;
      box-shadow: 0 4px 20px rgba(31, 48, 66, 0.08);
      border: 1px solid #e0e7f0;
      position: sticky;
      top: 72px;
}

.matkul_tersimpan {
      flex: 1;
      background: white;
      border-radius: 16px;
      padding: 20px;
      box-shadow: 0 4px 20px rgba(31, 48, 66, 0.08);
      border: 1px solid #e0e7f0;
      min-width: 0;
}

/* ── Section titles ── */
.input_section h3,
.matkul_tersimpan h3 {
      font-size: 15px;
      color: #1f3042;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding-bottom: 12px;
      border-bottom: 2px solid #e8edf5;
}

/* ── Form ── */
.input {
      margin: 10px 0;
}

.input label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      color: #4a5568;
      margin-bottom: 5px;
}

.input input,
.input select {
      display: block;
      width: 100%;
      padding: 7px 10px;
      border-radius: 8px;
      border: 1.5px solid #d1d9e6;
      font-size: 13px;
      font-family: 'Poppins', sans-serif;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
      background: white;
}

.input input:focus,
.input select:focus {
      border-color: #3f6ea0;
      box-shadow: 0 0 0 3px rgba(63, 110, 160, 0.1);
}

.two-col-inputs {
      display: flex;
      gap: 10px;
}

.two-col-inputs .input {
      flex: 1;
}

.time-inputs {
      display: flex;
      gap: 10px;
}

.time-inputs .input {
      flex: 1;
}

.req {
      color: #e53e3e;
      font-weight: 700;
}

.optional {
      color: #9aabb8;
      font-size: 12px;
      font-weight: 400;
}

/* ── Submit button ── */
.submit-button {
      background-color: #1f3042;
      color: white;
      border: 0;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 10px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      margin-top: 14px;
      transition: background 0.2s, box-shadow 0.2s;
      box-shadow: 0 2px 8px rgba(31, 48, 66, 0.25);
}

.submit-button:hover {
      background: #2d4a6b;
      box-shadow: none;
}

.submit-button:disabled {
      background: darkgray !important;
      cursor: default;
      box-shadow: none;
}

/* ── Form tips ── */
.form-tips {
      margin-top: 14px;
      padding: 12px;
      background: #f0f5fc;
      border-radius: 8px;
      border-left: 3px solid #3f6ea0;
      display: flex;
      flex-direction: column;
      gap: 6px;
}

.tip-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      font-size: 12px;
      color: #4a5568;
}

.tip-item i {
      color: #3f6ea0;
      margin-top: 1px;
      flex-shrink: 0;
}

/* ── Matkul tersimpan header ── */
.header-matkul-tersimpan {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 16px;
      padding-bottom: 14px;
      border-bottom: 2px solid #e8edf5;
      flex-wrap: wrap;
      gap: 8px;
}

.header-matkul-tersimpan h3 {
      margin-bottom: 4px;
      border: none;
      padding: 0;
}

.sks-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: #eef3fb;
      color: #1f3042;
      font-size: 12px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 20px;
      border: 1px solid #c5d0e0;
}

.header-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
}

.btn-danger-outline {
      padding: 5px 12px;
      background: white;
      color: #c53030;
      border: 1.5px solid #fed7d7;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 5px;
      transition: background 0.2s, color 0.2s;
      font-family: 'Poppins', sans-serif;
}

.btn-danger-outline:hover {
      background: #c53030;
      color: white;
      border-color: #c53030;
}

.lihatJadwalButton {
      padding: 5px 12px;
      background: white;
      color: #1f3042;
      border: 2px solid #1f3042;
      border-radius: 10px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 5px;
      transition: background 0.2s, color 0.2s;
      font-family: 'Poppins', sans-serif;
}

.lihatJadwalButton:hover {
      background: #1f3042;
      color: white;
}

/* ── Empty state ── */
.empty-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 50px 20px;
      text-align: center;
      gap: 8px;
}

.empty-state i {
      font-size: 3rem;
      color: #cbd5e0;
      margin-bottom: 8px;
}

.empty-state p {
      font-size: 14px;
      font-weight: 500;
      color: #718096;
}

.empty-state span {
      font-size: 12px;
      color: #a0aec0;
}

/* ── Item card ── */
.item {
      display: flex;
      align-items: center;
      border-radius: 12px;
      padding: 14px 16px;
      background: white;
      margin-top: 10px;
      border: 1px solid #e8edf5;
      transition: box-shadow 0.2s, border-color 0.2s;
}

.item:hover {
      box-shadow: 0 4px 16px rgba(31, 48, 66, 0.1);
      border-color: #c5d0e0;
}

.item>.inner {
      flex: 1;
      min-width: 0;
}

.item>.inner h2 {
      font-size: 14px;
      color: #1f3042;
      margin-bottom: 4px;
      font-weight: 600;
}

.item>.inner p {
      font-size: 12px;
      color: #6b7a90;
      line-height: 1.5;
}

.shadow {
      box-shadow: 0 2px 8px rgba(31, 48, 66, 0.06);
}

.bentrok {
      border-color: #feb2b2 !important;
      background: #fff5f5 !important;
}

.bentrok-message {
      font-size: 11px;
      color: #c53030;
      display: flex;
      align-items: center;
      gap: 4px;
      margin-top: 4px;
}

/* Action buttons on item */
.action {
      display: flex;
      flex-direction: column;
      gap: 5px;
      flex-shrink: 0;
      margin-left: 12px;
}

.trash-button,
.edit-button {
      padding: 4px 12px;
      border-radius: 8px;
      background: white;
      color: #1f3042;
      border: 1.5px solid #1f3042;
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 5px;
      font-family: 'Poppins', sans-serif;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.trash-button:hover {
      background: rgba(255, 0, 0, 0.9);
      border-color: rgba(255, 0, 0, 0.8);
      color: white;
}

.edit-button:hover {
      background: #45a049;
      border-color: #45a049;
      color: white;
}

/* ── Save section ── */
.save-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid #e8edf5;
}

.conflict-alert {
      display: flex;
      align-items: center;
      gap: 8px;
      background: #fff5f5;
      border: 1px solid #fed7d7;
      color: #c53030;
      font-size: 13px;
      padding: 10px 14px;
      border-radius: 8px;
      margin-bottom: 12px;
}

/* ── Alert toast ── */
.alertMessage {
      display: none;
      position: fixed;
      top: 70px;
      right: 20px;
      background-color: #276749;
      color: white;
      padding: 12px 18px;
      border-radius: 10px;
      z-index: 9999;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
      font-size: 13px;
      font-weight: 500;
      align-items: center;
      gap: 8px;
      max-width: 320px;
}

.alertMessage.error {
      background-color: #c53030;
}

/* ── Confirm dialog ── */
.confirm-dialog {
      display: none;
      position: fixed;
      z-index: 10000;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      justify-content: center;
      align-items: center;
}

.confirm-dialog-content {
      background: white;
      padding: 28px 24px;
      border-radius: 16px;
      max-width: 340px;
      width: 90%;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.confirm-icon {
      font-size: 2rem;
      color: #c53030;
      margin-bottom: 10px;
}

#confirmText {
      font-size: 14px;
      color: #1f3042;
      font-weight: 500;
}

.confirm-buttons {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-top: 18px;
}

.confirm-button {
      padding: 8px 20px;
      border: 2px solid #1f3042;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      background: white;
      color: #1f3042;
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'Poppins', sans-serif;
      transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#confirmYes:hover {
      background: #276749;
      border-color: #276749;
      color: white;
}

.btn-cancel:hover {
      background: #c53030 !important;
      border-color: #c53030 !important;
      color: white !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
      main {
            flex-direction: column;
      }

      .input_section {
            width: 100%;
            position: static;
      }
}

@media (max-width: 768px) {
      main {
            padding: 12px;
            gap: 12px;
      }

      .page-header {
            flex-direction: column;
            align-items: flex-start;
      }

      .two-col-inputs {
            flex-direction: column;
            gap: 0;
      }

      .time-inputs {
            gap: 8px;
      }
}

@media (max-width: 480px) {
      main {
            padding: 10px;
      }

      .item {
            flex-direction: column;
            align-items: flex-start;
      }

      .action {
            flex-direction: row;
            margin-left: 0;
            margin-top: 10px;
      }
}