:root {
    --ng-red: #D82F36;
    --ng-red-dark: #b82630;
    --ng-dark: #1a1a2e;
    --ng-gray: #384951;
}

body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

.navbar-header {
    background-color: var(--ng-red);
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-header .navbar-brand {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== Section Headers ===== */
.section-header {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    color: var(--ng-dark);
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--ng-red);
}

/* ===== Profile Cards ===== */
.profile-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
}

.profile-card-header:hover {
    background-color: rgba(216, 47, 54, 0.03);
}

.profile-phone {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ng-dark);
}

.profile-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-card-body {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.82rem;
}

.detail-label {
    color: #888;
    font-weight: 500;
}

.detail-value {
    color: #333;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* ===== Call Cards ===== */
.call-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.call-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
}

.call-card-main {
    flex: 1;
    min-width: 0;
}

.call-phone {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ng-dark);
}

.call-meta {
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-caps {
    font-size: 0.75rem;
}

.call-actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.call-action-btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.badge.bg-outline-cap {
    border: 1px solid #adb5bd;
    color: #555;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 500;
}

/* ===== Ended Calls ===== */
.ended-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ended-card {
    background: #fff;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.ended-card-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ended-phone {
    font-weight: 500;
    color: var(--ng-dark);
}

/* ===== Empty State ===== */
.empty-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 2rem 1rem;
    text-align: center;
    color: #adb5bd;
}

.empty-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* ===== Buttons ===== */
.btn-ng-red {
    background-color: var(--ng-red);
    border-color: var(--ng-red);
    color: #fff;
}

.btn-ng-red:hover {
    background-color: var(--ng-red-dark);
    border-color: var(--ng-red-dark);
    color: #fff;
}

.btn-outline-ng-red {
    border-color: var(--ng-red);
    color: var(--ng-red);
}

.btn-outline-ng-red:hover {
    background-color: var(--ng-red);
    color: #fff;
}

/* ===== Modals ===== */
.modal-header {
    background-color: var(--ng-dark);
    color: #fff;
    border-bottom: 3px solid var(--ng-red);
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-header h5 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ===== Forms ===== */
.form-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.2rem;
}

.form-control, .form-select {
    font-size: 0.85rem;
    border-radius: 5px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ng-red);
    box-shadow: 0 0 0 0.2rem rgba(216, 47, 54, 0.15);
}

.form-check-input:checked {
    background-color: var(--ng-red);
    border-color: var(--ng-red);
}

.form-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ng-gray);
    padding-bottom: 0.3rem;
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

/* ===== General ===== */
code {
    font-size: 0.82rem;
    color: var(--ng-red-dark);
    background-color: rgba(216, 47, 54, 0.06);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
}

.badge {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.3em 0.55em;
    border-radius: 4px;
}

/* ===== Mobile-first responsive ===== */
@media (max-width: 576px) {
    .call-action-btn {
        font-size: 0.82rem;
        padding: 0.55rem 0.5rem;
    }

    .profile-actions {
        justify-content: flex-end;
    }
}

@media (min-width: 768px) {
    .call-list, .profile-list {
        max-width: 640px;
    }

    .ended-list {
        max-width: 640px;
    }
}
