/* 
 * Unified Theme for SDS2 System
 * Modern Gradient Design
 */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --info-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f5576c;
  --text-color: #2d3748;
  --light-bg: #f7fafc;
  --card-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
  --hover-shadow: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --button-hover-transform: translateY(-3px);
  --button-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Body & Background ========== */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.main-content {
  position: relative;
  flex: 1 0 auto;
  padding: 2rem 0;
}

/* ========== Navbar ========== */
.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.system-logo {
  height: 40px;
  width: auto;
  margin-right: 1rem;
  object-fit: contain;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logout-btn {
  background: var(--secondary-gradient);
  border: none;
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--button-transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(245, 87, 108, 0.3);
  text-decoration: none;
}

.logout-btn:hover {
  transform: var(--button-hover-transform);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
  color: white;
}

.logout-btn i {
  font-size: 1.1rem;
}

/* ========== Cards ========== */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  transition: var(--button-transition);
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.card-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: 20px 20px 0 0 !important;
  border: none;
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.card-body {
  padding: 1.5rem;
}

/* ========== Buttons ========== */
.btn-primary {
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: var(--button-transition);
  color: white;
}

.btn-primary:hover {
  transform: var(--button-hover-transform);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: var(--primary-gradient);
  color: white;
}

.btn-success {
  background: var(--success-gradient);
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
  transition: var(--button-transition);
  color: white;
}

.btn-success:hover {
  transform: var(--button-hover-transform);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
  background: var(--success-gradient);
  color: white;
}

.btn-warning {
  background: var(--warning-gradient);
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(250, 112, 154, 0.3);
  transition: var(--button-transition);
  color: white;
}

.btn-warning:hover {
  transform: var(--button-hover-transform);
  box-shadow: 0 6px 20px rgba(250, 112, 154, 0.4);
  background: var(--warning-gradient);
  color: white;
}

.btn-danger {
  background: var(--secondary-gradient);
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
  transition: var(--button-transition);
  color: white;
}

.btn-danger:hover {
  transform: var(--button-hover-transform);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
  background: var(--secondary-gradient);
  color: white;
}

.btn-secondary {
  background: white;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--button-transition);
}

.btn-secondary:hover {
  transform: var(--button-hover-transform);
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
}

/* ========== Forms ========== */
.form-control,
.form-select {
  border-radius: 10px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  padding: 0.7rem 1rem;
  transition: var(--button-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

/* ========== Tables ========== */
.table {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.table thead th {
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.table tbody tr {
  transition: var(--button-transition);
}

.table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* ========== Alerts ========== */
.alert {
  border-radius: 14px;
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(79, 172, 254, 0.1);
  border-right: 4px solid #4facfe;
  color: #2d3748;
}

.alert-danger {
  background: rgba(245, 87, 108, 0.1);
  border-right: 4px solid #f5576c;
  color: #2d3748;
}

.alert-warning {
  background: rgba(250, 112, 154, 0.1);
  border-right: 4px solid #fa709a;
  color: #2d3748;
}

.alert-info {
  background: rgba(48, 207, 208, 0.1);
  border-right: 4px solid #30cfd0;
  color: #2d3748;
}

/* ========== Badges ========== */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-primary {
  background: var(--primary-gradient);
  color: white;
}

.badge-success {
  background: var(--success-gradient);
  color: white;
}

.badge-warning {
  background: var(--warning-gradient);
  color: white;
}

.badge-danger {
  background: var(--secondary-gradient);
  color: white;
}

/* ========== Page Title ========== */
.page-title {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.page-title h2,
.page-title h3,
.page-title h4 {
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ========== Footer ========== */
.footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #2d3748;
  padding: 1.5rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  z-index: 1;
}

.footer p {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  margin: 0;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--button-transition);
}

.footer a:hover {
  color: var(--primary-color);
}

/* ========== Pagination ========== */
.pagination {
  gap: 0.5rem;
}

.page-link {
  border-radius: 10px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: var(--button-transition);
  margin: 0 0.2rem;
}

.page-link:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
}

/* ========== Modal ========== */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: var(--hover-shadow);
}

.modal-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: 20px 20px 0 0;
  border: none;
  padding: 1.2rem 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  padding: 1rem 1.5rem;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-item.active {
  color: var(--text-color);
}

/* ========== Loading Spinner ========== */
.spinner-border-gradient {
  border-right-color: transparent;
  animation: spinner-border .75s linear infinite;
}

/* ========== Utilities ========== */
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--primary-gradient);
}

.bg-gradient-success {
  background: var(--success-gradient);
}

.bg-gradient-warning {
  background: var(--warning-gradient);
}

.bg-gradient-danger {
  background: var(--secondary-gradient);
}

/* ========== Dashboard Specific ========== */
.welcome-message {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: var(--button-transition);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.welcome-message:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.welcome-message h4 {
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.stats-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  transition: var(--button-transition);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--primary-gradient);
}

.stats-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.stats-card .icon {
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.stats-card .label {
  color: #718096;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card .value {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stats-card .sub {
  font-size: 0.85rem;
  color: #a0aec0;
}

.stats-card .sub strong {
  background: var(--success-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.list-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--card-shadow);
  transition: var(--button-transition);
  padding: 1.5rem;
}

.list-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.list-card h6 {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.list-card .item {
  padding: 1rem;
  border-bottom: 1px dashed rgba(102, 126, 234, 0.15);
  transition: var(--button-transition);
  border-radius: 8px;
}

.list-card .item:last-child {
  border-bottom: 0;
}

.list-card .item:hover {
  background: rgba(102, 126, 234, 0.05);
  transform: translateX(-5px);
}

.list-card .item i {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
}

.list-card .item strong {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.1rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  transition: var(--button-transition);
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(102, 126, 234, 0.3);
}

.feature-card .card-body {
  padding: 2rem;
}

.feature-card .btn {
  border-radius: 14px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--button-transition);
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(102, 126, 234, 0.15);
  background: white;
  color: #2d3748;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1;
  text-decoration: none;
}

.feature-card .btn i {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--button-transition);
}

.feature-card .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--button-transition);
  z-index: -1;
}

.feature-card .btn:hover::before {
  opacity: 1;
}

.feature-card .btn:hover {
  transform: var(--button-hover-transform);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.feature-card .btn:hover i {
  -webkit-text-fill-color: white;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .page-title {
    padding: 1rem;
  }
  
  .card-header {
    padding: 1rem;
    font-size: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}
