:root {
  --primary-teal: #2E7D32;
  --light-teal: #4CAF50;
  --dark-teal: #1B5E20;
  --accent-gold: #FFC107;
  --light-gold: #FFF9C4;
  --dark-gold: #FFA000;
  --pure-white: #FFFFFF;
  --off-white: #F1F8E9;
  --card-bg: #ffffff;
  --text-dark: #2C3E50;
  --text-light: #757575;
  --border-color: #C8E6C9;
  --success: #4CAF50;
  --danger: #E74C3C;
  --warning: #FF9800;
  --info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
  --gradient-gold: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
  --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #F1F8E9 100%);
  --shadow-sm: 0 2px 8px rgba(46, 125, 50, 0.1);
  --shadow-md: 0 4px 16px rgba(46, 125, 50, 0.15);
  --shadow-lg: 0 8px 32px rgba(46, 125, 50, 0.2);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 50%, var(--accent-gold) 100%);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Login Page */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-box {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: block;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--primary-teal);
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-lg);
}

.logo-text {
  color: var(--accent-gold);
  font-size: 32px;
  font-weight: bold;
}

.login-header h1 {
  color: var(--primary-teal);
  font-size: 28px;
  margin-bottom: 5px;
}

.login-header p {
  color: var(--text-light);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-block {
  width: 100%;
  display: block;
}

.error-message {
  background: #fee;
  color: var(--danger);
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
}

.login-footer {
  text-align: center;
  margin-top: 30px;
  color: var(--text-light);
  font-size: 12px;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--primary-teal) 0%, var(--dark-teal) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(46, 125, 50, 0.15);
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-image-container {
  position: relative;
  width: 50px;
  height: 50px;
}

.logo-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
}

.sidebar .logo-circle {
  width: 50px;
  height: 50px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .logo-text {
  color: var(--primary-teal);
  font-size: 20px;
  font-weight: bold;
}

.logo-text-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-gold);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  line-height: 1.2;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background: var(--gradient-gold);
  color: var(--dark-teal);
  font-weight: 600;
  border-left: 4px solid var(--pure-white);
  box-shadow: var(--shadow-md);
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  stroke-width: 2px;
}

.nav-group {
  margin: 10px 0;
}

.nav-group-title {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-sub {
  padding-left: 56px;
  font-size: 14px;
  position: relative;
}

.nav-icon-small {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  stroke-width: 2px;
}

.menu-badge {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #F44336;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: rgba(220, 53, 69, 0.4);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.top-header {
  background: white;
  padding: 20px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-dark);
}

#pageTitle {
  color: var(--primary-teal);
  font-size: 24px;
  font-weight: 600;
}

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

/* Notification Button */
.notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s;
  color: var(--text-dark);
}

.notification-btn:hover {
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary-teal);
}

.notification-btn i {
  width: 24px;
  height: 24px;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #F44336;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-badge.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.5);
  }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.user-profile:hover {
  background: rgba(46, 125, 50, 0.05);
}

.user-profile .dropdown-icon {
  width: 18px;
  height: 18px;
  color: #666;
  transition: transform 0.3s;
}

.user-profile.active .dropdown-icon {
  transform: rotate(180deg);
}

.user-avatar {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-teal);
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-teal), var(--light-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.user-avatar-placeholder i {
  width: 24px;
  height: 24px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#userName {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: #666;
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid #e0e0e0;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-teal), var(--light-teal));
  border-radius: 12px 12px 0 0;
}

.dropdown-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-teal);
}

.dropdown-avatar-placeholder i {
  width: 28px;
  height: 28px;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.dropdown-name {
  font-weight: 600;
  color: white;
  font-size: 15px;
}

.dropdown-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(46, 125, 50, 0.05);
  color: var(--primary-teal);
}

.dropdown-item i {
  width: 20px;
  height: 20px;
  color: #666;
}

