:root {
    --coral: #FF6B47;
    --coral-hover: #ff5533;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light-bg: #f8f9fa;
}

body {
    background-color: var(--light-bg);
    /* Font-family now defined in fonts.css for proper Poppins implementation */
}

/* Header */
.ms-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.brand-title {
    color: var(--coral);
    font-weight: 700;
    font-size: 2rem;
}

/* Action Bar */
.btn-primary {
    background-color: var(--coral);
    border-color: var(--coral);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--coral-hover);
    border-color: var(--coral-hover);
}

/* Cache Indicator */
#cacheIndicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.813rem;
}

#cacheIndicator i {
    color: #856404;
}

/* Metrics Cards */
.metric-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #6c757d;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.metric-card.clickable {
    cursor: pointer;
    user-select: none;
}

.metric-card.clickable:active {
    transform: translateY(0);
}

.metric-card.active {
    box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.3);
    border-left-width: 6px;
}

.metric-card.metric-success {
    border-left-color: var(--success);
}

.metric-card.metric-warning {
    border-left-color: var(--warning);
}

.metric-card.metric-danger {
    border-left-color: var(--danger);
}

.metric-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
}

/* Activity Log */
.activity-log-container {
    margin-bottom: 1.5rem;
}

.activity-log {
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.log-timestamp {
    color: #6c757d;
    margin-right: 0.5rem;
}

.log-entry.error {
    color: var(--danger);
}

.log-entry.success {
    color: var(--success);
}

.log-entry.info {
    color: var(--info);
}

/* Results Table */
.results-container {
    margin-top: 1.5rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: #495057;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
}

.table th.sortable:hover {
    background-color: #e9ecef;
}

.table th.sortable i {
    font-size: 0.75rem;
    opacity: 0.5;
}

.table th.sorted-asc i::before {
    content: "\f282";
}

.table th.sorted-desc i::before {
    content: "\f286";
}

/* Zebra striping with severity borders - reduced vertical padding */
.table tbody tr.main-row {
    border-left: 4px solid transparent;
    transition: background-color 0.15s ease;
}

.table tbody tr.main-row td {
    padding: 0.5rem 0.75rem; /* Reduced from default Bootstrap padding */
}

.table tbody tr.main-row:nth-child(even) {
    background-color: #f8f9fa;
}

.table tbody tr.main-row:hover {
    background-color: #e9ecef !important;
}

.table tbody tr.main-row[data-severity="Critical"] {
    border-left-color: var(--danger);
}

.table tbody tr.main-row[data-severity="Needs Attention"] {
    border-left-color: var(--warning);
}

.table tbody tr.main-row[data-severity="Healthy"],
.table tbody tr.main-row[data-severity="OVERRIDE"] {
    border-left-color: var(--success);
}

.table tbody tr.row-hidden {
    display: none;
}

/* Expanded Details Row */
.expanded-detail {
    background-color: #f0f3f5; /* Light background for expanded row */
    border-bottom: 1px solid #dee2e6;
}

.expanded-content-wrapper {
    padding: 1.25rem;
    border-top: 1px solid #e9ecef;
}

.detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.detail-section:last-of-type {
    border-bottom: none;
}

.detail-section-header {
    color: #495057;
    font-weight: 700; /* Increased weight for section headers */
    margin-bottom: 0.75rem;
    font-size: 0.95rem; /* Slightly larger */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-checks {
    padding-left: 1.25rem;
    font-size: 0.8rem; /* Reduced from 0.875rem */
    color: #6c757d;
}

.detail-checks li {
    margin-bottom: 0.4rem; /* Reduced from 0.5rem */
    display: flex;
    align-items: center;
}

.detail-checks li strong {
    color: #212529;
    margin-right: 0.5rem;
}

/* Severity Badges - Bold and Dominant */
.severity-badge {
    font-size: 0.95rem; /* Larger */
    text-transform: uppercase;
    font-weight: 700; /* Bolder */
    padding: 0.5rem 0.85rem; /* More padding */
    letter-spacing: 0.5px;
}

.severity-Critical {
    background-color: var(--danger);
}

.severity-Needs.Attention {
    background-color: var(--warning);
    color: #212529;
}

.severity-Healthy {
    background-color: var(--success);
}

.severity-OVERRIDE {
    background-color: #6c757d;
}

.override-tag {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
    margin-left: 0.25rem;
    text-transform: none;
}

/* Compact Pill Badges for Copy/Asset/Tracking Status */
.badge-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
}

.badge-pill-success {
    background-color: var(--success);
    color: white;
}

.badge-pill-warning {
    background-color: var(--warning);
    color: #212529;
}

.badge-pill-danger {
    background-color: var(--danger);
    color: white;
}

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

/* General Badges */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
}

/* Copy button styling */
.copy-btn {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: none;
}

.copy-btn:hover {
    color: var(--coral);
}

.offer-id-code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Offer title with popover (removed as per new design) */
.offer-title {
    cursor: default; /* No popover */
}

.offer-title:hover {
    text-decoration: none; /* No underline on hover */
}

/* Utility */
.text-break {
    word-break: break-word;
}

/* Override Form Styling */
.override-form {
    margin-top: 1rem;
}

.override-form .card {
    border: 1px solid #dee2e6;
    background-color: #fff;
}

.override-form .card-body {
    padding: 1rem;
}

.override-info {
    padding: 0.5rem 0.75rem;
    background-color: #e7f3ff;
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
}

/* =================================
   POPPINS TYPOGRAPHY ENHANCEMENTS
   ================================= */

/* Enhanced number rendering for metrics */
.metric-value {
    font-feature-settings: 'tnum' 1; /* Tabular numbers */
    font-variant-numeric: tabular-nums;
}

/* Improved readability for long text */
.text-break {
    word-break: break-word;
    hyphens: auto;
}

/* Better line height for Poppins */
p, .form-text, .card-text {
    line-height: 1.6;
}

/* Optimized heading scale for Poppins */
h1, .h1 { font-size: 2rem; line-height: 1.2; }
h2, .h2 { font-size: 1.75rem; line-height: 1.3; }
h3, .h3 { font-size: 1.5rem; line-height: 1.3; }
h4, .h4 { font-size: 1.25rem; line-height: 1.4; }
h5, .h5 { font-size: 1.125rem; line-height: 1.4; }
h6, .h6 { font-size: 1rem; line-height: 1.5; }

/* Professional button typography */
.btn {
    text-transform: none;
    letter-spacing: 0.025em;
}

/* Enhanced table typography */
table {
    font-variant-numeric: tabular-nums;
}

/* Refined badge appearance */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    letter-spacing: 0.03em;
}

/* Card refinements */
.card-header {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Form label improvements */
.form-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Enhanced link styling */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Professional tooltips */
.tooltip-inner {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    letter-spacing: 0.01em;
}

/* Improved code blocks */
code {
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    letter-spacing: -0.01em;
}

/* Enhanced severity badges with Poppins */
.severity-CRITICAL,
.severity-HIGH {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-WARNING,
.severity-MEDIUM {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.severity-LOW,
.severity-PASS {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Responsive typography for mobile */
@media (max-width: 768px) {
    .brand-title {
        font-size: 1.5rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
    
    .metric-label {
        font-size: 0.7rem;
    }
}

/* Print optimization */
@media print {
    body {
        font-size: 11pt;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4, h5, h6 { font-size: 12pt; }
}
