* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
}

/* Halaman Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.login-header .header-icon {
  font-size: 56px;
  margin-bottom: 10px;
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.login-header p {
  font-size: 13px;
  opacity: 0.9;
}

.login-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
}

.login-tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #718096;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-tab-btn.active {
  color: #2c5291;
  border-bottom: 2px solid #2c5291;
  margin-bottom: -2px;
}

.login-form {
  padding: 30px;
}

.forgot-password {
  text-align: right;
  margin: -10px 0 20px 0;
}

.forgot-password a {
  color: #2c5291;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 82, 145, 0.4);
}

.user-greeting {
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.btn-reset {
  background: linear-gradient(135deg, #38b2ac 0%, #28c76f 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.main-header {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  padding: 25px 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon {
  font-size: 48px;
}

.header-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
}

.header-text p {
  font-size: 14px;
  opacity: 0.9;
}

/* Header untuk Mobile */
@media (max-width: 768px) {
  .main-header {
    padding: 12px 15px;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .header-left {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .header-icon {
    font-size: 32px;
  }

  .header-text h1 {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .header-text p {
    font-size: 11px;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-end;
  }

  .user-greeting {
    font-size: 12px;
  }

  .logout-btn {
    padding: 8px 15px;
    font-size: 12px;
  }

  .sidebar {
    display: none !important;
  }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.logout-btn {
  background-color: #553c9a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.logout-btn:hover {
  background-color: #44317a;
}

.main-content {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

.sidebar {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 25px;
  height: fit-content;
}

.sidebar-section h3 {
  color: #1a365d;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #e2e8f0;
}

.announcement:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.announcement h4 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 15px;
}

.announcement p {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 8px;
}

.announcement .date {
  font-size: 12px;
  color: #718096;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  color: white;
  margin-top: 10px;
}

.stat-card h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.stat-card p {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}

.content-area {
  background: transparent;
}

.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}

.tab-btn {
  background-color: #e0e0e0;
  color: #333;
  border: none;
  padding: 14px 30px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
}

.tab-btn.active {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.action-bar {
  background: white;
  padding: 20px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.action-bar-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 300px;
  width: 100%;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 15px;
  color: #718096;
  font-size: 14px;
}

.search-container input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.search-container input:focus {
  outline: none;
  border-color: #2c5291;
}

.btn-add {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}

.btn-add:hover {
  transform: translateY(-2px);
}

.btn-refresh {
  background: linear-gradient(135deg, #38b2ac 0%, #28c76f 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(40, 199, 111, 0.3);
}

.btn-refresh:hover {
  transform: translateY(-2px);
}

.form-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.form-section h2 {
  color: #1a365d;
  margin-bottom: 25px;
}

.form-section-title {
  font-weight: 700;
  color: #2c5291;
  margin: 20px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  font-size: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d3748;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c5291;
}

.form-group input[readonly] {
  background-color: #e9ecef;
  cursor: not-allowed;
  color: #495057;
}

.form-buttons {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  justify-content: flex-end;
}

#submitBtn {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

#cancelBtn {
  background-color: #e2e8f0;
  color: #4a5568;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  color: white;
}

th,
td {
  padding: 15px;
  text-align: left;
}

th {
  font-weight: 600;
}

tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

tbody tr:hover {
  background-color: #f7fafc;
}

.action-btns {
  display: flex;
  gap: 8px;
  flex-direction: row;
  flex-wrap: wrap;
}

.btn-view {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.btn-edit {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.btn-delete {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.status-check-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-check-section h2 {
  color: #1a365d;
  margin-bottom: 25px;
}

.status-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.status-form .form-group {
  display: flex;
  flex-direction: column;
}

.btn-check {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
}

.status-badge {
  background: linear-gradient(90deg, #7dd3fc 0%, #d8b4fe 50%, #fda4af 100%);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 5px solid #38bdf8;
}

.status-badge h3 {
  color: #1e3a5f;
  font-size: 18px;
  margin: 0;
}

.status-table-section {
  margin-top: 25px;
}

#statusResult {
  margin-top: 0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.close-modal:hover {
  opacity: 0.8;
}

.modal-body {
  padding: 30px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.detail-item {
  background: #f7fafc;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #2c5291;
}

.detail-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 13px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: #4a5568;
  font-size: 15px;
}

/* Mobile Sidebar Toggle Button */
.sidebar-toggle {
  display: none;
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 20px;
  width: 100%;
}

/* Announcement Edit Button */
.btn-edit-announcement {
  background: linear-gradient(135deg, #2c5291 0%, #1a365d 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-edit-announcement:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Announcement Form */
#announcementForm .form-group {
  margin-bottom: 15px;
}

#announcementForm label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  font-size: 13px;
  margin-bottom: 5px;
}

#announcementForm input,
#announcementForm textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s;
}

#announcementForm input:focus,
#announcementForm textarea:focus {
  outline: none;
  border-color: #2c5291;
}

#announcementForm textarea {
  min-height: 80px;
  resize: vertical;
}

/* Responsive Styles - MOBILE FIRST */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .sidebar {
    display: none !important;
  }

  .sidebar.show-mobile {
    display: block !important;
    margin-bottom: 20px;
  }

  .sidebar-toggle {
    display: block;
    font-size: 14px;
    padding: 12px 20px;
  }
}

@media (max-width: 768px) {
  /* Header */
  .main-header {
    padding: 12px 15px;
  }

  .header-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .header-left {
    flex-direction: column;
    gap: 6px;
  }

  .header-icon {
    font-size: 36px;
  }

  .header-text h1 {
    font-size: 17px;
  }

  .header-text p {
    font-size: 10px;
  }

  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .user-greeting {
    font-size: 12px;
    padding: 6px 10px;
  }

  .logout-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Tabs */
  .tabs {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .tab-btn {
    border-radius: 20px;
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Action Bar */
  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .action-bar-left {
    flex-direction: column;
    gap: 8px;
  }

  .btn-add,
  .btn-refresh {
    width: 100%;
    justify-content: center;
    padding: 10px 15px;
    font-size: 13px;
  }

  .search-container {
    min-width: 100%;
    max-width: 100%;
  }

  .search-input {
    font-size: 14px;
  }

  /* Table - Mobile Card View */
  .table-container {
    font-size: 13px;
    overflow-x: visible;
  }

  table {
    min-width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    white-space: normal;
  }

  tbody td:last-child {
    border-bottom: none;
  }

  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #374151;
    font-size: 12px;
  }

  .action-btns {
    gap: 6px;
    flex-direction: row;
    width: 100%;
    margin-top: 8px;
  }

  .btn-view,
  .btn-edit,
  .btn-delete {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
  }

  /* Forms & Status */
  .form-section,
  .status-check-section {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .status-form {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-buttons {
    flex-direction: column;
    gap: 10px;
  }

  #submitBtn,
  #cancelBtn,
  .btn-check {
    width: 100%;
    padding: 12px 20px;
  }

  /* Modal */
  .modal-content {
    margin: 12px;
    border-radius: 12px;
    max-height: 88vh;
  }

  .modal-body {
    padding: 16px;
  }

  /* Sidebar */
  .sidebar {
    padding: 18px 15px;
  }

  .announcement {
    padding: 14px;
  }

  .stat-card h2 {
    font-size: 30px;
  }

  /* Announcement Edit Button */
  .btn-edit-announcement {
    padding: 9px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Login Page */
  .login-page {
    padding: 15px;
  }

  .login-header {
    padding: 25px 15px;
  }

  .login-header h1 {
    font-size: 18px;
  }

  .login-header .header-icon {
    font-size: 48px;
  }

  .login-form {
    padding: 20px 15px;
  }

  .login-tab-btn {
    padding: 12px 10px;
    font-size: 13px;
  }

  /* Inputs */
  input[type="text"],
  input[type="password"],
  select,
  textarea {
    font-size: 15px;
  }
}
