/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Mode Gelap (default) */
:root {
  --bg-main: #000033;
  --bg-card: #000033;
  --bg-sidebar: #000033;
  --bg-button: #000080;
  --bg-button-hover: #000080;
  --text-main: #ccc;
  --text-light: #eee;
  --text-muted: #aaa;
  --text-dark: #333;
  --shadow-inset-light: rgba(255,255,255,0.05);
  --shadow-inset-dark: rgba(0,0,0,0.4);
  --shadow-outside: rgba(0,0,0,0.6);
  --overlay-bg: rgba(0,0,0,0.3);
}

/* Mode Terang */
body.light-mode {
  --bg-main: #f0f2f5;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-button: #A5A5AC;
  --bg-button-hover: #A5A5AC;
  --text-main: #333;
  --text-light: #222;
  --text-muted: #666;
  --text-dark: #000;
  --shadow-inset-light: rgba(255,255,255,0.6);
  --shadow-inset-dark: rgba(0,0,0,0.05);
  --shadow-outside: rgba(0,0,0,0.1);
  --overlay-bg: rgba(0,0,0,0.2);
}

/* Body */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
}

/* Login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
.login-box {
  background-color: var(--bg-card);
  padding: 30px;
  border-radius: 20px;
  box-shadow:
  -4px -4px 10px var(--shadow-inset-light),
  4px 4px 10px var(--shadow-outside);
  width: 100%;
  max-width: 400px;
}
.login-box h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--text-light);
}
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background-color: var(--bg-button);
  color: var(--text-main);
  box-shadow:
  inset -2px -2px 5px var(--shadow-inset-light),
  inset 2px 2px 5px var(--shadow-inset-dark);
}

/* Button */
button {
  margin: 2px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background-color: var(--bg-button);
  color: var(--text-light);
  cursor: pointer;
  box-shadow:
  -2px -2px 5px var(--shadow-inset-light),
  2px 2px 5px var(--shadow-inset-dark);
  transition: background 0.3s ease;
}
button:hover {
  background-color: var(--bg-button-hover);
}

/* Layout */
.container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  margin-top: 5px;
  margin-bottom: 5px;
  width: 240px;
  background-color: var(--bg-sidebar);
  padding: 20px;
  box-shadow:
  inset -2px -2px 5px var(--shadow-inset-light),
  inset 2px 2px 5px var(--shadow-inset-dark),
  0 4px 12px var(--shadow-outside);
  border-radius: 0 20px 20px 0;
  transition: transform 0.3s ease;
  z-index: 1000;
}
.sidebar-header {
  position: relative;
  margin-bottom: 30px;
}
a{
  text-decoration: none;
  color: var(--text-main);
}
.sidebar nav a {
  display: block;
  margin-bottom: 15px;
  text-decoration: none;
  color: var(--text-main);
  padding: 10px 15px;
  border-radius: 12px;
  box-shadow:
  inset -1px -1px 3px var(--shadow-inset-light),
  inset 1px 1px 3px var(--shadow-inset-dark);
  transition: all 0.3s ease;
}
.sidebar nav a:hover {
  background-color: var(--bg-button);
  color: var(--text-light);
}
.sidebar nav a.active {
  background-color: var(--bg-button);
  color: var(--text-light);
  font-weight: bold;
  box-shadow:
  inset -1px -1px 3px var(--shadow-inset-light),
  inset 1px 1px 3px var(--shadow-inset-dark),
  0 0 8px var(--shadow-outside);
}

