/* ===================================
   Sites Manager - Custom Styles
   =================================== */

/* ---------- Card Enhancements ---------- */
.card {
  -webkit-transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
  transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transition: transform 0.2s ease, box-shadow 0.2s ease, -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
}

.card:hover {
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
}

/* ---------- Server Icon Styles ---------- */
.server-icon {
  width: 40px;
  height: 40px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  background-color: var(--bs-light);
  border-radius: 8px;
}

/* ---------- Table Enhancements ---------- */
.table > tbody > tr {
  -webkit-transition: background-color 0.15s ease;
  transition: background-color 0.15s ease;
}

.table > tbody > tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.table > thead th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bs-secondary);
  border-bottom-width: 2px;
}

.table > tfoot td {
  border-top-width: 2px;
}

/* ---------- Button Group Enhancements ---------- */
.btn-group-sm > .btn {
  padding: 0.35rem 0.6rem;
}

.btn-group > .btn:hover {
  z-index: 1;
}

/* ---------- Modal Enhancements ---------- */
.modal-content {
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  border-bottom: none;
}

.modal-footer {
  border-top: none;
}

/* ---------- Form Enhancements ---------- */
.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  -webkit-box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
          box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--bs-secondary);
}

/* ---------- Badge Enhancements ---------- */
.badge {
  font-weight: 500;
  padding: 0.4em 0.8em;
}

/* ---------- Code Display ---------- */
code {
  font-size: 0.85em;
  color: var(--bs-danger);
}

/* ---------- Statistics Cards ---------- */
.card.bg-gradient {
  background-size: 100% 100%;
  position: relative;
  overflow: hidden;
}

.card.bg-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

/* ---------- Loading Spinner ---------- */
.spinner-border {
  -webkit-animation: spinner-border 0.65s linear infinite;
          animation: spinner-border 0.65s linear infinite;
}

/* ---------- Empty State ---------- */
.text-center.py-5 i.fa-4x {
  opacity: 0.3;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .table-responsive {
    border-radius: 0;
  }
  
  .d-flex.justify-content-between {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 1rem;
  }
  
  .modal-dialog {
    margin: 0.5rem;
  }
}

/* ---------- Tooltip & Truncate Text ---------- */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Status Indicators ---------- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.active {
  background-color: var(--bs-success);
  -webkit-box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.2);
          box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.2);
}

.status-dot.inactive {
  background-color: var(--bs-secondary);
}

/* ---------- Page Header ---------- */
.page-header h1 {
  font-weight: 600;
}

.page-header p {
  font-size: 0.95rem;
}

/* ---------- Smooth Transitions ---------- */
.btn,
.form-control,
.form-select,
.card,
.badge {
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

/* ---------- Custom Scrollbar ---------- */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bs-light);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--bs-secondary);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--bs-primary);
}

/* ===================================
   Sites Management Page - New Styles
   =================================== */

/* ---------- Statistic Icons ---------- */
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  font-size: 1.5rem;
}

.stat-icon-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  color: var(--bs-primary);
}

.stat-icon-success {
  background-color: rgba(var(--bs-success-rgb), 0.15);
  color: var(--bs-success);
}

.stat-icon-warning {
  background-color: rgba(var(--bs-warning-rgb), 0.15);
  color: var(--bs-warning);
}

.stat-icon-info {
  background-color: rgba(var(--bs-info-rgb), 0.15);
  color: var(--bs-info);
}

/* ---------- Table Cell Styling ---------- */
.table td {
  vertical-align: middle;
  font-size: 0.95rem;
}

.table thead th {
  vertical-align: middle;
}

/* ---------- Badge Styling for Status ---------- */
.badge.bg-success,
.badge.bg-secondary {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px;
  padding: 0.5em 0.75em;
}

.badge i {
  font-size: 0.9em;
}

/* ---------- Button Group Styling ---------- */
.btn-group-sm {
  gap: 0.25rem;
}

.btn-outline-primary:hover,
.btn-outline-danger:hover {
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}

/* ---------- Modal Styling ---------- */
.modal-header {
  background-color: var(--bs-light);
  padding: 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 2rem;
  background-color: white;
}

.modal-footer {
  padding: 1.5rem;
  background-color: var(--bs-light);
}

/* ---------- Form Section Headers ---------- */
.modal-body h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bs-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-body h6 i {
  margin-right: 0.5rem;
  color: var(--bs-primary);
}

/* ---------- Success Message ---------- */
.alert-success {
  background-color: rgba(var(--bs-success-rgb), 0.1);
  border-color: rgba(var(--bs-success-rgb), 0.3);
  color: var(--bs-success);
}

.alert-success i {
  font-size: 1.1em;
}

/* ---------- Error Message ---------- */
.alert-danger {
  background-color: rgba(var(--bs-danger-rgb), 0.1);
  border-color: rgba(var(--bs-danger-rgb), 0.3);
  color: var(--bs-danger);
}

.alert-danger i {
  font-size: 1.1em;
}

/* ---------- Empty State Styling ---------- */
.text-center.py-5 {
  padding: 3rem 1rem !important;
}

