/* =========================================
   DIGILAPOR STYLE.CSS - Professional & Formal
   Font: Poppins
   ========================================= */

/* ==== RESET & BASE ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  color: #2c3e50;
  background-color: #f8f9fa;
  height: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================
   SIDEBAR - Professional
   ========================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

/* Custom Scrollbar untuk Sidebar */
.sidebar nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 10px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.sidebar .logo i {
  font-size: 1.4rem;
  color: #3498db;
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1rem;
}

.sidebar nav ul {
  padding: 0;
}

.sidebar nav li {
  margin-bottom: 0.3rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #555;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.sidebar nav a:hover {
  background: #f0f0f0;
  color: #2c3e50;
}

.sidebar nav a .bi {
  font-size: 1.2rem;
  color: #7f8c8d;
  transition: color 0.2s ease;
}

.sidebar nav a:hover .bi {
  color: #3498db;
}

.sidebar nav a.active {
  background: #e8f4f8;
  color: #2c3e50;
  font-weight: 600;
  border-left: 3px solid #3498db;
  padding-left: calc(1rem - 3px);
}

.sidebar nav a.active .bi {
  color: #3498db;
}

/* ---- Dropdown ---- */
.sidebar .has-dropdown {
  position: relative;
}

.sidebar .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #555;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
}

.sidebar .dropdown-toggle:hover {
  background: #fff4b8;
  transform: translateX(3px);
}

.sidebar .dropdown-menu {
  list-style: none;
  padding-left: 1.8rem;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease-in-out;
}

.sidebar .has-dropdown.open .dropdown-menu {
  max-height: 200px;
}

.sidebar .dropdown-menu li a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: #555;
  transition: all 0.2s ease;
}

.sidebar .dropdown-menu li a:hover {
  color: #3498db;
}