/* Header & Content */
.close-btn {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 15px;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}
.main-content {
  flex: 1;
  padding: 30px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
header h1 {
  font-size: 20px;
}
.toggle-btn {
  font-size: 15px;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: none;
}

section{
  margin-bottom: 20px;
}

/* Grid Row */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

/* Grid Column Desktop */
[class^="col-"] {
  padding: 10px;
  flex: 0 0 auto;
}

.col-1  { width: 8.3333%; }
.col-2  { width: 16.6667%; }
.col-3  { width: 25%; }
.col-4  { width: 33.3333%; }
.col-5  { width: 41.6667%; }
.col-6  { width: 50%; }
.col-7  { width: 58.3333%; }
.col-8  { width: 66.6667%; }
.col-9  { width: 75%; }
.col-10 { width: 83.3333%; }
.col-11 { width: 91.6667%; }
.col-12 { width: 100%; }

/* Grid Column Mobile */
@media (max-width: 768px) {
  .col-m-1  { width: 8.3333%; }
  .col-m-2  { width: 16.6667%; }
  .col-m-3  { width: 25%; }
  .col-m-4  { width: 33.3333%; }
  .col-m-5  { width: 41.6667%; }
  .col-m-6  { width: 50%; }
  .col-m-7  { width: 58.3333%; }
  .col-m-8  { width: 66.6667%; }
  .col-m-9  { width: 75%; }
  .col-m-10 { width: 83.3333%; }
  .col-m-11 { width: 91.6667%; }
  .col-m-12 { width: 100%; }
}


/* Card */
.card {
  background-color: var(--bg-card);
  padding: 25px;
  border-radius: 20px;
  box-shadow:
  -4px -4px 10px var(--shadow-inset-light),
  4px 4px 10px var(--shadow-outside);
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
}
.card h1,h2,h3,h4,h5 {
  color: var(--text-light);
  margin-bottom: 10px;
}
.card p {
  color: var(--text-muted);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  display: none;
  z-index: 999;
}
.sidebar.active ~ .overlay {
  display: block;
}

/* Responsif */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .toggle-btn {
    display: block;
  }
  .close-btn {
    display: block;
  }
}

/*breadcrumb*/
.breadcrumb-wrapper {
  position: relative;
  margin: 15px 0;
}

.breadcrumb-toggle {
  display: none;
  background-color: var(--bg-button);
  color: var(--text-light);
  border: none;
  margin-right: 2px;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  box-shadow:
  -2px -2px 5px var(--shadow-inset-light),
  2px 2px 5px var(--shadow-inset-dark);
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 10px 15px;
  background-color: var(--bg-card);
  border-radius: 12px;
  box-shadow:
  inset -2px -2px 5px var(--shadow-inset-light),
  inset 2px 2px 5px var(--shadow-inset-dark);
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.breadcrumb.collapsed {
  max-height: 40px;
}

.breadcrumb li {
  font-size: 14px;
  color: var(--text-muted);
  margin-right: 10px;
  position: relative;
}

.breadcrumb li::after {
  content: '>';
  margin-left: 10px;
  color: var(--text-muted);
}

.breadcrumb li:last-child::after {
  content: '';
}

.breadcrumb li a {
  color: var(--text-main);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.breadcrumb li a:hover {
  background-color: var(--bg-button);
  color: var(--text-light);
}

.breadcrumb li.active {
  font-weight: bold;
  color: var(--text-light);
}

/* Mobile */
@media (max-width: 600px) {
  .breadcrumb-toggle {
    display: inline-block;
  }
  .breadcrumb.collapsed li:not(:last-child) {
    display: none;
  }
}

/* Landing Page */
body.landing-page {
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.landing-container {
  text-align: center;
  padding: 40px;
}

.landing-box {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow:
  -4px -4px 10px var(--shadow-inset-light),
  4px 4px 10px var(--shadow-outside);
  max-width: 100%;
  margin: auto;
}

.landing-box h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.landing-box p {
  font-size: 16px;
  margin-bottom: 30px;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--bg-button);
  color: var(--text-light);
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  box-shadow:
  -2px -2px 5px var(--shadow-inset-light),
  2px 2px 5px var(--shadow-inset-dark);
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--bg-button-hover);
}

/***************************/
.bg-red    { background-color: #FF0000 !important; }
.bg-yellow { background-color: #FBFF00 !important; }
.bg-green  { background-color: #1EFF00 !important; }
.bg-blue   { background-color: #0033FF !important; }
.bg-gray   { background-color: #B8B8B8 !important; }

.op-2  { opacity: 1 !important; }
.op-4  { opacity: 0.4 !important; }
.op-6  { opacity: 0.6 !important; }
.op-8  { opacity: 0.8 !important; }
.op-10 { opacity: 0.10 !important; }
.op-12 { opacity: 0.12 !important; }


/***************************/

.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

thead {
  background-color: var(--bg-main);
  color: #fff;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--text-light);
}

tr:hover {
  background-color: rgba(78, 154, 241, 0.1);
}

@media (max-width: 768px) {
  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  table {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--text-light);
    border-radius: 6px;
    padding: 0.5rem;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border: none;
    border-bottom: 1px solid var(--text-light);
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    color: var(--bg-main);
  }
}
