/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables */
:root {
  --primary-color: #4F46E5;
  --secondary-color: #F5F7FB;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  
  --bg-blue: #e0e7ff;
  --bg-orange: #ffedd5;
  --bg-yellow: #fef3c7;
  --bg-green: #d1fae5;
  --bg-gray: #f1f5f9;
  --bg-envato: #ecfdf5;
  --envato-color: #059669;
  
  --shadow: 0px 10px 25px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0px 15px 35px rgba(0, 0, 0, 0.1);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  height: 100%;
  width: 260px;
  background: var(--white);
  transition: var(--transition);
  z-index: 100;
  box-shadow: var(--shadow);
}

.sidebar.active {
  width: 80px;
}

.sidebar .logo-details {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.sidebar .logo-details i {
  font-size: 30px;
  font-weight: 500;
  color: var(--primary-color);
  min-width: 60px;
  text-align: center;
}

.sidebar .logo-details .logo_name {
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar.active .logo-details .logo_name,
.sidebar.active .logo-details .logo_full {
  display: none;
}

.sidebar.active .logo-details .logo_icon {
  display: block !important;
}

.sidebar .nav-links {
  margin-top: 10px;
  padding: 0 15px;
}

.sidebar .nav-links li {
  position: relative;
  list-style: none;
  height: 50px;
  margin-bottom: 8px;
}

.sidebar .nav-links li a {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 12px;
  transition: var(--transition);
  color: var(--text-light);
}

.sidebar .nav-links li a:hover,
.sidebar .nav-links li a.active {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar .nav-links li a i {
  min-width: 50px;
  text-align: center;
  font-size: 20px;
}

.sidebar .nav-links li a .links_name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.sidebar.active .nav-links li a .links_name {
  display: none;
}

.sidebar .profile-details {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-gray);
  padding: 15px 20px;
  transition: var(--transition);
  border-top: 1px solid #e2e8f0;
}

.sidebar.active .profile-details {
  justify-content: center;
  padding: 15px 10px;
}

.sidebar .profile-details img {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.sidebar .profile-details .name-job {
  margin-left: 10px;
}

.sidebar.active .profile-details .name-job {
  display: none;
}

.sidebar .profile-details .profile_name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.sidebar .profile-details .job {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 500;
}

.sidebar .profile-details i {
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar .profile-details i:hover {
  color: var(--danger);
}

.sidebar.active .profile-details i {
  display: none;
}

/* Home Section */
.home-section {
  position: relative;
  background: var(--secondary-color);
  min-height: 100vh;
  width: calc(100% - 260px);
  left: 260px;
  transition: var(--transition);
  padding-bottom: 50px;
}

.sidebar.active ~ .home-section {
  width: calc(100% - 80px);
  left: 80px;
}

.home-section nav {
  display: flex;
  justify-content: space-between;
  height: 80px;
  background: transparent;
  align-items: center;
  padding: 0 40px;
}

.home-section nav .sidebar-button {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 600;
}

.home-section nav .sidebar-button i {
  font-size: 28px;
  margin-right: 15px;
  cursor: pointer;
  color: var(--text-dark);
}

.home-section nav .profile-dropdown {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 6px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.home-section nav .profile-dropdown:hover {
  box-shadow: var(--shadow-hover);
}

.home-section nav .profile-dropdown img {
  height: 35px;
  width: 35px;
  border-radius: 50%;
  margin-left: 10px;
}

.admin_name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Main Content Container */
.main-content-container {
  padding: 0 40px;
  margin-top: 10px;
}

.content-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.content-view.active-view {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, var(--primary-color), #312e81);
  border-radius: var(--border-radius);
  padding: 30px 40px;
  color: var(--white);
  margin-bottom: 30px;
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-content {
  position: relative;
  z-index: 10;
}

.welcome-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-content p {
  font-size: 15px;
  opacity: 0.9;
  font-weight: 300;
}

/* Overview Boxes */
.overview-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.overview-boxes .box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 25px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.overview-boxes .box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.overview-boxes .box .right-side {
  display: flex;
  flex-direction: column;
}

.overview-boxes .box .box-topic {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.overview-boxes .box .number {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.overview-boxes .box .number.text-primary {
  color: var(--primary-color);
}

.indicator-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.overview-boxes .box .indicator {
  display: flex;
  align-items: center;
}

.overview-boxes .box .indicator i {
  font-size: 18px;
  color: var(--success);
  margin-right: 6px;
}

.overview-boxes .box .indicator.text-sm i {
  color: var(--text-light);
  font-size: 16px;
}

.overview-boxes .box .indicator .text {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

.overview-boxes .box .indicator.text-sm .text {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}

.overview-boxes .box .cart {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65px;
  width: 65px;
  background: var(--bg-blue);
  border-radius: 16px;
  font-size: 32px;
  color: var(--primary-color);
}

.overview-boxes .box .cart.two {
  background: var(--bg-orange);
  color: var(--warning);
}

/* Active Resources Section */
.active-resources .section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
}

.active-resources .section-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.active-resources .section-title p {
  font-size: 14px;
  color: var(--text-light);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

.tool-card {
  background: var(--white);
  padding: 30px 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.tool-icon {
  height: 55px;
  width: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-icon.bg-envato { background: var(--bg-envato); color: var(--envato-color); }
.tool-icon.bg-blue { background: var(--bg-blue); color: var(--primary-color); }
.tool-icon.bg-orange { background: var(--bg-orange); color: #f97316; }
.tool-icon.bg-green { background: var(--bg-green); color: var(--success); }
.tool-icon.bg-gray { background: var(--bg-gray); color: var(--text-light); }

.tool-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.tool-info p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 25px;
}

.access-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  background: transparent;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.access-btn i {
  font-size: 18px;
  transition: var(--transition);
}

.tool-card:hover .access-btn {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.tool-card:hover .access-btn i {
  transform: translateX(4px);
}

/* Envato specific highlight if needed */
.envato-card {
  border-top: 4px solid var(--envato-color);
}

.tool-card.locked {
  opacity: 0.8;
  background: #f8fafc;
}

.btn-locked {
  background: var(--bg-gray);
  color: var(--text-light);
  border-color: transparent;
}

.tool-card.locked:hover .btn-locked {
  background: #e2e8f0;
  color: var(--text-dark);
  border-color: transparent;
}

/* Common Card Section for Forms */
.section-card {
  background: var(--white);
  padding: 35px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 800px;
}

.section-card h2 {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.section-card .subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 30px;
}

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

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

.custom-form .form-control {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
  background: #f8fafc;
}

.custom-form .form-control:focus {
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.custom-form small {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

.btn-primary {
  padding: 14px 28px;
  border: none;
  background: var(--primary-color);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: #4338ca;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

/* Profile Image Upload */
.profile-image-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.profile-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
}

.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn-outline {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

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

.upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 991px) {
  .sidebar {
    left: -260px;
  }
  .sidebar.active {
    left: 0;
    width: 260px;
  }
  .sidebar.active .logo-details .logo_name,
  .sidebar.active .nav-links li a .links_name,
  .sidebar.active .profile-details .name-job,
  .sidebar.active .profile-details i {
    display: block;
  }
  .sidebar.active .profile-details {
    justify-content: space-between;
    padding: 15px 20px;
  }
  .home-section {
    width: 100%;
    left: 0;
  }
  .sidebar.active ~ .home-section {
    left: 260px;
    width: calc(100% - 260px);
  }
}

@media (max-width: 768px) {
  .overview-boxes {
    grid-template-columns: 1fr;
  }
  .home-section nav {
    padding: 0 20px;
  }
  .main-content-container {
    padding: 0 20px;
  }
  .sidebar.active ~ .home-section {
    left: 0;
    width: 100%;
  }
  .sidebar.active {
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
  }
  .welcome-card {
    padding: 25px 20px;
  }
  .active-resources .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
