/* Reset dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

.status-label {
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.status-malicious {
  background: #dc3545; /* merah */
  color: white;
}

.status-warning {
  background: #ffc107; /* kuning */
  color: black;
}

.status-info {
  background: #0dcaf0; /* biru muda */
  color: black;
}

.status-clean {
  background: #28a745; /* hijau */
  color: white;
}


body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  background: var(--gradient-bg);
  color: var(--text-color);
}

/* ===================== */
/* VARIABEL WARNA GLOBAL */
/* ===================== */
:root {
  --bg-color: #f5f7fa;
  --text-color: #1e1e1e;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --container-bg: rgba(255, 255, 255, 0.6);
  --input-bg: #ffffff;
  --input-text: #1e1e1e;
  --input-placeholder: #777;
  --table-bg: #ffffff;
  --table-border: #dddddd;
  --button-bg: #007bff;
  --button-text: #ffffff;

  --gradient-bg: linear-gradient(135deg, #dbeafe, #f5f7fa);
}

body.dark {
  --bg-color: #0a0a23;
  --text-color: #e0e0e0;
  --header-bg: #1e1e1e;
  --card-bg: #001a3d;
  --container-bg: rgba(0, 26, 61, 0.6);
  --input-bg: #0f1b3d;
  --input-text: #d9e1ff;
  --input-placeholder: #a0b3ff;
  --table-bg: #1e1e1e;
  --table-border: #333333;
  --button-bg: #264de4;
  --button-text: #ffffff;

  --gradient-bg: linear-gradient(135deg, #0a0a23, #001f3f);
}

/* ========== */
/*   HEADER   */
/* ========== */
header {
  position: sticky;     /* header selalu nempel */
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: var(--header-bg);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: background-color 0.3s ease;
}

/* Responsive header tetap full */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    border-radius: 0; /* header rata dengan layar di mobile */
    padding: 1rem;
  }
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.theme-toggle:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* ========== */
/* CONTAINER  */
/* ========== */
.container {
  flex-grow: 1;
  padding: 2rem;
  background-color: var(--container-bg);
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
}

/* ========== */
/*   FORM     */
/* ========== */
form {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  margin: 0 auto;
}

form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
  color: #79aaff;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="file"] {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background-color: var(--input-bg);
  color: var(--input-text);
  transition: border 0.3s ease, background-color 0.3s ease;
}

input:focus {
  outline: none;
  border: 1px solid #79aaff;
  box-shadow: 0 0 5px rgba(121,170,255,0.7);
}

input::placeholder {
  color: var(--input-placeholder);
}

/* Tombol */
button, input[type="submit"], .btn {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: inline-block;
}
button:hover, input[type="submit"]:hover, .btn:hover {
  background-color: #0056b3;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* ========== */
/*  TABLE     */
/* ========== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--table-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.dashboard-table th,
.dashboard-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

.dashboard-table thead {
  background-color: #003366;
  color: #fff;
}

.dashboard-table tbody tr {
  border-bottom: 1px solid var(--table-border);
}
.dashboard-table tbody tr:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Kolom hasil wrap */
.dashboard-table pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--text-color);
}

/* ================= */
/* RESPONSIVE LAYOUT */
/* ================= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    border-radius: 0; /* header rata dengan container */
    width: 100%;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem;
  }

  form {
    padding: 1.5rem;
  }

  form h2 {
    font-size: 1.5rem;
  }

  /* Table jadi card-style */
  .dashboard-table thead {
    display: none;
  }
  .dashboard-table,
  .dashboard-table tbody,
  .dashboard-table tr,
  .dashboard-table td {
    display: block;
    width: 100%;
  }
  .dashboard-table tr {
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0.75rem;
  }
  .dashboard-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--table-border);
  }
  .dashboard-table td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-color);
  }
  .dashboard-table td:last-child {
    border-bottom: none;
  }

  .dashboard-table td pre {
    max-height: 120px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
  }
}
