/* ============ 宏观数据日历 - 金十风格 ============ */
:root {
    --red: #d9463e;        /* 主色（金十红） */
    --blue: #2f6ee8;
    --gold: #f5a623;       /* 星星 */
    --bg: #f5f6f8;
    --card: #ffffff;
    --line: #ebedf0;
    --txt: #26292e;
    --txt2: #828a94;
    --today: #fff7f0;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: UKIJ Tuz Tom;}
 @font-face {
                    font-family: "UKIJ Tuz Tom";
                    src: url("https://www.ilkan.cn/wp-content/themes/ripro-v5/uyeot/UKIJTuT.woff2") format("woff2"),
                        url("https://www.ilkan.cn/wp-content/themes/ripro-v5/uyeot/UKIJTuT.woff") format("woff"),
                        url("https://www.ilkan.cn/wp-content/themes/ripro-v5/uyeot/UKIJTuT.ttf") format("truetype"),
                        url("https://www.ilkan.cn/wp-content/themes/ripro-v5/uyeot/UKIJTuT.eot") format("embedded-opentype"),
                        url("https://www.ilkan.cn/wp-content/themes/ripro-v5/uyeot/UKIJTuT.svg") format("svg");
                    font-weight: normal;
                    font-style: normal;
                }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Noto Naskh Arabic","UKIJ Tuz Tom", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--txt);
    font-size: 14px;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue); text-decoration: none; }

/* ---------- 头部 ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.brand h1 { font-size: 17px; font-weight: 700; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 12px; }
.week-range { color: var(--txt2); font-size: 13px; white-space: nowrap; }
.lang-switch {
    border: 1px solid var(--line); border-radius: 14px;
    padding: 3px 12px; font-size: 13px; color: var(--red); background: #fff;
}
.lang-switch:hover { background: #fff5f4; }

/* ---------- 提示条 ---------- */
.notice {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 14px; margin: 14px 0; color: var(--txt2); font-size: 13px;
}
.notice-star { color: var(--gold); }
.notice-sep { margin: 0 8px; color: var(--line); }

