@charset "utf-8";

/* ================================================================
   tramod - admin dashboard stylesheet
   SaaS 轻量化 / 大气极简 / 演示稳重 / 字体放大
   ================================================================ */

/* --------------------------------------------------------
   reset & base
   -------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* 全局字体放大 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f8fafc;
    line-height: 1.55;
    min-height: 100vh;
}

a {
    color: #0ea5e9;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #0284c7;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* --------------------------------------------------------
   layout
   -------------------------------------------------------- */
.tramod-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- sidebar ---- */
.tramod-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px; /* 加宽更大气 */
    background: #0f172a;
    color: #cbd5e1;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 12px rgba(0,0,0,0.08);
}

/* sidebar toggle button */
.tramod-sidebar-toggle {
    margin-top: auto;
    width: 100%;
    padding: 16px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tramod-sidebar-toggle:hover {
    background: rgba(14,165,233,0.1);
    color: #0ea5e9;
}
.tramod-sidebar-toggle .toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* sidebar collapsed */
.tramod-sidebar.collapsed {
    transform: translateX(-220px);
}
.tramod-sidebar.collapsed + #tramod-main .tramod-topbar {
    left: 0;
}
.tramod-sidebar.collapsed + #tramod-main .tramod-content {
    margin-left: 0;
}

/* sidebar 折叠后浮动展开按钮 */
.tramod-sidebar-float {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
    width: 32px;
    height: 64px;
    background: #0f172a;
    border: none;
    border-radius: 0 8px 8px 0;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.8;
}
.tramod-sidebar-float:hover {
    color: #0ea5e9;
    opacity: 1;
    width: 36px;
}

.tramod-sidebar-logo {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tramod-sidebar-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.3;
    margin: 0;
}

.tramod-sidebar-logo small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.tramod-sidebar-logo h1 span {
    color: #0ea5e9;
    font-size: 11px;
    font-weight: 400;
    vertical-align: super;
    margin-left: 2px;
}

.tramod-sidebar-nav {
    padding: 12px 0;
}

.tramod-sidebar-group {
    padding: 16px 24px 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    font-weight: 600;
}

.tramod-sidebar-item {
    display: block;
    padding: 9px 24px;
    color: #cbd5e1;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.tramod-sidebar-item:hover {
    background: rgba(14,165,233,0.1);
    color: #0ea5e9;
    border-left-color: #0ea5e9;
}

.tramod-sidebar-item.active {
    background: rgba(14,165,233,0.12);
    color: #0ea5e9;
    border-left-color: #0ea5e9;
    font-weight: 600;
}

.tramod-sidebar-item .icon {
    width: 22px;
    margin-right: 12px;
    text-align: center;
    font-size: 18px;
    display: inline-block;
    vertical-align: middle;
}

.tramod-sidebar-item .badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* ---- topbar ---- */
.tramod-topbar {
    position: fixed;
    left: 220px;
    right: 0;
    top: 0;
    height: 70px; /* 加高更大气 */
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 99;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.tramod-topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.tramod-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tramod-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 15px;
}

.tramod-topbar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0ea5e9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
}

.tramod-topbar-btn {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tramod-topbar-btn:hover {
    color: #ef4444;
    border-color: #fecdd3;
}

/* ---- main content ---- */
.tramod-content {
    margin-left: 220px;
    margin-top: 70px;
    padding: 32px; /* 宽松间距 */
    min-height: calc(100vh - 70px);
}

/* --------------------------------------------------------
   cards
   -------------------------------------------------------- */
.tramod-card {
    background: #fff;
    border-radius: 12px; /* 更大圆角更柔和 */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -1px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.tramod-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tramod-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.tramod-card-body {
    padding: 24px;
}

.tramod-card-footer {
    padding: 16px 24px;
    border-top: 1px solid #f8fafc;
    background: #fafbfc;
}

/* ---- stat cards ---- */
.tramod-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.tramod-stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -1px rgba(0,0,0,0.03);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f1f5f9;
}

.tramod-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.07);
}

