/**
 * Main Stylesheet
 * End Group Core - Enterprise Management System
 */

:root {
  --primary-color: #4e73df;
  --secondary-color: #858796;
  --success-color: #1cc88a;
  --info-color: #36b9cc;
  --warning-color: #f6c23e;
  --danger-color: #e74a3b;
  --dark-color: #5a5c69;
  --sidebar-width: 250px;
  --sidebar-bg: #212529;
  --sidebar-text: #ffffff;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fc;
  min-height: 100vh;
}

/* ===== Login Page Styles ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
}

.login-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
}

.login-header {
  background: var(--primary-color);
  color: #fff;
  padding: 30px;
  text-align: center;
}

.login-logo {
  height: 60px;
  width: auto;
  margin-bottom: 10px;
  filter: brightness(0) invert(1);
}

.login-header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.login-header p {
  opacity: 0.8;
  margin: 0;
}

.login-body {
  padding: 30px;
}

.login-body .form-control {
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #e3e6f0;
}

.login-body .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.login-body .btn-primary {
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  background: var(--primary-color);
  border: none;
}

.login-body .btn-primary:hover {
  background: #224abe;
}

/* ===== Sidebar Styles ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

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

.sidebar-logo {
  display: block;
  text-align: center;
}

.sidebar-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-header h3 {
  font-size: 1.2rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  list-style: none;
  padding: 15px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav .nav-item {
  margin: 2px 10px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-nav .nav-item.active .nav-link {
  background: var(--primary-color);
  color: #fff;
}

.sidebar-nav .nav-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sidebar-nav .nav-divider {
  padding: 15px 15px 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
}

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

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

/* ===== Main Content Area ===== */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 20px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 25px;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--dark-color);
  margin-bottom: 5px;
}

.page-header p {
  color: var(--secondary-color);
  margin: 0;
}

/* ===== Dashboard Cards ===== */
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-card.success {
  border-left-color: var(--success-color);
}

.stat-card.info {
  border-left-color: var(--info-color);
}

.stat-card.warning {
  border-left-color: var(--warning-color);
}

.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.3;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Content Cards ===== */
.content-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.content-card .card-header {
  background: transparent;
  border-bottom: 1px solid #e3e6f0;
  padding: 15px 20px;
  font-weight: 600;
  color: var(--primary-color);
}

.content-card .card-body {
  padding: 20px;
}

/* ===== Activity List ===== */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #e3e6f0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e3e6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
}

.activity-content {
  flex: 1;
}

.activity-content h6 {
  margin: 0 0 5px;
  font-size: 0.9rem;
}

.activity-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--secondary-color);
}

/* ===== Alerts ===== */
.alert {
  border-radius: 8px;
  border: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}
