/* Integrated Style - Combining Trade Design with Web Functionality */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700;800&display=swap");

/* Base styles from Trade folder */
* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

body {
  font-size: 13px;
  background: #f0f0f0;
  letter-spacing: 0.3px;
  overflow-x: hidden;
  min-height: 100vh;
}

p {
  font-size: 13px;
  margin: 0;
}

/* Main body structure */
.main-body {
  width: 100%;
  min-height: 100vh;
  overflow: auto;
}

.main-body .card {
  border: none;
}

.main-body .card .card-header {
  display: inline;
  font-size: 22px;
  font-weight: bolder;
  background: #fff;
  text-align: center;
  color: #000000;
  border: none;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
}

/* Header styles from Trade */
.main-body header {
  border-bottom: 1px solid #cae5ff;
  position: relative;
}

.main-body header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(173deg, rgb(222, 241, 255) 0%, rgb(232, 255, 233) 100%);
}

.main-body header .top {
  display: flex;
  justify-content: space-between;
  position: relative;
  background: #10635a;
  padding: 0;
}

@media (max-width: 768px) {
  .main-body header .top {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
  }
}

.main-body header .top .d_it-logo {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .main-body header .top .d_it-logo {
    display: block;
    margin-bottom: 15px;
  }
}

.main-body header .top .d_it-logo img {
  width: 130px;
  padding: 10px;
  filter: brightness(25);
}

.main-body header .top .d_it-logo span {
  font-size: 20px;
  font-weight: 700;
  border-left: 2px solid #ffffff;
  color: #ffffff;
  padding-left: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .main-body header .top .d_it-logo span {
    font-size: 14px;
  }
}

.main-body header .top .full-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-body header .top .full-right .top-right {
  display: flex;
  justify-content: space-between;
  padding: 0 10px 0 7px;
}

@media (max-width: 768px) {
  .main-body header .top .full-right .top-right {
    justify-content: center;
  }
}

/* Middle body styles */
.middle-body {
  position: relative;
}

.banner {
  background: url(../images/EV_CHARGING.jpg) no-repeat center/cover;
  height: 180px;
}

/* Container styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Page description */
.page-desc {
  font-size: 20px;
  line-height: 32px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 15px;
  text-align: center;
  margin-bottom: 20px;
}

.page-desc a {
  color: #10635a;
}

/* Page title for onboarding */
.page-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #10635a;
  margin: 30px 0 20px;
}

.page-subtitle {
  font-size: 16px;
  color: #666;
  text-align: center;
  margin-bottom: 40px;
}

/* Form styles */
.form-section {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin: 20px auto;
  max-width: 800px;
}

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

.form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #10635a;
  box-shadow: 0 0 0 0.2rem rgba(16, 99, 90, 0.25);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 120px;
}

.btn-primary {
  background: #10635a;
  color: white;
}

.btn-primary:hover {
  background: #0d5049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 99, 90, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-outline-primary {
  background: transparent;
  color: #10635a;
  border: 2px solid #10635a;
}

.btn-outline-primary:hover {
  background: #10635a;
  color: white;
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-outline-warning {
  background: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
}

.btn-outline-warning:hover {
  background: #ffc107;
  color: #212529;
}

/* Alert styles */
.alert {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  position: relative;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-info {
  background-color: #cce7ff;
  border-color: #b8daff;
  color: #004085;
}

/* Service card styles from Trade */
.service-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding: 25px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  font-size: 2rem;
  border-radius: 50%;
  transition: 0.3s;
  margin-bottom: 20px;
  background: #10635a;
  color: white;
}

/* Dashboard specific styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.credential-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e6ed;
}

.credential-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.credential-icon {
  width: 50px;
  height: 50px;
  background: #10635a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.credential-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.credential-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.credential-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* QR Code styling */
.qr-code-image {
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  padding: 10px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-code-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
}

.credential-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

.credential-details .row {
  margin-bottom: 10px;
}

.credential-details strong {
  color: #10635a;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .form-section {
    margin: 10px;
    padding: 20px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .credential-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hidden elements */
.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

/* Utility classes */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.p-3 {
  padding: 1rem !important;
}

/* Focus styles for accessibility */
button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #10635a;
  outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
