html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

/* Focus ring */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html { position: relative; min-height: 100%; }
body { margin-bottom: 60px; }

/* ===== TABLE HOVER ===== */
.table tbody tr:hover {
    background-color: #EAF2FB !important;
    transition: background-color 0.15s ease-in-out;
}

/* ===== STAR RATING ===== */
.star-rating { display: flex; gap: 4px; cursor: pointer; }
.star-rating i { font-size: 1.1rem; color: #C8D6E5; transition: color 0.2s ease; }
.star-rating i.active { color: #003E7E; }
.star-rating i:hover  { color: #5B8CCB; }

/* ===== SECTION CARD ===== */
.section-card {
    border: 1px solid #E5EDF7;
    background-color: #FFFFFF;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.section-card:hover {
    background-color: #F7FAFE;
    border-color: #D4E2F2;
    box-shadow: 0 6px 18px rgba(0, 47, 108, 0.08);
}
/* Left accent line on hover */
.section-card::before {
    content: ""; position: absolute; left: 0; top: 0;
    height: 100%; width: 0;
    background-color: #003E7E;
    transition: width 0.2s ease;
}
.section-card:hover::before { width: 4px; }

/* ===== PERFORMANCE / COREVALUE ITEMS ===== */
.performance-item,
.corevalue-item {
    border: 1px solid #E9F1FA;
    background-color: #FAFCFF;
    border-radius: 6px;
    padding: 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.performance-item:hover,
.corevalue-item:hover {
    background-color: #F1F6FD;
    border-color: #C9DBEF;
}
.performance-item { position: relative; }

/* ===== COLLAPSIBLE HEADER ===== */
.performance-header {
    padding: 10px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}
.performance-header:hover { background-color: #F1F6FD; }

/* ===== CHEVRON TOGGLE ===== */
.toggle-icon { transition: transform 0.25s ease; }
.collapse.show + .toggle-icon { transform: rotate(180deg); }
.toggle-icon.rotate { transform: rotate(180deg); }

/* ===== INLINE EDIT INPUT ===== */
.priority-input { background-color: transparent; padding: 6px 8px; }
.priority-input:focus { background-color: #F5F9FE; box-shadow: none; border-radius: 4px; }

/* ===== TOOLTIP WIDTH ===== */
.tooltip-inner { max-width: 500px; text-align: left; white-space: normal; }

/* ===== READONLY INPUTS ===== */
input[readonly], textarea[readonly] { background-color: #e9ecef; cursor: not-allowed; }

/* ===== MODERN TEXTAREA ===== */
.modern-textarea { border-radius: 8px; transition: border-color 0.2s ease, box-shadow 0.2s ease; resize: vertical; }
.modern-textarea:focus { border-color: #9FC5F8; box-shadow: 0 0 0 0.15rem rgba(159,197,248,0.25); }

/* ===== BULLET ICON BUTTON ===== */
.btn-icon-bullet {
    background: transparent; border: none; color: #6C757D;
    padding: 4px 6px; border-radius: 6px;
    transition: all 0.18s ease; font-size: 0.95rem;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-icon-bullet i { transition: transform 0.18s ease, color 0.18s ease; }
.btn-icon-bullet:hover { background-color: #EEF4FB; color: #003E7E; }
.btn-icon-bullet:hover i { transform: translateY(-2px) scale(1.08); color: #003E7E; }
.btn-icon-bullet:active i { transform: translateY(0) scale(0.95); }

/* ===== LEADER RATING CONTAINER ===== */
.leader-rating-container { transition: opacity 0.2s ease; }

/* ===== PRIMARY BUTTON ===== */
.btn-primary {
    background-color: #002F6C; border-color: #002F6C;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background-color: #003E7E; border-color: #003E7E;
    transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,47,108,0.2);
}
.btn-primary:active { background-color: #001F4A; border-color: #001F4A; transform: translateY(0); box-shadow: none; }

/* ===== OUTLINE PRIMARY BUTTON ===== */
.btn-outline-primary { color: #002F6C; border-color: #002F6C; transition: all 0.2s ease; }
.btn-outline-primary:hover {
    background-color: #002F6C; border-color: #002F6C; color: #fff;
    transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,47,108,0.2);
}
.btn-outline-primary:active { background-color: #001F4A; border-color: #001F4A; transform: translateY(0); box-shadow: none; }

/* ===== DISABLED ===== */
.btn-primary:disabled, .btn-outline-primary:disabled { opacity: 0.5; pointer-events: none; box-shadow: none; }

/* ===== PERFORMANCE PREMIUM SWEEP (new-item animation) ===== */
.performance-premium-in { position: relative; }
.performance-premium-in::after {
    content: ""; position: absolute; inset: 0; border-radius: 12px;
    background: linear-gradient(120deg, transparent 0%, rgba(0,47,108,0.08) 40%,
                rgba(0,47,108,0.15) 50%, rgba(0,47,108,0.08) 60%, transparent 100%);
    opacity: 0; pointer-events: none;
    animation: premiumSweep 0.9s ease forwards;
}
@keyframes premiumSweep {
    0%   { opacity: 0; transform: translateX(-40%); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(40%); }
}

/* ===== NEW-ITEM BADGE ===== */
.performance-badge {
    position: absolute; top: 12px; right: 48px;
    background: rgba(0,47,108,0.08); color: #002F6C;
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
    border-radius: 999px; opacity: 0;
    transform: translateY(-6px); pointer-events: none;
}
.performance-premium-in .performance-badge { animation: badgeFadeIn 0.4s ease forwards; }
@keyframes badgeFadeIn  { to { opacity: 1; transform: translateY(0); } }
.performance-badge.fade-out { animation: badgeFadeOut 0.6s ease forwards; }
@keyframes badgeFadeOut { to { opacity: 0; transform: translateY(-6px); } }

/* ===== PERFORMANCE ROW SEPARATOR ===== */
.performance-row { padding-bottom: 10px; border-bottom: 1px solid #F1F3F5; }
.performance-row:last-child { border-bottom: none; }

/* ===== FALL ANIMATION (particles) ===== */
@keyframes fall { to { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* ===== BOOTSTRAP was-validated FOCUS OVERRIDE =====
   The custom focus ring above would otherwise mask Bootstrap's red invalid-focus state. */
.was-validated .form-control:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25);
}