.dropdown-item:hover i {
  color: var(--primary-teal);
}

.dropdown-item.logout-item {
  color: #F44336;
}

.dropdown-item.logout-item:hover {
  background: rgba(244, 67, 54, 0.05);
  color: #F44336;
}

.dropdown-item.logout-item i {
  color: #F44336;
}

/* Date Info */
.date-info {
  background: linear-gradient(135deg, var(--primary-teal), var(--light-teal));
  color: white;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.date-info i {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  background: var(--light-gold);
  padding: 2px 8px;
  border-radius: 5px;
  margin-top: 2px;
}

.content-area {
  padding: 30px;
  flex: 1;
}

/* Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.stat-title {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.stat-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
}

.card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-teal);
}

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.chart-container {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-teal);
  margin-bottom: 20px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

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

thead {
  background: var(--gradient-primary);
  color: white;
}

th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

tr:hover {
  background: #f8f9fa;
}

/* Buttons */
.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: var(--text-dark);
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.btn-group {
  display: flex;
  gap: 5px;
}

/* Action buttons in table */
td .btn-sm {
  margin: 2px;
  min-width: 60px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

@media (max-width: 768px) {
  td .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 50px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-teal);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  
  .main-content {
    margin-left: 240px;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .top-header {
    padding: 15px 20px;
  }
  
  #pageTitle {
    font-size: 20px;
  }
  
  .content-area {
    padding: 20px;
  }
  
  .nav-text {
    display: inline;
  }
  
  /* User Profile Dropdown Mobile */
  .user-info {
    display: none;
  }
  
  .user-profile .dropdown-icon {
    display: none;
  }
  
  .user-dropdown {
    right: 10px;
    min-width: 260px;
  }
  
  .header-right {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 30px 20px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 10px 8px;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Success Message */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #c3e6cb;
}

/* Print Styles */
@media print {
  .sidebar,
  .top-header,
  .btn,
  .modal {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== UNIT USAHA TILE MODERN ===== */
.unit-usaha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 20px;
}

.unit-tile {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.unit-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.unit-tile.active {
  border-left: 4px solid #00C9A7;
}

.unit-tile.inactive {
  border-left: 4px solid #FF6B6B;
  opacity: 0.85;
}

.unit-tile-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 30px 20px;
  text-align: center;
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unit-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: white;
}

.unit-logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 4px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.unit-logo-placeholder i {
  width: 50px;
  height: 50px;
  color: white;
}

.unit-status {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.unit-tile-body {
  padding: 25px 20px;
}

.unit-name {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 8px;
  line-height: 1.3;
}

.unit-jenis {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

.unit-jenis i {
  width: 16px;
  height: 16px;
}

.unit-desc {
  color: #718096;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.unit-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a5568;
}

.info-item i {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.info-item span {
  font-weight: 500;
}

.unit-tile-footer {
  padding: 15px 20px;
  background: #f7fafc;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
}

.unit-tile-footer .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.2s;
}

.unit-tile-footer .btn i {
  width: 16px;
  height: 16px;
}

.unit-tile-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Empty State */
.unit-usaha-grid:empty::after {
  content: 'Belum ada unit usaha. Klik tombol "Tambah Unit Usaha" untuk menambahkan.';
  display: block;
  text-align: center;
  padding: 60px 20px;
  color: #a0aec0;
  font-size: 16px;
  grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 768px) {
  .unit-usaha-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }
  
  .unit-tile-footer {
    flex-direction: column;
  }
  
  .unit-tile-footer .btn {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .unit-usaha-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1400px) {
  .unit-usaha-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}



/* Profil User Page */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
}

.profile-header {
  background: var(--gradient-primary);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  color: white;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}

.profile-photo-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid white;
  box-shadow: var(--shadow-md);
}

.profile-photo-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: bold;
  color: var(--primary-teal);
  border: 5px solid white;
  box-shadow: var(--shadow-md);
}

.profile-photo-upload {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

.profile-photo-upload:hover {
  transform: scale(1.1);
  background: var(--dark-gold);
}

.profile-photo-upload i {
  color: white;
  width: 20px;
  height: 20px;
}

.profile-photo-upload input[type="file"] {
  display: none;
}

.profile-info h2 {
  font-size: 28px;
  margin-bottom: 5px;
}

.profile-info p {
  font-size: 16px;
  opacity: 0.9;
}

.profile-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.profile-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.profile-card h3 {
  color: var(--primary-teal);
  margin-bottom: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-card h3 i {
  width: 24px;
  height: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-light);
  font-weight: 500;
}

.info-value {
  color: var(--text-dark);
  font-weight: 600;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-requirements {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 10px;
}

.password-requirements ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.password-requirements li {
  margin: 5px 0;
}

@media (max-width: 768px) {
  .profile-content {
    grid-template-columns: 1fr;
  }
  
  .profile-header {
    padding: 30px 20px;
  }
  
  .profile-photo-container {
    width: 120px;
    height: 120px;
  }
  
  .profile-photo,
  .profile-photo-placeholder {
    width: 120px;
    height: 120px;
  }
}


/* Banner Slider Styles */
.banner-slider {
  position: relative;
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: transparent;
  line-height: 0;
}

.banner-slides {
  position: relative;
  width: 100%;
  line-height: 0;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: block;
  line-height: 0;
}

.banner-slide.active {
  opacity: 1;
  position: relative;
}

.banner-slide > div {
  line-height: 0;
  display: block;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  vertical-align: bottom;
  line-height: 0;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.5), transparent);
  color: white;
  padding: 25px 30px;
  text-align: center;
  backdrop-filter: blur(8px);
  z-index: 5;
  border-radius: 0 0 12px 12px;
}

.banner-overlay h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-overlay p {
  font-size: 16px;
  margin: 0;
  opacity: 0.95;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.banner-prev:hover,
.banner-next:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.banner-prev {
  left: 20px;
}

.banner-next {
  right: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dot.active {
  background: white;
  transform: scale(1.2);
}

.banner-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Responsive Banner */
@media (max-width: 768px) {
  .banner-slider {
    margin-bottom: 20px;
    border-radius: 8px;
  }
  
  .banner-image {
    border-radius: 8px;
  }
  
  .banner-overlay {
    padding: 15px 20px;
    border-radius: 0 0 8px 8px;
  }
  
  .banner-overlay h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .banner-overlay p {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .banner-prev,
  .banner-next {
    padding: 8px 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.3);
  }
  
  .banner-prev {
    left: 8px;
  }
  
  .banner-next {
    right: 8px;
  }
  
  .banner-dots {
    bottom: 12px;
    gap: 8px;
  }
  
  .banner-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .banner-slider {
    border-radius: 6px;
  }
  
  .banner-image {
    border-radius: 6px;
  }
  
  .banner-overlay {
    padding: 12px 15px;
    border-radius: 0 0 6px 6px;
  }
  
  .banner-overlay h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  
  .banner-overlay p {
    font-size: 12px;
    line-height: 1.3;
  }
  
  .banner-prev,
  .banner-next {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .banner-prev {
    left: 5px;
  }
  
  .banner-next {
    right: 5px;
  }
  
  .banner-dots {
    bottom: 10px;
    gap: 6px;
  }
  
  .banner-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .banner-slider {
    height: 150px;
  }
  
  .banner-overlay h3 {
    font-size: 16px;
  }
  
  .banner-overlay p {
    font-size: 12px;
  }
}


/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.alert-info {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1976d2;
}

.alert-success {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

.alert-danger {
  background: #ffebee;
  border-left: 4px solid #f44336;
  color: #c62828;
}

.alert h4 {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert p {
  margin: 0;
  line-height: 1.6;
}

.alert ol, .alert ul {
  margin: 10px 0;
  padding-left: 20px;
  line-height: 1.8;
}

.alert details {
  margin-top: 10px;
}

.alert summary {
  cursor: pointer;
  font-weight: 600;
}

.alert details ul {
  max-height: 200px;
  overflow-y: auto;
  margin: 10px 0 0 20px;
}


/* Filter Section */
.filter-section {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  flex-wrap: wrap;
}

.filter-section label {
  font-weight: 600;
  margin: 0;
  color: #333;
}

.filter-section select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 200px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-section select:hover {
  border-color: #2E7D32;
}

.filter-section select:focus {
  outline: none;
  border-color: #2E7D32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.filter-section .btn-secondary {
  background: white;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.filter-section .btn-secondary:hover {
  background: #2E7D32;
  color: white;
  border-color: #2E7D32;
}

@media (max-width: 768px) {
  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-section select {
    width: 100%;
  }
  
  .filter-section > div:last-child {
    margin-left: 0 !important;
    text-align: center;
  }
}


/* Responsive Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.action-buttons .btn i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-buttons .btn .btn-text {
  display: inline;
}

/* Tablet - Show icons and text */
@media (max-width: 1024px) {
  .action-buttons .btn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .action-buttons .btn .btn-text {
    display: inline;
  }
}

/* Mobile - Icon only */
@media (max-width: 768px) {
  .action-buttons {
    gap: 6px;
  }
  
  .action-buttons .btn {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
  }
  
  .action-buttons .btn .btn-text {
    display: none;
  }
  
  .action-buttons .btn i {
    margin: 0;
  }
}

/* Small Mobile - Smaller buttons */
@media (max-width: 480px) {
  .action-buttons {
    gap: 4px;
  }
  
  .action-buttons .btn {
    padding: 6px;
    min-width: 32px;
  }
  
  .action-buttons .btn i {
    width: 14px;
    height: 14px;
  }
}

/* Hover effects */
.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-buttons .btn:active {
  transform: translateY(0);
}

/* Tooltip for mobile (show on long press) */
@media (max-width: 768px) {
  .action-buttons .btn {
    position: relative;
  }
  
  .action-buttons .btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 4px;
    pointer-events: none;
    z-index: 1000;
  }
  
  .action-buttons .btn:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: -4px;
    pointer-events: none;
    z-index: 1000;
  }
}

/* Table responsive improvements */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-container table {
    min-width: 800px;
  }
  
  .table-container th,
  .table-container td {
    padding: 10px 8px;
    font-size: 13px;
  }
  
  .table-container th:last-child,
  .table-container td:last-child {
    position: sticky;
    right: 0;
    background: white;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.05);
    z-index: 1;
  }
  
  .table-container thead th:last-child {
    background: var(--primary-color);
    z-index: 2;
  }
}

@media (max-width: 480px) {
  .table-container table {
    min-width: 700px;
  }
  
  .table-container th,
  .table-container td {
    padding: 8px 6px;
    font-size: 12px;
  }
}


/* Filter Section Enhancements */
.filter-section input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

.filter-section input[type="date"]:hover {
  border-color: #2E7D32;
}

.filter-section input[type="date"]:focus {
  outline: none;
  border-color: #2E7D32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.filter-section .btn-warning {
  background: #ffc107;
  color: #212529;
  border: none;
}

.filter-section .btn-warning:hover {
  background: #ffb300;
}

/* Responsive filter section improvements */
@media (max-width: 1200px) {
  .filter-section {
    flex-wrap: wrap;
  }
  
  .filter-section select,
  .filter-section input[type="date"] {
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-section > * {
    width: 100%;
  }
  
  .filter-section select,
  .filter-section input[type="date"],
  .filter-section button {
    width: 100%;
  }
  
  .filter-section > div:last-child {
    text-align: center;
    margin-top: 10px;
  }
}


/* ===== ACTIVITY LOG STYLES ===== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
}

.activity-list::-webkit-scrollbar {
  width: 6px;
}

.activity-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #ddd;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.activity-item:hover {
  background: #e9ecef;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.activity-icon i {
  width: 18px;
  height: 18px;
}

/* Activity Colors */
.activity-create { 
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9); 
  color: #2e7d32;
  border-left-color: #2e7d32;
}

.activity-update { 
  background: linear-gradient(135deg, #fff3e0, #ffe0b2); 
  color: #f57c00;
  border-left-color: #f57c00;
}

.activity-delete { 
  background: linear-gradient(135deg, #ffebee, #ffcdd2); 
  color: #c62828;
  border-left-color: #c62828;
}

.activity-login { 
  background: linear-gradient(135deg, #e3f2fd, #bbdefb); 
  color: #1976d2;
  border-left-color: #1976d2;
}

.activity-logout { 
  background: linear-gradient(135deg, #f3e5f5, #e1bee7); 
  color: #7b1fa2;
  border-left-color: #7b1fa2;
}

.activity-approve { 
  background: linear-gradient(135deg, #e8f5e9, #a5d6a7); 
  color: #388e3c;
  border-left-color: #388e3c;
}

.activity-reject { 
  background: linear-gradient(135deg, #ffebee, #ef9a9a); 
  color: #d32f2f;
  border-left-color: #d32f2f;
}

.activity-view { 
  background: linear-gradient(135deg, #e0f2f1, #b2dfdb); 
  color: #00796b;
  border-left-color: #00796b;
}

.activity-export { 
  background: linear-gradient(135deg, #fce4ec, #f8bbd0); 
  color: #c2185b;
  border-left-color: #c2185b;
}

.activity-print { 
  background: linear-gradient(135deg, #f1f8e9, #dcedc8); 
  color: #689f38;
  border-left-color: #689f38;
}

.activity-default { 
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0); 
  color: #616161;
  border-left-color: #616161;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.activity-header strong {
  color: #2e7d32;
  font-weight: 600;
  font-size: 14px;
}

.activity-action {
  color: #666;
  font-size: 13px;
}

.activity-module {
  background: #2e7d32;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-description {
  color: #666;
  font-size: 13px;
  margin: 4px 0;
  line-height: 1.4;
}

.activity-time {
  color: #999;
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.activity-time i {
  width: 12px;
  height: 12px;
}

.activity-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.activity-empty i {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .activity-item {
    padding: 10px;
    gap: 10px;
  }
  
  .activity-icon {
    width: 32px;
    height: 32px;
  }
  
  .activity-icon i {
    width: 16px;
    height: 16px;
  }
  
  .activity-header {
    font-size: 13px;
  }
  
  .activity-module {
    font-size: 10px;
    padding: 1px 6px;
  }
}


/* Upload Buttons for Camera (Admin Panel) */
.upload-buttons-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.upload-buttons-container .btn {
  flex: 1;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-buttons-container .btn-secondary {
  background: #f5f5f5;
  color: #333;
}

.upload-buttons-container .btn-secondary:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.upload-buttons-container .btn-info {
  background: linear-gradient(135deg, #2196F3, #42A5F5);
  color: white;
}

.upload-buttons-container .btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.upload-buttons-container .btn i {
  width: 18px;
  height: 18px;
}

/* Mobile Optimization for Upload Buttons */
@media (max-width: 480px) {
  .upload-buttons-container {
    flex-direction: column;
  }
  
  .upload-buttons-container .btn {
    width: 100%;
    padding: 14px;
  }
}

/* Preview Enhancement for Bukti Upload */
#previewBuktiPengeluaran img,
#previewBuktiPendapatanLain img,
#previewBuktiPartisipasi img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  #previewBuktiPengeluaran img,
  #previewBuktiPendapatanLain img,
  #previewBuktiPartisipasi img {
    max-width: 100%;
    max-height: 300px;
  }
}
