/* ================================
   Koperasi SMS - Custom Styles
   ================================ */

/* Admin Management Styles */
.avatar-sm {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.admin-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bulk-action-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.admin-actions .btn {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.admin-info-card {
    border-left: 4px solid #007bff;
}

.admin-info-card.super-admin {
    border-left-color: #dc3545;
}

.admin-info-card.operator {
    border-left-color: #17a2b8;
}

.password-toggle {
    cursor: pointer;
    border: none;
    background: none;
    color: #6c757d;
}

.password-toggle:hover {
    color: #495057;
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Form improvements */
.form-label {
    font-weight: 500;
    color: #495057;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
}

/* Button improvements */
.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

/* Pagination improvements */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* CSS Variables */
:root {
  --primary-red: #DC2626;
  --primary-white: #FFFFFF;
  --light-gray: #F8F9FA;
  --dark-gray: #6B7280;
  --accent-red: #FEF2F2;
  --text-dark: #111827;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--primary-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* Navigation Styles */
.navbar {
  background-color: var(--primary-white) !important;
  box-shadow: var(--shadow-light);
  padding: 1rem 0;
  transition: all 0.4s ease;
}

.navbar-brand {
  transition: color 0.4s ease;
}

.navbar-nav .nav-link {
  transition: all 0.4s ease;
}

/* Transparent Navbar for Index Page */
.navbar-transparent {
  background-color: transparent !important;
  box-shadow: none;
  backdrop-filter: none;
}

.navbar-transparent .navbar-brand {
  color: var(--primary-white) !important;
}

.navbar-transparent .navbar-nav .nav-link {
  color: var(--primary-white) !important;
}

.navbar-transparent .navbar-nav .nav-link:hover,
.navbar-transparent .navbar-nav .nav-link.active {
  color: var(--primary-white) !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-transparent .btn-outline-custom {
  color: var(--primary-white);
  border-color: var(--primary-white);
}

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

.navbar-transparent .navbar-toggler {
  border-color: var(--primary-white);
}

.navbar-transparent .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Scrolled Navbar State */
.navbar-scrolled {
  background-color: var(--primary-white) !important;
  box-shadow: var(--shadow-light);
  backdrop-filter: blur(10px);
}

.navbar-scrolled .navbar-brand {
  color: var(--primary-red) !important;
}

.navbar-scrolled .navbar-nav .nav-link {
  color: var(--text-dark) !important;
}

.navbar-scrolled .navbar-nav .nav-link:hover,
.navbar-scrolled .navbar-nav .nav-link.active {
  color: var(--primary-red) !important;
  background-color: var(--accent-red);
}

.navbar-scrolled .btn-outline-custom {
  color: var(--primary-red);
  border-color: var(--primary-red);
}

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

.navbar-scrolled .navbar-toggler {
  border-color: var(--text-dark);
}

.navbar-scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2817, 24, 39, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-red) !important;
}

.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-red) !important;
  background-color: var(--accent-red);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-red) 0%, #B91C1C 100%);
  color: var(--primary-white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.15"/><circle cx="70" cy="30" r="1.5" fill="white" opacity="0.1"/></svg>');
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Carousel Specific Styles */
.carousel-section {
  margin-top: 0px; /* Account for fixed navbar */
}

.carousel-item {
  height: 100vh;
  min-height: 600px;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative;
}

.carousel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.15"/><circle cx="70" cy="30" r="1.5" fill="white" opacity="0.1"/></svg>');
  pointer-events: none;
}

.carousel-content {
  position: relative;
  z-index: 2;
  color: var(--primary-white);
  text-align: left;
}

.carousel-title {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  color: var(--primary-white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}

.carousel-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Carousel Indicators */
.carousel-indicators {
  bottom: 30px;
  z-index: 3;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary-white);
  background-color: transparent;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  opacity: 1;
  background-color: var(--primary-white);
  transform: scale(1.2);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.carousel-control-prev {
  left: 30px;
}

.carousel-control-next {
  right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 24px;
  height: 24px;
}

/* Badge Styles for Carousel */
.badge.text-purple {
  color: #7C3AED !important;
}

.badge.text-info {
  color: #0891B2 !important;
}

/* Responsive Carousel */
@media (max-width: 768px) {
  .carousel-item {
    height: 100vh;
    min-height: 500px;
  }

  .carousel-title {
    font-size: 2.5rem;
  }

  .carousel-subtitle {
    font-size: 1.1rem;
  }

  .carousel-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .carousel-buttons .btn-primary-custom,
  .carousel-buttons .btn-outline-custom {
    margin: 0.5rem 0;
    width: 200px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 50px;
    height: 50px;
  }

  .carousel-control-prev {
    left: 15px;
  }

  .carousel-control-next {
    right: 15px;
  }

  .carousel-indicators {
    bottom: 20px;
  }

  .carousel-indicators button {
    width: 10px;
    height: 10px;
  }

  /* Mobile navbar adjustments */
  .navbar-transparent .navbar-collapse {
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }

  .navbar-scrolled .navbar-collapse {
    background-color: var(--primary-white);
    box-shadow: var(--shadow-light);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .carousel-item {
    min-height: 450px;
  }

  .carousel-title {
    font-size: 2rem;
  }

  .carousel-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .carousel-content {
    padding: 0 1rem;
    text-align: left;
  }

  .carousel-buttons {
    justify-content: flex-start;
  }
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary-white);
  color: var(--primary-red);
  border: 2px solid var(--primary-white);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary-custom:hover {
  background-color: transparent;
  color: var(--primary-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-outline-custom:hover {
  background-color: var(--primary-red);
  color: var(--primary-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Section Styles */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--dark-gray);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards */
.card-custom {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  height: 100%;
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-custom .card-body {
  padding: 2rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-red), #B91C1C);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-white);
  font-size: 1.5rem;
}

/* Stats Section */
.stats-section {
  background-color: var(--accent-red);
  padding: 4rem 0;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-red);
  display: block;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--dark-gray);
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--primary-white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--primary-red);
  margin-bottom: 1rem;
}

.footer a {
  color: var(--primary-white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--primary-red);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: center;
  color: var(--dark-gray);
}

/* About Page Styles */
.about-intro {
  background-color: var(--light-gray);
  padding: 4rem 0;
}

.team-card {
  text-align: center;
  padding: 2rem;
  background: var(--primary-white);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-red), #B91C1C);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-white);
  font-size: 2rem;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-padding {
    padding: 3rem 0;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.8s ease-in;
}

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

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

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

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
