/* ===========================================
 * Xem Ngày Cắt Tóc
 * Prefix: .xnct-*
 * Style: hiện đại, sạch — đồng bộ với xem-tuoi.css
 * =========================================== */

.xnct-wrap {
    max-width: 1180px;
    margin: 32px auto;
    font-family: var(--tvq-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    color: #2c1810;
    line-height: 1.6;
}

/* ============================================
 * FORM
 * ============================================ */
.xnct-form {
    background: #fff;
    border: 1px solid #d4a865;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.12);
}

.xnct-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #7b1414;
    border-bottom: 2px solid #d4a865;
    padding-bottom: 8px;
}

.xnct-intro {
    margin: 0 0 20px;
    font-size: 14px;
    color: #5a4a3a;
}

.xnct-form fieldset {
    border: 1px solid #e6d4ad;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 18px;
}

.xnct-form legend {
    font-weight: 600;
    color: #7b1414;
    padding: 0 8px;
    font-size: 14px;
}

.xnct-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.xnct-grid-3 {
    grid-template-columns: 1.2fr 1fr 1fr;
}

@media (max-width: 720px) {
    .xnct-grid, .xnct-grid-3 {
        grid-template-columns: 1fr;
    }
}

.xnct-field {
    display: flex;
    flex-direction: column;
}

.xnct-label {
    font-weight: 600;
    font-size: 13px;
    color: #5a4a3a;
    margin-bottom: 6px;
}

.xnct-input, .xnct-select {
    padding: 8px 12px;
    border: 1px solid #d4a865;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #2c1810;
}

.xnct-input:focus, .xnct-select:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

.xnct-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 18px;
    font-size: 14px;
    cursor: pointer;
}

.xnct-radio input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.xnct-radio-inline {
    padding-top: 8px;
}

