/* 导航站样式 —— 简约大方 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #363636 url(bg.jpg) center / cover fixed no-repeat;
    color: #2c3e50;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 首页（Sun-Panel 复刻布局） ---------- */
.home-wrap { max-width: 920px; margin: 0 auto; padding: 84px 24px 36px; }

/* Hero：标题 + 时钟 */
.hero { display: flex; align-items: flex-end; gap: 46px; margin-bottom: 54px; }
.hero-title {
    font-size: 52px; font-weight: 700; color: #fff; letter-spacing: 1px; line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
    display: flex; align-items: center; gap: 14px;
}
.hero-sub { font-size: 14.5px; color: rgba(255,255,255,.78); margin-top: 10px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.hero-clock { text-align: right; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.45); flex-shrink: 0; padding-bottom: 4px; }
.clock-time { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 14px; color: rgba(255,255,255,.85); margin-top: 3px; }

/* 右上角悬浮按钮 */
.float-actions { position: fixed; top: 18px; right: 18px; display: flex; gap: 10px; z-index: 30; }
.float-btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(42,42,42,.42); color: #fff; font-size: 18px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: background .15s, transform .15s;
}
.float-btn:hover { background: rgba(70,70,70,.6); transform: translateY(-2px); }

/* 分组板块 */
.group { margin-bottom: 54px; }
.group-title {
    font-size: 21px; font-weight: 800; color: #fff; margin: 0 0 22px 10px;
    text-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.lock-tag { font-size: 12px; }

/* 横向图标卡片网格 */
.grid-h { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hcard {
    display: flex; align-items: center; gap: 14px;
    height: 72px; padding: 0 16px;
    background: rgba(42,42,42,.42); border-radius: 16px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: transform .16s, background .16s, box-shadow .16s;
    overflow: hidden;
}
.hcard:hover { background: rgba(70,70,70,.6); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.hcard-name {
    font-size: 14.5px; color: #fff; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* 图标基础样式（后台表格等处） */
.nic { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.nic img { width: 32px; height: 32px; border-radius: 8px; }
.nic-emoji { font-size: 30px; line-height: 1; }
.nic-letter { width: 36px; height: 36px; border-radius: 10px; color: #fff; font-size: 17px; font-weight: 600; align-items: center; justify-content: center; }

/* 首页图标尺寸（卡片内） */
.hcard .nic { width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0; overflow: hidden; }
.hcard .nic img { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; }
.hcard .nic-emoji { font-size: 32px; background: rgba(255,255,255,.12); border-radius: 12px; }
.hcard .nic-letter { width: 50px; height: 50px; border-radius: 12px; font-size: 22px; font-weight: 700; }

.footer { text-align: center; color: rgba(255,255,255,.6); font-size: 14px; padding: 30px 0 10px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* ---------- 顶栏（后台页） ---------- */
.topbar {
    background: rgba(20,22,26,.48); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.12); position: sticky; top: 0; z-index: 20;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-size: 19px; font-weight: 700; letter-spacing: .5px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.logo em { font-style: normal; font-size: 13px; font-weight: 400; color: rgba(255,255,255,.6); margin-left: 4px; }
.top-actions a { font-size: 14px; color: rgba(255,255,255,.78); margin-left: 18px; transition: color .15s; }
.top-actions a:hover { color: #fff; }

/* ---------- 登录页 ---------- */
.login-body { display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 14px;
    padding: 38px 36px 28px; width: 100%; max-width: 380px;
    box-shadow: 0 10px 34px rgba(44,62,80,.07);
}
.login-logo { font-size: 22px; font-weight: 700; text-align: center; }
.login-sub { text-align: center; color: #98a4b3; font-size: 13px; margin: 8px 0 24px; }
.login-err { background: #fdedec; color: #c0392b; border-radius: 8px; padding: 9px 14px; font-size: 13.5px; margin-bottom: 16px; text-align: center; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: #7f8c9b; margin-bottom: 6px; }
.form-item input {
    width: 100%; padding: 11px 14px; border: 1px solid #dfe5ec; border-radius: 8px;
    font-size: 14.5px; outline: none; transition: .15s;
}
.form-item input:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,.12); }
.login-back { text-align: center; margin-top: 18px; }
.login-back a { color: #98a4b3; font-size: 13px; }
.login-back a:hover { color: #3498db; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: 9px 18px; border: 1px solid #dfe5ec; border-radius: 8px;
    background: #fff; color: #2c3e50; font-size: 14px; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: #b9c4d0; background: #f8fafc; }
.btn-primary { background: #3498db; border-color: #3498db; color: #fff; }
.btn-primary:hover { background: #2e86c8; border-color: #2e86c8; }
.btn-danger { color: #e74c3c; border-color: #f5c6c0; }
.btn-danger:hover { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- 后台 ---------- */
.admin-wrap { padding: 26px 20px 50px; }
.flash { border-radius: 8px; padding: 10px 16px; font-size: 13.5px; margin-bottom: 16px; }
.flash-ok { background: #eafaf1; color: #1e8449; }
.flash-err { background: #fdedec; color: #c0392b; }
.card {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
    padding: 22px 24px; margin-bottom: 22px;
}
.card h2 { font-size: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eef2f6; }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.inline-form input[type=text], .inline-form input[type=number], .inline-form input[type=password], .inline-form select {
    padding: 9px 12px; border: 1px solid #dfe5ec; border-radius: 8px; font-size: 13.5px; outline: none;
}
.inline-form input:focus, .inline-form select:focus { border-color: #3498db; }
.inline-form .chk { font-size: 13.5px; color: #7f8c9b; display: flex; align-items: center; gap: 5px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 9px 10px; background: #f7f9fb; color: #7f8c9b; font-weight: 600; border-bottom: 1px solid #e8ecf1; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
.tbl tr:hover td { background: #fafcfe; }
.tbl .empty { text-align: center; color: #98a4b3; padding: 26px; }
.url-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-cell a { color: #3498db; }
.ops { white-space: nowrap; }
.ops .btn { margin-right: 6px; }

.tag { font-size: 12px; padding: 2px 9px; border-radius: 10px; }
.tag-pub { background: #eafaf1; color: #1e8449; }
.tag-pri { background: #fdf0e4; color: #e67e22; }

.tip { font-size: 12.5px; color: #98a4b3; margin-top: 10px; }

/* ---------- 品牌图标 ---------- */
.brand-icon { width: 24px; height: 24px; border-radius: 6px; vertical-align: -5px; margin-right: 8px; object-fit: contain; }
.brand-emoji { font-size: 21px; margin-right: 6px; vertical-align: -2px; }

/* ---------- 图标库 ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-top: 4px; }
.icon-cell {
    position: relative; background: #f7f9fb; border: 1px solid #e8ecf1; border-radius: 10px;
    padding: 12px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; transition: border-color .15s, transform .15s;
}
.icon-cell:hover { border-color: #3498db; transform: translateY(-2px); }
.icon-cell img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.icon-cell-name {
    font-size: 11px; color: #98a4b3; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-del {
    position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
    border: none; border-radius: 50%; background: #e74c3c; color: #fff;
    font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.icon-del:hover { background: #c0392b; }
.icon-input.filled-flash { border-color: #1e8449 !important; box-shadow: 0 0 0 3px rgba(30,132,73,.15); }
.inline-form input[type=file] { font-size: 13px; max-width: 260px; }

/* ---------- 图标库弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(30,40,50,.45); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 640px;
    max-height: 82vh; overflow-y: auto; padding: 20px 24px 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.modal-head { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #eef2f6; }
.modal-close { cursor: pointer; font-size: 24px; color: #98a4b3; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: #2c3e50; }

/* 拖拽上传区 */
.drop-zone {
    border: 2px dashed #d5dde6; border-radius: 12px; padding: 24px 16px;
    text-align: center; color: #98a4b3; font-size: 13.5px; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s; margin-bottom: 14px;
}
.drop-zone:hover, .drop-zone.dz-on { border-color: #3498db; color: #3498db; background: #f4faff; }
.dz-link { color: #3498db; text-decoration: underline; }
.dz-progress { margin-top: 10px; font-size: 13px; color: #2c3e50; word-break: break-all; }

/* ---------- 手机端 ---------- */
@media (max-width: 768px) {
    .home-wrap { padding: 34px 14px 20px; }
    .hero { gap: 14px; margin-bottom: 28px; align-items: flex-end; flex-wrap: wrap; }
    .hero-left { min-width: 0; }
    .hero-title { font-size: 30px; gap: 8px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero-sub { font-size: 12px; margin-top: 5px; }
    .hero-clock { text-align: left; }
    .clock-time { font-size: 20px; }
    .clock-date { font-size: 11.5px; margin-top: 1px; }
    .grid-h { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .hcard { height: 54px; padding: 0 10px; gap: 9px; border-radius: 12px; }
    .hcard .nic, .hcard .nic img, .hcard .nic-letter { width: 34px; height: 34px; border-radius: 8px; }
    .hcard .nic-emoji { font-size: 21px; }
    .hcard .nic-letter { font-size: 16px; }
    .hcard-name { font-size: 12px; }
    .group-title { font-size: 15.5px; margin-bottom: 11px; margin-left: 2px; }
    .group { margin-bottom: 26px; }
    .float-actions { top: 10px; right: 10px; gap: 7px; }
    .float-btn { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
    .footer { font-size: 11.5px; padding: 22px 0 6px; }
    /* 后台 */
    .admin-wrap { padding: 16px 12px 40px; }
    .topbar .container { height: 50px; padding: 0 14px; }
    .logo { font-size: 16px; }
    .top-actions a { font-size: 13px; margin-left: 12px; }
    .card { padding: 14px; margin-bottom: 16px; border-radius: 10px; }
    .card h2 { font-size: 14.5px; margin-bottom: 12px; padding-bottom: 10px; }
    .card { overflow-x: auto; }
    .tbl { min-width: 560px; }
    .flash { padding: 9px 12px; font-size: 12.5px; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-sm { padding: 4px 10px; font-size: 12px; }
    .inline-form { gap: 8px; margin-bottom: 12px; }
    .inline-form input[type=text], .inline-form input[type=password], .inline-form select { flex: 1 1 100%; }
    .inline-form input[type=number] { flex: 0 0 90px; }
    .modal { padding: 16px 16px 20px; max-height: 88vh; }
    .drop-zone { padding: 18px 12px; font-size: 12.5px; }
    .icon-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
    .tbl { font-size: 12.5px; }
    .tbl th, .tbl td { padding: 7px 6px; }
    .url-cell { max-width: 130px; }
}

/* 超小屏（≤360px）：卡片再紧凑 */
@media (max-width: 360px) {
    .hcard { height: 50px; padding: 0 8px; gap: 8px; }
    .hcard .nic, .hcard .nic img, .hcard .nic-letter { width: 30px; height: 30px; }
    .hcard-name { font-size: 11.5px; }
    .hero-title { font-size: 26px; }
}