.tramod-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.tramod-stat-icon.blue  { background: #e0f2fe; color: #0ea5e9; }
.tramod-stat-icon.green { background: #dcfce7; color: #10b981; }
.tramod-stat-icon.red   { background: #fef2f2; color: #ef4444; }
.tramod-stat-icon.orange{ background: #fffbeb; color: #f59e0b; }

.tramod-stat-info h4 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.tramod-stat-info {
    text-align: right;
}

.tramod-stat-info p {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* --------------------------------------------------------
   status indicators
   -------------------------------------------------------- */
.tramod-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tramod-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tramod-status.online::before  { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.tramod-status.offline::before { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.tramod-status.warning::before { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.tramod-status.pending::before { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.4); }
.tramod-status.idle::before    { background: #9ca3af; }

.tramod-status.online  { color: #10b981; }
.tramod-status.offline { color: #ef4444; }
.tramod-status.warning { color: #f59e0b; }
.tramod-status.pending { color: #d97706; }

/* badge / tag */
.tramod-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.tramod-badge.success { background: #dcfce7; color: #10b981; border: 1px solid #bbf7d0; }
.tramod-badge.danger  { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.tramod-badge.warning { background: #fffbeb; color: #f59e0b; border: 1px solid #fef3c7; }
.tramod-badge.info    { background: #e0f2fe; color: #0ea5e9; border: 1px solid #bae6fd; }
.tramod-badge.default { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

/* --------------------------------------------------------
   tables
   -------------------------------------------------------- */
.tramod-table-wrap {
    overflow-x: auto;
}

.tramod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tramod-table thead th {
    background: #f8fafc;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tramod-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.tramod-table tbody tr:hover {
    background: #fafbfc;
}

.tramod-table tbody tr:last-child td {
    border-bottom: none;
}

/* responsive table */
@media (max-width: 768px) {
    .tramod-table thead {
        display: none;
    }
    .tramod-table tbody td {
        display: block;
        text-align: right;
        padding: 12px 16px;
    }
    .tramod-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #475569;
    }
    .tramod-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
    }
}

/* --------------------------------------------------------
   progress bar
   -------------------------------------------------------- */
.tramod-progress {
    width: 100%;
    height: 10px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.tramod-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    background: #0ea5e9;
}

.tramod-progress-bar.success { background: #10b981; }
.tramod-progress-bar.warning { background: #f59e0b; }
.tramod-progress-bar.danger  { background: #ef4444; }
.tramod-progress-bar.info    { background: #0ea5e9; }

.tramod-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

/* --------------------------------------------------------
   forms
   -------------------------------------------------------- */
.tramod-form-group {
    margin-bottom: 22px;
}

.tramod-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.tramod-form-label.required::after {
    content: " *";
    color: #ef4444;
}

.tramod-form-input,
.tramod-form-select,
.tramod-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    outline: none;
}

.tramod-form-input:focus,
.tramod-form-select:focus,
.tramod-form-textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

.tramod-form-input::placeholder,
.tramod-form-textarea::placeholder {
    color: #94a3b8;
}

.tramod-form-input.error,
.tramod-form-select.error,
.tramod-form-textarea.error {
    border-color: #ef4444;
}

.tramod-form-input.error:focus,
.tramod-form-select.error:focus,
.tramod-form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.tramod-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.tramod-form-hint {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

.tramod-form-error {
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
}

.tramod-form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

/* two-column form grid */
.tramod-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}

.tramod-form-grid .tramod-form-grid-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .tramod-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.tramod-form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}

.tramod-form-check input[type="checkbox"],
.tramod-form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

/* --------------------------------------------------------
   tabs
   -------------------------------------------------------- */
.tramod-tabs {
    margin: 0;
}

.tramod-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
}

.tramod-tab-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    outline: none;
}

.tramod-tab-btn:hover {
    color: #0ea5e9;
}

.tramod-tab-btn.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
    font-weight: 600;
}

.tramod-tab-panel {
    display: none;
}

.tramod-tab-panel.active {
    display: block;
    animation: tramod-fadein 0.25s ease;
}

@keyframes tramod-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* tab panel inner layout: two-column grid for wider screens */
.tramod-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}

.tramod-tab-grid .tramod-tab-grid-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .tramod-tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tramod-tab-btn {
        white-space: nowrap;
        padding: 12px 20px;
        font-size: 14px;
    }
    .tramod-tab-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ---- buttons ---- */
.tramod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.tramod-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tramod-btn-primary {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

.tramod-btn-primary:hover:not(:disabled) {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.tramod-btn-success {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.tramod-btn-success:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.tramod-btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.tramod-btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.tramod-btn-warning {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

.tramod-btn-warning:hover:not(:disabled) {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

.tramod-btn-default {
    background: #fff;
    color: #475569;
    border-color: #e2e8f0;
}

.tramod-btn-default:hover:not(:disabled) {
    color: #0ea5e9;
    border-color: #0ea5e9;
}

.tramod-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.tramod-btn-lg {
    padding: 12px 28px;
    font-size: 16px;
}

.tramod-btn-block {
    display: flex;
    width: 100%;
}

/* button group */
.tramod-btn-group {
    display: inline-flex;
}

.tramod-btn-group .tramod-btn {
    border-radius: 0;
}

.tramod-btn-group .tramod-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.tramod-btn-group .tramod-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.tramod-btn-group .tramod-btn + .tramod-btn {
    margin-left: -1px;
}

/* --------------------------------------------------------
   modal
   -------------------------------------------------------- */
.tramod-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tramod-fadein 0.2s ease;
}

.tramod-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: tramod-slideup 0.25s ease;
}

.tramod-modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tramod-modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
}

.tramod-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tramod-modal-close:hover {
    background: #ef4444;
    color: #fff;
}

.tramod-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.tramod-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes tramod-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes tramod-slideup {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------
   code blocks
   -------------------------------------------------------- */
.tramod-code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Consolas, monospace;
    font-size: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: #1e293b;
}

.tramod-code-inline {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Consolas, monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 3px 6px;
    border-radius: 4px;
    color: #dc2626;
}

/* --------------------------------------------------------
   alerts / notifications
   -------------------------------------------------------- */
.tramod-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tramod-alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #065f46;
}

.tramod-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.tramod-alert-warning {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}

.tramod-alert-info {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #075985;
}

/* --------------------------------------------------------
   pagination
   -------------------------------------------------------- */
.tramod-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}

.tramod-pagination a,
.tramod-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    background: #fff;
    transition: all 0.2s;
}

.tramod-pagination a:hover {
    color: #0ea5e9;
    border-color: #0ea5e9;
}

.tramod-pagination .active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
    font-weight: 600;
}

.tramod-pagination .disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

/* --------------------------------------------------------
   login page
   -------------------------------------------------------- */
.tramod-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.tramod-login-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    padding: 48px;
    width: 90%;
    max-width: 440px;
}

.tramod-login-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 8px;
}

.tramod-login-box .subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 32px;
}

.tramod-login-box .tramod-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
}

/* --------------------------------------------------------
   utilities
   -------------------------------------------------------- */
.tramod-mb-8  { margin-bottom: 8px; }
.tramod-mb-16 { margin-bottom: 16px; }
.tramod-mb-24 { margin-bottom: 24px; }
.tramod-mb-32 { margin-bottom: 32px; }
.tramod-mt-8  { margin-top: 8px; }
.tramod-mt-16 { margin-top: 16px; }
.tramod-mr-8  { margin-right: 8px; }
.tramod-ml-8  { margin-left: 8px; }
.tramod-pa-16 { padding: 16px; }
.tramod-pa-24 { padding: 24px; }

.tramod-text-center { text-align: center; }
.tramod-text-right  { text-align: right; }
.tramod-text-muted  { color: #64748b; }
.tramod-text-sm     { font-size: 13px; }
.tramod-text-lg     { font-size: 18px; }

.tramod-flex {
    display: flex;
    align-items: center;
}

.tramod-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tramod-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.tramod-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 20px 0;
}

.tramod-empty {
    text-align: center;
    padding: 48px 20px;
    color: #64748b;
    font-size: 15px;
}

.tramod-loading {
    text-align: center;
    padding: 28px;
    color: #64748b;
    font-size: 15px;
}

/* simple spinner */
.tramod-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: tramod-spin 0.6s linear infinite;
}

@keyframes tramod-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------
   responsive
   -------------------------------------------------------- */
@media (max-width: 1024px) {
    .tramod-stats {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .tramod-sidebar {
        transform: translateX(-100%);
    }
    .tramod-sidebar.open {
        transform: translateX(0);
    }
    .tramod-topbar {
        left: 0;
    }
    .tramod-content {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .tramod-content {
        padding: 20px 16px;
    }
    .tramod-card-body {
        padding: 20px 16px;
    }
    .tramod-login-box {
        padding: 32px 24px;
    }
}

/* --------------------------------------------------------
   print
   -------------------------------------------------------- */
@media print {
    .tramod-sidebar,
    .tramod-topbar {
        display: none;
    }
    .tramod-content {
        margin: 0;
        padding: 0;
    }
    .tramod-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* --------------------------------------------------------
   v5.0 mode card selector (关键词组编辑-模式选择)
   -------------------------------------------------------- */
.tramod-mode-cards {
    display: flex;
    gap: 16px;
}
.tramod-mode-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    position: relative;
}
.tramod-mode-card:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}
.tramod-mode-card.active {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.tramod-mode-card input[type="radio"] {
    display: none;
}
.tramod-mode-card .mode-icon {
    font-size: 28px;
    line-height: 1;
}
.tramod-mode-card .mode-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tramod-mode-card .mode-desc {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    line-height: 1.4;
}

/* --------------------------------------------------------
   v6.0 compact inline mode selector (通道配置-内容来源)
   -------------------------------------------------------- */
.tramod-mode-inline {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tramod-mode-inline .tramod-mode-card {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: auto;
}
.tramod-mode-inline .tramod-mode-card .mode-icon {
    font-size: 18px;
}
.tramod-mode-inline .tramod-mode-card .mode-name {
    font-size: 13px;
    letter-spacing: 0;
}
.tramod-mode-inline .tramod-mode-card .mode-desc {
    font-size: 11px;
    color: #999;
}