.text-center.py-5 i.fa-3x {
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* ---------- Loading Indicator ---------- */
.spinner-border {
  border-width: 3px;
  width: 3rem;
  height: 3rem;
}

/* ---------- Page Header Styling ---------- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--bs-body-color);
}

.page-header p {
  color: var(--bs-secondary);
  margin-bottom: 1rem;
}

/* ---------- Statistics Row ---------- */
.row.g-4 {
  margin-bottom: 2rem;
}

.card.shadow-sm {
  border: none;
  border-radius: 12px;
}

/* ---------- Action Buttons ---------- */
.btn-lg {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover {
  background-color: var(--bs-primary);
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
  -webkit-box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
          box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
}

/* ---------- Form Input Styling ---------- */
.form-control,
.form-select {
  border-radius: 8px;
  border-color: var(--bs-border-color);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
          box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
}

/* ---------- Delete Modal Border ---------- */
.modal-content.border-danger {
  border: 2px solid var(--bs-danger) !important;
}

.modal-header.border-danger {
  border-bottom: 2px solid var(--bs-danger) !important;
}

.modal-footer.border-danger {
  border-top: 2px solid var(--bs-danger) !important;
}

/* ---------- Animation for Modal Open ---------- */
.modal.fade .modal-dialog {
  -webkit-transition: -webkit-transform 0.3s ease-out;
  transition: -webkit-transform 0.3s ease-out;
  transition: transform 0.3s ease-out;
  transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
}

.modal.show .modal-dialog {
  -webkit-transform: translateY(0);
          transform: translateY(0);
}

/* ---------- Responsive Table ---------- */
@media (max-width: 992px) {
  .table {
    font-size: 0.9rem;
  }

  .btn-group-sm {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 0.5rem;
  }

  .btn-group-sm > .btn {
    width: 100%;
  }
}

/* ---------- Mobile Optimizations ---------- */
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .table {
    font-size: 0.85rem;
  }

  .modal-dialog {
    margin: 0.5rem !important;
  }

  .btn-lg {
    width: 100%;
    padding: 0.6rem 1rem;
  }
}

/* ---------- Hover Effects ---------- */
.card:hover {
  -webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
          box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

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

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

/* ---------- Text Styling ---------- */
.text-muted {
  font-size: 0.9rem;
}

code {
  background-color: rgba(var(--bs-secondary-rgb), 0.1);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  color: var(--bs-secondary);
  font-weight: 500;
}

/* ---------- Fieldset Styling ---------- */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

fieldset legend {
  float: none;
  margin-bottom: 1rem;
}

/* ===================================
   Dashboard Page - Styles
   =================================== */

/* ---------- Dashboard Cards ---------- */
.dashboard-card {
  border-radius: 16px;
  overflow: hidden;
}

.dashboard-card:hover {
  -webkit-transform: translateY(-4px);
          transform: translateY(-4px);
  -webkit-box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
          box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

.dashboard-card .card-body {
  padding: 1.5rem;
}

.dashboard-card h2 {
  font-size: 2.25rem;
  color: var(--bs-body-color);
}

/* ---------- Dashboard Stat Icon ---------- */
.dashboard-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 1.5rem;
}

/* ---------- Progress Bars ---------- */
.progress {
  border-radius: 4px;
  background-color: rgba(var(--bs-secondary-rgb), 0.1);
}

.progress-bar {
  border-radius: 4px;
  -webkit-transition: width 0.6s ease;
  transition: width 0.6s ease;
}

/* ---------- Quick Access Buttons ---------- */
.btn-outline-primary.py-3,
.btn-outline-success.py-3,
.btn-outline-info.py-3,
.btn-outline-secondary.py-3 {
  border-width: 2px;
  font-weight: 500;
  border-radius: 12px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.btn-outline-primary.py-3:hover {
  -webkit-transform: translateY(-3px);
          transform: translateY(-3px);
  -webkit-box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), 0.25);
          box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), 0.25);
}

.btn-outline-success.py-3:hover {
  -webkit-transform: translateY(-3px);
          transform: translateY(-3px);
  -webkit-box-shadow: 0 6px 16px rgba(var(--bs-success-rgb), 0.25);
          box-shadow: 0 6px 16px rgba(var(--bs-success-rgb), 0.25);
}

.btn-outline-info.py-3:hover {
  -webkit-transform: translateY(-3px);
          transform: translateY(-3px);
  -webkit-box-shadow: 0 6px 16px rgba(var(--bs-info-rgb), 0.25);
          box-shadow: 0 6px 16px rgba(var(--bs-info-rgb), 0.25);
}

.btn-outline-secondary.py-3:hover {
  -webkit-transform: translateY(-3px);
          transform: translateY(-3px);
  -webkit-box-shadow: 0 6px 16px rgba(var(--bs-secondary-rgb), 0.25);
          box-shadow: 0 6px 16px rgba(var(--bs-secondary-rgb), 0.25);
}

/* ---------- Subtle Badges ---------- */
.bg-primary-subtle {
  background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.bg-success-subtle {
  background-color: rgba(var(--bs-success-rgb), 0.15) !important;
}

.bg-warning-subtle {
  background-color: rgba(var(--bs-warning-rgb), 0.15) !important;
}

.bg-info-subtle {
  background-color: rgba(var(--bs-info-rgb), 0.15) !important;
}

/* ---------- Dashboard Responsive ---------- */
@media (max-width: 1200px) {
  .dashboard-card h2 {
    font-size: 1.75rem;
  }
  
  .dashboard-card .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .dashboard-card h2 {
    font-size: 1.5rem;
  }
  
  .dashboard-card .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  
  .dashboard-card .card-body {
    padding: 1rem;
  }
}

@media (min-width: 992px) {

.style1 {
    width: 100px;
  }
}