/* ---------- 日期区块 ---------- */
.day-section {
    background: var(--card); border-radius: 10px; margin-bottom: 14px;
    overflow: hidden; border: 1px solid var(--line);
}
.day-section.is-today { border-color: #f3c1bc; }
.day-head {
    display: flex; align-items: baseline; gap: 10px;
    padding: 12px 16px 8px;
}
.day-section.is-today .day-head { background: var(--today); }
.day-name { font-size: 16px; font-weight: 700; }
.day-date { color: var(--txt2); font-size: 13px; }
.today-badge {
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 4px; padding: 2px 6px; letter-spacing: .5px;
}
.back-today {
    border: 1px solid var(--red); color: var(--red);
    border-radius: 12px; padding: 2px 12px; font-size: 12px; background: #fff;
}
.back-today:hover { background: var(--red); color: #fff; }

/* ---------- 数据行（桌面表格） ---------- */
.day-table { width: 100%; }
.row {
    display: grid;
    grid-template-columns: 90px 110px 1fr 90px 90px 90px;
    gap: 8px; align-items: center;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
}
.row.head {
    color: var(--txt2); font-size: 12px;
    background: #fafbfc; padding-top: 8px; padding-bottom: 8px;
}
.row:not(.head):hover { background: #fafbfc; }
.c-time { color: var(--txt2); font-variant-numeric: tabular-nums; }
/* 未填时间的“待定”/维文较长，缩小字号并禁止折行 */
.c-time.tbd { font-size: 11px; white-space: nowrap; }
.c-country { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 旗帜图片（flagcdn）：所有平台统一显示 */
.flag {
    width: 20px; height: 15px; object-fit: cover; border-radius: 2px;
    vertical-align: -2px; margin-inline-end: 4px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.c-name { min-width: 0; }
.c-star { white-space: nowrap; }
.star-on { color: var(--gold); }
.star-off { color: #d8dce1; }
.c-prev, .c-cons { text-align: center; font-variant-numeric: tabular-nums; }
.actual { color: var(--red); }
/* 数值（含负号）：LTR 隔离 + Arial，修复维吾尔文 RTL 下 -0.3 显示成 0.3- */
.num, b.actual, span.actual {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    unicode-bidi: isolate;
    direction: ltr;
    display: inline-block;
}
.pending { color: #b8bfc8; font-size: 12px; }
.row.published .c-time { color: #b0b7bf; }

/* ---------- 空态 / 页脚 ---------- */
.empty {
    background: #fff; border: 1px dashed var(--line); border-radius: 10px;
    text-align: center; color: var(--txt2); padding: 48px 16px; margin: 14px 0;
}
.site-footer {
    text-align: center; color: #aab0b8; font-size: 12px; padding: 18px 0 32px;
}
.footer-sep { margin: 0 8px; }

/* ---------- 页脚备案信息（全页面通用） ---------- */
.footer-legal {
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
    font-size: 12px; line-height: 2;
}
.footer-legal p { margin: 0; }
.footer-legal .beian { color: #aab0b8; }
.footer-legal .beian a {
    color: #aab0b8; margin: 0 8px; text-decoration: none;
}
.footer-legal .beian a:hover { color: var(--red); text-decoration: underline; }
.footer-legal .beian span { margin: 0 8px; }
.footer-legal .risk-note { color: #b0876a; }
html[dir="rtl"] .footer-legal .beian a,
html[dir="rtl"] .footer-legal .beian span { margin: 0 6px; }

/* ---------- 日期导航与周条 ---------- */
.date-nav {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 14px; margin: 4px 0 10px;
}
.nav-arrow {
    width: 34px; height: 34px; line-height: 32px; text-align: center;
    border: 1px solid var(--line); border-radius: 8px; color: var(--txt);
    font-size: 16px; user-select: none;
}
.nav-arrow:hover { border-color: var(--red); color: var(--red); }
.nav-center { display: flex; align-items: center; gap: 10px; }
.nav-weekday { font-size: 16px; font-weight: 700; }
.nav-date { color: var(--txt2); font-variant-numeric: tabular-nums; }

.week-strip {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px;
}
.strip-day {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    text-align: center; padding: 7px 2px; color: var(--txt);
}
.strip-day:hover { border-color: #f3c1bc; }
.strip-day.is-today .sd-date { color: var(--red); font-weight: 700; }
.strip-day.sel { background: var(--red); border-color: var(--red); color: #fff; }
.strip-day.sel .sd-date { color: #fff; }
.sd-name { display: block; font-size: 12px; color: var(--txt2); }
.strip-day.sel .sd-name { color: rgba(255,255,255,.85); }
.sd-date { display: block; font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
    .week-strip { grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .strip-day { padding: 5px 1px; border-radius: 6px; }
    .sd-name { font-size: 11px; }
    .sd-date { font-size: 11px; }
}

/* ---------- 板块导航与标题 ---------- */
.sec-nav {
    display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap;
}
.sec-nav a {
    border: 1px solid var(--line); background: #fff; border-radius: 16px;
    padding: 5px 14px; font-size: 13px; color: var(--txt);
}
.sec-nav a:hover { border-color: var(--red); color: var(--red); }
.sec-title {
    font-size: 16px; font-weight: 700; margin: 22px 0 10px;
    padding-inline-start: 10px; border-inline-start: 4px solid var(--red);
    scroll-margin-top: 70px;
}

/* ---------- 事件行（时间/国家/星级/内容） ---------- */
.row.ev-row { grid-template-columns: 90px 110px 90px 1fr; }
.row.ho-row { grid-template-columns: 110px 1fr 1fr; }
.c-content { min-width: 0; }

/* ---------- 移动端：卡片式（flex 布局，RTL 自动适配） ---------- */
@media (max-width: 720px) {
    .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
    .week-range { display: none; }
    .row.head { display: none; }

    /* 每行变为一张卡片：第一行 时间+国家+星级，第二行 指标名，第三行 前值/预期 */
    .row {
        display: flex; flex-wrap: wrap; align-items: baseline;
        gap: 4px 12px; padding: 10px 14px;
        border-top: 1px solid var(--line);
    }
    .c-time {
        font-size: 12px; color: var(--txt2);
        font-variant-numeric: tabular-nums;
    }
    .c-country {
        font-size: 12px; color: var(--txt2);
        max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .c-star { margin-inline-start: auto; font-size: 12px; white-space: nowrap; }
    .c-name {
        flex: 1 1 100%; min-width: 0;
        font-weight: 600; line-height: 1.5;
        overflow-wrap: break-word; word-break: break-word;
    }
    .c-prev, .c-cons {
        font-size: 12px; color: var(--txt2);
        text-align: start; font-variant-numeric: tabular-nums;
    }
    .c-prev::before { content: "前值 "; color: #b8bfc8; }
    .c-cons::before { content: "预期 "; color: #b8bfc8; }
    html[dir="rtl"] .c-prev::before { content: "ئالدىنقى "; }
    html[dir="rtl"] .c-cons::before { content: "مۆلچەر "; }

    /* 事件行：内容独占一行 */
    .ev-row .c-content, .ho-row .c-content {
        flex: 1 1 100%; min-width: 0;
        line-height: 1.6; overflow-wrap: break-word; word-break: break-word;
        color: var(--txt);
    }
    .row.published .c-time { color: #b0b7bf; }
}

/* ---------- RTL（维吾尔文） ---------- */
html[dir="rtl"] body { letter-spacing: 0; }
html[dir="rtl"] .brand h1 { font-size: 16px; }
html[dir="rtl"] .c-name, html[dir="rtl"] .c-country { text-align: start; }

/* ============ 管理后台 ============ */
.admin-body { background: var(--bg); }
.login-box {
    max-width: 320px; margin: 12vh auto; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.login-box h2 { font-size: 18px; }
.login-box input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.login-box button {
    padding: 9px; background: var(--red); color: #fff; border: 0; border-radius: 8px;
    font-size: 14px; cursor: pointer;
}
.login-box .back { text-align: center; font-size: 13px; }
.err { color: var(--red); font-size: 13px; }

.admin { padding-top: 20px; padding-bottom: 40px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-user { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.admin-user .who { color: #555; }
.admin-user a { color: var(--red); text-decoration: none; font-size: 13px; }
.admin-user .logout { color: #c0392b; font-size: 13px; }
.admin-user .logout:hover { text-decoration: underline; }
.admin h2 { font-size: 18px; }
.admin h3 { margin: 22px 0 10px; font-size: 15px; }
.msg {
    background: #eef7ee; border: 1px solid #cde8cd; color: #2e7d32;
    border-radius: 8px; padding: 8px 12px; margin-top: 12px; font-size: 13px;
}
.admin-tools {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 12px 14px; margin-top: 14px;
}
.btn {
    display: inline-block; border: 1px solid var(--line); background: #fff;
    border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--txt);
}
.btn:hover { background: #fafbfc; }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: #c43a31; }
.btn-on { border-color: var(--red); color: var(--red); }
.hint { color: var(--txt2); font-size: 12px; }
.date-filter { padding: 10px 14px; margin-top: 10px; }
.date-filter label { font-size: 13px; color: var(--txt); }
.date-filter select,
.date-filter input[type="date"] {
    padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
    font-size: 13px; background: #fff; cursor: pointer;
}
h3[id] { scroll-margin-top: 12px; }

.rec-form { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; margin-bottom: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--txt2); }
.form-grid .span2 { grid-column: span 2; }
.form-grid input, .form-grid select {
    padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--txt);
}

.admin-table {
    width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px;
    border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 13px;
}
.admin-table th {
    background: #fafbfc; color: var(--txt2); font-weight: 500; text-align: start;
    padding: 9px 10px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table td.evt { max-width: 260px; }
.admin-table .ops { display: flex; gap: 10px; align-items: center; }
.admin-table .ops a { color: var(--blue); }
.linklike { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 13px; }
.empty-cell { text-align: center; color: var(--txt2); padding: 28px 0 !important; }

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid .span2 { grid-column: span 2; }
    .admin-table { display: block; overflow-x: auto; }
}
@media (max-width: 480px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span2 { grid-column: auto; }
}
