/* Reset dan Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Layout Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 20px 0;
  transition: all 0.3s;
  position: fixed;
  height: 100vh;
  z-index: 1000;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.sidebar-header p {
  font-size: 0.8rem;
  opacity: 0.8;
}

.sidebar-menu {
  margin-top: 20px;
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-item .icon {
  margin-right: 10px;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 15px 20px;
  font-size: 0.7rem;
  opacity: 0.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content Styles */
.main-content {
  flex: 1;
  margin-left: 250px;
  transition: all 0.3s;
}

.top-nav {
  background-color: white;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  margin-right: 15px;
  cursor: pointer;
  color: #555;
  display: none;
}

.status-indicator {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #555;
}

.status-indicator .online {
  color: #2ecc71;
  font-size: 0.6rem;
  margin-right: 5px;
}

/* Content Area */
.content-area {
  padding: 25px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.content-header h2 {
  font-size: 1.5rem;
  color: #2c3e50;
}

.btn {
  padding: 8px 15px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

.refresh-btn i {
  margin-right: 5px;
}

/* Card Styles */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-body {
  padding: 20px;
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  background-color: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e9ecef;
}

.modern-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.modern-table tr:hover {
  background-color: #f8f9fa;
}

/* Loading and Error States */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #3498db;
}

.loading-state i {
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

.error-state {
  padding: 15px;
  background-color: #fdecea;
  color: #d32f2f;
  border-radius: 4px;
  margin-bottom: 15px;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-header .actions {
    margin-top: 10px;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  .main-content.sidebar-active {
    margin-left: 250px;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}
