/* Profile Improved CSS - Better visibility and modern design */

:root {
  --navy-deep: #001d3a;
  --navy-mid: #003f73;
  --navy-light: #0056a3;
  --gain-dark: #16703a;
  --gain-mid: #28a745;
  --text-primary: #1d2733;
  --text-muted: #6c757d;
  --border-light: #dee2e6;
  --bg-light: #f7f8fa;
}

.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ═══════════════════════════════════════════════════════════
   PROFILE CARD STYLING
   ═══════════════════════════════════════════════════════════ */

.profile-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Card Header */
.card-header-improved {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.card-title-improved {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.card-title-improved i {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Card Body */
.card-body-improved {
  padding: 24px 20px;
}

/* ═══════════════════════════════════════════════════════════
   INFO GRID LAYOUT (Company Overview, Contact)
   ═══════════════════════════════════════════════════════════ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.info-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  word-break: break-word;
  line-height: 1.5;
}

.info-value.fw-bold {
  font-weight: 700;
  color: var(--navy-mid);
}

.info-value.mono {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.text-link {
  color: var(--navy-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.text-link:hover {
  color: var(--navy-mid);
  border-bottom-color: var(--navy-light);
}

.text-link i {
  margin-left: 4px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.info-contact {
  background: var(--bg-light);
  padding: 16px;
  border-radius: 6px;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: -24px;
  padding-left: 20px;
  padding-right: 20px;
}

/* ═══════════════════════════════════════════════════════════
   METRICS GRID LAYOUT (Liquidity, Sales, Profitability, etc.)
   ═══════════════════════════════════════════════════════════ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.metric-item {
  padding: 16px;
  background: var(--bg-light);
  border-radius: 6px;
  border-left: 4px solid var(--navy-mid);
  transition: all 0.2s ease;
}

.metric-item:hover {
  background: #eff3f7;
  transform: translateX(4px);
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.metric-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.badge-rating {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
  color: #ffffff;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════ */

/* Tablet: 768px - 991px */
@media (max-width: 991px) {
  .info-grid,
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }

  .card-body-improved {
    padding: 16px 16px;
  }

  .card-header-improved {
    padding: 12px 16px;
  }

  .card-title-improved {
    font-size: 1rem;
  }

  .metric-item {
    padding: 12px;
  }

  .metric-value {
    font-size: 1.1rem;
  }

  .info-value {
    font-size: 0.95rem;
  }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
  .profile-container {
    padding: 0 10px;
  }

  .profile-card {
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .card-header-improved {
    padding: 12px 14px;
  }

  .card-title-improved {
    font-size: 0.95rem;
    gap: 8px;
  }

  .card-title-improved i {
    font-size: 1rem;
  }

  .card-body-improved {
    padding: 14px 12px;
  }

  .info-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric-item {
    padding: 10px 12px;
    border-left-width: 3px;
  }

  .metric-value {
    font-size: 1.1rem;
  }

  .metric-label {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .info-value {
    font-size: 0.9rem;
  }

  .info-label {
    font-size: 0.7rem;
  }

  .badge-rating {
    font-size: 0.9rem;
    padding: 4px 10px;
  }

  .info-contact {
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -14px;
    padding: 12px 12px;
  }

  .row {
    margin: 0 -5px;
  }

  .col-lg-6 {
    padding: 5px;
  }
}

/* Small phones: < 480px */
@media (max-width: 479px) {
  .info-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .card-title-improved {
    font-size: 0.9rem;
  }

  .metric-value {
    font-size: 1rem;
  }

  .info-value {
    font-size: 0.85rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */

.border-top {
  border-top: 1px solid var(--border-light) !important;
}

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

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

.mb-2 {
  margin-bottom: 0.5rem !important;
}

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

/* Print Styles */
@media print {
  .profile-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #999;
  }

  .card-header-improved {
    background: #f0f0f0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
