/* FirmeB2B – Company Page CSS */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #0B3C5D; --brand-dark: #094074;
  --bg: #F5F7FA; --white: #fff; --border: #E5E7EB;
  --text-dark: #111827; --text-mid: #4B5563; --text-light: #9CA3AF;
  --radius: 14px; --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
}
html { -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; background: var(--bg); color: var(--text-dark); min-height: 100vh; }

/* Header – reuse from search */
.search-header { position: sticky; top: 0; z-index: 80; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.search-header-inner { max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-icon.dark { background: var(--brand); }
.logo-text.dark-text { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--text-dark); }
.search-header-nav { display: flex; gap: 24px; }
.search-header-nav a { font-size: 13px; font-weight: 500; color: var(--text-light); text-decoration: none; transition: color .2s; }
.search-header-nav a:hover { color: var(--text-dark); }

/* Main */
.company-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }

.loading-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 20px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 13px; color: var(--text-light); }

/* Breadcrumb */
.company-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; color: var(--text-light); }
.company-breadcrumb a { color: var(--brand); text-decoration: none; font-weight: 600; transition: color .2s; }
.company-breadcrumb a:hover { color: var(--brand-dark); }

/* Header card */
.company-header-card { background: var(--brand); border-radius: 18px; padding: 28px 32px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 20px; }
.company-header-icon { width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.company-header-info h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; color: white; letter-spacing: -.02em; margin-bottom: 10px; }
.company-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.meta-item { font-size: 13px; color: rgba(255,255,255,.7); }
.meta-item strong { color: white; }

/* Status badges */
.status-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.status-activ   { color: #059669; background: #ECFDF5; }
.status-inactiv { color: #D97706; background: #FFFBEB; }
.status-radiata { color: #DC2626; background: #FEF2F2; }
.status-altul   { color: var(--text-light); background: var(--bg); }
.caen-badge { display: inline-block; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9); background: rgba(255,255,255,.15); padding: 3px 10px; border-radius: 6px; }

/* Grid */
.company-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 1024px) { .company-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .company-grid { grid-template-columns: 1fr; } .company-header-card { flex-direction: column; } }

/* Cards */
.company-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 16px; }

/* Info rows */
.info-rows { display: flex; flex-direction: column; gap: 0; }
.info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F9FAFB; }
.info-row:last-child { border-bottom: none; }
.info-row > span:first-child { font-size: 12px; color: var(--text-light); flex-shrink: 0; min-width: 100px; }
.info-row strong { font-size: 13px; font-weight: 600; color: var(--text-dark); text-align: right; word-break: break-word; }
.info-row .green { color: #059669; }
.info-row .red { color: #DC2626; }
.empty-val { font-size: 13px; color: var(--text-light); }

/* Contact links */
.contact-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s; }
.contact-link.phone { color: var(--brand); }
.contact-link.email { color: var(--brand); }
.contact-link.website { color: var(--brand); }
.contact-link:hover { color: var(--brand-dark); }

/* Empty / error */
.empty-company { text-align: center; padding: 60px 20px; }
.empty-company p { font-size: 15px; color: var(--text-mid); margin-bottom: 20px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 10px; background: var(--brand); color: white; text-decoration: none; font-size: 14px; font-weight: 600; transition: background .2s; }
.back-btn:hover { background: var(--brand-dark); }