.sidebar .arrow {
  font-size: 0.9rem;
  color: #7f8c8d;
  transition: transform 0.3s ease;
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.content-area,
.content,
.main-content {
  margin-left: 240px;
  padding: 2rem;
  background: #f8f9fa;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* =========================================
   CARD (GLOBAL) - Professional
   ========================================= */
.card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-top: 25px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* ==== CARD HEADER ==== */
.card-header {
  font-weight: 600;
  font-size: 1.3em;
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

/* ==== DROPDOWN MENU ==== */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-button {
  background-color: #3498db;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background-color 0.25s ease, transform 0.15s ease;
}

.dropdown-button:hover {
  background-color: #1565c0;
  transform: translateY(-1px);
}

.dropdown-list {
  display: none;
  position: absolute;
  background-color: #fffef7;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  margin-top: 8px;
  min-width: 230px;
  z-index: 100;
  overflow: hidden;
  animation: fadeDown 0.25s ease;
}

.dropdown-list.show {
  display: block;
}

.dropdown-list a {
  display: block;
  padding: 10px 14px;
  color: #333;
  border-bottom: 1px solid #f2e9a6;
  transition: background-color 0.2s ease;
}

.dropdown-list a:last-child {
  border-bottom: none;
}

.dropdown-list a:hover {
  background-color: #f0f0f0;
  color: #2c3e50;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   BUTTONS - Professional Unified Style
   ========================================= */
.btn-custom,
.btn-blue,
.btn-grey,
.btn-kembali,
button[type="submit"],
.btn-action {
  background-color: #3498db;
  border: none;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
}

.btn-custom:hover,
.btn-blue:hover,
.btn-grey:hover,
.btn-kembali:hover,
button[type="submit"]:hover,
.btn-action:hover {
  background-color: #2980b9;
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-custom:active,
.btn-blue:active,
.btn-grey:active,
.btn-kembali:active,
button[type="submit"]:active,
.btn-action:active {
  transform: translateY(1px);
}

/* Alternative button colors */
.btn-danger {
  background-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-success {
  background-color: #27ae60;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-warning {
  background-color: #f39c12;
}

.btn-warning:hover {
  background-color: #d68910;
}

.btn-green {
  background-color: #27ae60;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-green:hover {
  background-color: #229954;
}

.btn-grey {
  background-color: #1976d2;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-grey:hover {
  background-color: #1565c0;
}

/* =========================================
   ALERT / SUCCESS MESSAGE
   ========================================= */
.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #4caf50;
}

.alert-danger {
  background: #ffebee;
  color: #c62828;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #f44336;
}

.alert-warning {
  background: #fff3e0;
  color: #e65100;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #ff9800;
}

.alert-info {
  background: #e3f2fd;
  color: #01579b;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #2196f3;
}

/* =========================================
   TABLE STYLE
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
  margin-top: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 15px;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background-color: #f5f7fa;
  color: #2c3e50;
  font-weight: 600;
  border-top: 1px solid #e0e0e0;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Data Table - Table dengan garis pembatas */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

.data-table thead {
  background-color: #f5f7fa;
  border-bottom: 2px solid #e0e0e0;
}

.data-table th {
  border: none;
  padding: 12px 15px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  background-color: #f5f7fa;
}

.data-table td {
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 15px;
  text-align: left;
  font-size: 0.9rem;
  color: #444;
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.data-table tbody tr:hover {
  background-color: #f0f2f5;
}

/* =========================================
   FORM ELEMENTS
   ========================================= */
input.form-control,
select.form-control,
textarea.form-control {
  font-family: "Poppins", sans-serif;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: #ffffff;
  color: #2c3e50;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

input.form-control::placeholder {
  color: #999;
}

/* =========================================
   TABEL ABSENSI
   ========================================= */
.tabel-absensi {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background-color: white;
}

.tabel-absensi th, .tabel-absensi td {
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 10px;
  text-align: left;
}

.tabel-absensi th {
  background-color: #f5f7fa;
  color: #2c3e50;
  font-weight: 600;
  border-top: 1px solid #e0e0e0;
}

.tabel-absensi tr:nth-child(even) {
  background-color: #fafbfc;
}

.tabel-absensi tr:hover {
  background-color: #fff8e1;
}

/* =========================================
   RESPONSIVE MODE
   ========================================= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2);
  }

  .content-area,
  .content,
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .table {
    width: max-content;
  }
}

/* =========================================
   UTILITY CLASSES FOR PROFESSIONAL DESIGN
   ========================================= */

/* Form Utilities */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.form-group label {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
  color: #7f8c8d;
  margin-top: 4px;
  font-size: 0.85rem;
}

/* Section Titles */
.section-title {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

/* Info/Instruction Boxes */
.info-box {
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.info-box p {
  margin: 0;
  color: #2c3e50;
  font-size: 0.9rem;
}
}

.info-box.warning {
  border-left-color: #ff9800;
  background: #fff8f0;
}

.info-box.danger {
  border-left-color: #f44336;
  background: #ffebee;
}

.info-box.success {
  border-left-color: #4caf50;
  background: #f1f8e9;
}

/* Button Utilities */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  font-family: "Poppins", sans-serif;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Filter Section */
.filter-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border: 1px solid #e0e0e0;
}

.filter-section h4 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 0.95rem;
  font-weight: 600;
}

.filter-section form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: flex-end;
}

/* Status Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card-base {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #3498db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #2c3e50;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #7f8c8d;
  text-transform: capitalize;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #01579b; }
.badge-secondary { background: #eeeeee; color: #424242; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-danger { background: #ffebee; color: #c62828; }

/* ---- Dropdown Menu Item in Sidebar ---- */
.sidebar .dropdown-menu-item > a {
  cursor: pointer;
  user-select: none;
}

.sidebar .dropdown-menu-item > a:hover {
  background: #f0f0f0;
}

.sidebar .dropdown-menu-item.open > a {
  background: #e8f4f8;
  color: #2c3e50;
}

.sidebar .dropdown-submenu {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0;
  border-left: 2px solid #d0d0d0;
  max-height: 500px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.sidebar .dropdown-submenu li {
  margin: 0;
}

.sidebar .dropdown-submenu li a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #666;
  transition: all 0.2s ease;
}

.sidebar .dropdown-submenu li a:hover {
  background: #f5f5f5;
  color: #3498db;
  padding-left: 1.2rem;
}

.sidebar .dropdown-submenu li a.active {
  background: #e8f4f8;
  color: #3498db;
  font-weight: 600;
  border-left: 0;
}