.xnct-submit {
    background: #7b1414;
    color: #fff;
    border: none;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.xnct-submit:hover {
    background: #5c0f0f;
}

.xnct-error {
    background: #fdecea;
    border: 1px solid #f5c6c2;
    color: #7b1414;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 20px 0;
}

/* ============================================
 * RESULT
 * ============================================ */
.xnct-result {
    margin-top: 28px;
}

.xnct-result-title {
    color: #7b1414;
    font-size: 20px;
    border-bottom: 2px solid #d4a865;
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.xnct-section {
    background: #fff;
    border: 1px solid #e6d4ad;
    border-left: 4px solid #7b1414;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 22px;
}

.xnct-section-title {
    margin: 0 0 14px;
    color: #7b1414;
    font-size: 17px;
    font-weight: 700;
}

.xnct-overall-insight {
    font-size: 15.5px;
    line-height: 1.7;
    color: #3a2e22;
    background: #fffaf0;
    padding: 14px 16px;
    border-left: 3px solid #d4a865;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* ============================================
 * STATS (Phần 1)
 * ============================================ */
.xnct-stats {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

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

.xnct-stat {
    text-align: center;
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid #e6d4ad;
}

.xnct-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.xnct-stat-label {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    color: #5a4a3a;
}

.xnct-stat-daicat  { background: #e8f5e9; border-color: #81c784; }
.xnct-stat-daicat .xnct-stat-num  { color: #1b5e20; }
.xnct-stat-cat     { background: #f1f8e9; border-color: #aed581; }
.xnct-stat-cat .xnct-stat-num     { color: #33691e; }
.xnct-stat-binh    { background: #fafafa; border-color: #bdbdbd; }
.xnct-stat-binh .xnct-stat-num    { color: #424242; }
.xnct-stat-hung    { background: #fff8e1; border-color: #ffd54f; }
.xnct-stat-hung .xnct-stat-num    { color: #e65100; }
.xnct-stat-daihung { background: #ffebee; border-color: #ef9a9a; }
.xnct-stat-daihung .xnct-stat-num { color: #b71c1c; }

.xnct-taboo-list {
    font-size: 14px;
    color: #b71c1c;
    background: #ffebee;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #ef5350;
}

/* ============================================
 * TOP 5
 * ============================================ */
.xnct-top-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: xnct-top;
}

.xnct-top-item {
    background: #fffaf0;
    border: 1px solid #e6d4ad;
    border-left: 4px solid #d4a865;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 14px;
}

.xnct-top-1 { border-left-color: #7b1414; background: #fff5f5; }
.xnct-top-2 { border-left-color: #b8860b; }
.xnct-top-3 { border-left-color: #d4a865; }

.xnct-top-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.xnct-top-rank {
    background: #7b1414;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.xnct-top-date {
    flex: 1;
    min-width: 200px;
}

.xnct-top-date strong {
    color: #7b1414;
    font-size: 16px;
}

.xnct-top-date small {
    display: block;
    color: #5a4a3a;
    margin-top: 2px;
}

.xnct-top-score {
    background: #b8860b;
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.xnct-top-reason {
    margin: 8px 0;
    font-size: 14px;
    color: #3a2e22;
}

.xnct-top-detail {
    margin: 6px 0 12px;
    font-size: 13px;
    color: #5a4a3a;
    font-style: italic;
}

.xnct-top-hours {
    background: #fff;
    border: 1px dashed #d4a865;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 10px;
}

.xnct-top-hours > strong {
    color: #7b1414;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

.xnct-hour-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xnct-hour-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    padding: 4px 0;
    flex-wrap: wrap;
}

.xnct-hour-range {
    font-weight: 700;
    color: #7b1414;
    min-width: 70px;
}

.xnct-hour-branch {
    color: #3a2e22;
}

.xnct-hour-star {
    color: #5a4a3a;
    font-style: italic;
}

.xnct-hour-badge {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================
 * TABLE (Phần 3)
 * ============================================ */
.xnct-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}

.xnct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 920px;
}

.xnct-table th {
    background: #7b1414;
    color: #fff;
    text-align: center;
    padding: 8px 6px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.xnct-table td {
    border: 1px solid #e6d4ad;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
}

.xnct-cell-day {
    background: #fffaf0;
}

.xnct-cell-day strong {
    color: #7b1414;
    font-size: 15px;
}

.xnct-cell-day small {
    color: #5a4a3a;
}

.xnct-cell-score strong {
    color: #7b1414;
    font-size: 14px;
}

.xnct-cell-hours small {
    color: #3a2e22;
    font-weight: 500;
}

.xnct-good {
    color: #1b5e20;
}

.xnct-bad {
    color: #b71c1c;
}

/* Row coloring by level */
.xnct-row-dai-cat    { background: #f1f8e9; }
.xnct-row-trung-cat  { background: #f9fbe7; }
.xnct-row-binh       { background: #fafafa; }
.xnct-row-trung-hung { background: #fff8e1; }
.xnct-row-dai-hung   { background: #ffebee; }

/* 28 Tú cell coloring */
.xnct-cell-tu strong {
    font-size: 14px;
}

.xnct-tu-dai-cat   { background: #c8e6c9 !important; }
.xnct-tu-dai-cat strong   { color: #1b5e20; }
.xnct-tu-cat       { background: #dcedc8 !important; }
.xnct-tu-cat strong       { color: #33691e; }
.xnct-tu-binh      { /* keep row color */ }
.xnct-tu-hung      { background: #ffe0b2 !important; }
.xnct-tu-hung strong      { color: #e65100; }
.xnct-tu-dai-hung  { background: #ffcdd2 !important; }
.xnct-tu-dai-hung strong  { color: #b71c1c; }

.xnct-table-note {
    margin-top: 12px;
    font-size: 12px;
    color: #5a4a3a;
    background: #fffaf0;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #d4a865;
}

/* ============================================
 * Citation block — reuse xtvc-citation-block format
 * ============================================ */
.xnct-section .xtvc-citation-block {
    margin-top: 20px;
    padding: 14px 16px;
    background: #fffaf0;
    border-left: 3px solid #b8860b;
    border-radius: 4px;
    font-size: 14.5px;
    line-height: 1.7;
    color: #3a2e22;
}
