/* ── Companies Index ──────────────────────────────────────────────────────── */

.ci-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .ci-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .ci-grid { grid-template-columns: 1fr; }
}

.ci-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-left: 4px solid #1a3a5c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}

.ci-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.ci-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef4fb;
    color: #1a3a5c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.ci-card-body {
    flex: 1;
    min-width: 0;
}

.ci-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ci-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-meta-item i {
    font-size: 12px;
    flex-shrink: 0;
    color: #bbb;
}

.ci-card-arrow {
    font-size: 18px;
    color: #ccc;
    flex-shrink: 0;
    transition: color 0.15s;
}

.ci-card:hover .ci-card-arrow { color: #1a3a5c; }

/* ── Detail value (used in Details page) ────────────────────────────────── */

.ci-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    padding: 4px 0;
}

.ci-detail-value a {
    color: #1a3a5c;
    text-decoration: none;
}

.ci-detail-value a:hover { text-decoration: underline; }

/* ── Dark mode ───────────────────────────────────────────────────────────── */

[data-theme="dark"] .ci-card {
    background: #1e1e2e;
    border-color: #2d2d4e;
    border-left-color: #2d6ea8;
}

[data-theme="dark"] .ci-card-icon {
    background: #1e2a3a;
    color: #7aabf0;
}

[data-theme="dark"] .ci-card-name { color: #e0e0e8; }
[data-theme="dark"] .ci-meta-item { color: #666; }
[data-theme="dark"] .ci-meta-item i { color: #444; }
[data-theme="dark"] .ci-card-arrow { color: #444; }
[data-theme="dark"] .ci-card:hover .ci-card-arrow { color: #7aabf0; }

[data-theme="dark"] .ci-detail-value { color: #c0c0d8; }
[data-theme="dark"] .ci-detail-value a { color: #7aabf0; }

/* ── Contact Person Cards (Details page) ─────────────────────────────────── */

.ci-persons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.ci-person-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s;
}

.ci-person-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.ci-person-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ci-person-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef4fb;
    color: #1a3a5c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.ci-person-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.ci-person-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ci-person-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.ci-person-action-btn:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

.ci-person-action-btn.danger:hover {
    background: #fff0f0;
    color: #e53935;
    border-color: #f9a8a8;
}

.ci-person-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ci-person-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #666;
}

.ci-person-meta-row i {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
}

.ci-person-meta-row a {
    color: #1a3a5c;
    text-decoration: none;
}

.ci-person-meta-row a:hover { text-decoration: underline; }

.ci-person-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}

.ci-person-project-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef4fb;
    color: #1a3a5c;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-person-project-chip:hover {
    background: #d8eaf8;
    color: #1a3a5c;
    text-decoration: none;
}

.ci-person-project-chip i {
    font-size: 10px;
    flex-shrink: 0;
}

.ci-person-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #aaa;
    gap: 8px;
}

.ci-person-empty i { font-size: 36px; }
.ci-person-empty span { font-size: 14px; }

/* ── Details info layout ─────────────────────────────────────────────────── */

.ci-details-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
}

.ci-details-layout-single {
    /* no map — single column */
}

.ci-details-map-panel {
    border-left: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.ci-details-map-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #f0f0f0;
    background: #f9fbfd;
}

.ci-details-map-body {
    flex: 1;
    min-height: 260px;
    position: relative;
}

/* ── Dark mode for person cards ──────────────────────────────────────────── */

[data-theme="dark"] .ci-person-card {
    background: #1e1e2e;
    border-color: #2d2d4e;
}

[data-theme="dark"] .ci-person-avatar {
    background: #1e2a3a;
    color: #7aabf0;
}

[data-theme="dark"] .ci-person-name { color: #e0e0e8; }
[data-theme="dark"] .ci-person-meta-row { color: #888; }
[data-theme="dark"] .ci-person-meta-row i { color: #555; }
[data-theme="dark"] .ci-person-meta-row a { color: #7aabf0; }
[data-theme="dark"] .ci-person-projects { border-top-color: #2d2d4e; }
[data-theme="dark"] .ci-person-project-chip { background: #1e2a3a; color: #7aabf0; }
[data-theme="dark"] .ci-person-project-chip:hover { background: #243650; }
[data-theme="dark"] .ci-person-action-btn { background: #1e1e2e; border-color: #3a3a5a; color: #888; }
[data-theme="dark"] .ci-person-action-btn:hover { background: #2a2a3e; color: #ccc; }
[data-theme="dark"] .ci-person-action-btn.danger:hover { background: #3a1a1a; color: #f87171; border-color: #7a2a2a; }
[data-theme="dark"] .ci-details-map-panel { border-left-color: #2d2d4e; }
[data-theme="dark"] .ci-details-map-header { background: #181826; color: #7aabf0; border-bottom-color: #2d2d4e; }
[data-theme="dark"] .ci-person-empty { color: #444; }
