/* settings.css - 深度重构 */

/* 布局调整 */
.modal-card.wide {
    max-width: 900px;
    padding: 0;
    overflow: hidden;
}

.modal-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    min-height: 500px;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--outline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
}

.close-btn:hover {
    background: #ffeee8;
    color: var(--accent);
    transform: rotate(90deg);
}

@media (max-width: 800px) {
    .modal-layout {
        grid-template-columns: 1fr;
    }

    .form-help {
        display: none;
    }
}

/* 左侧表单区 */
.safe-form {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 80vh;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

/* 标签与输入框 */
label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.field-hint {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 2px;
}

input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--outline);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: #fdfdfd;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 61, 0.1);
}

/* 右侧说明区 */
.form-help {
    background: #FAF8F5;
    padding: 32px;
    border-left: 1px solid var(--outline);
}

.form-help h4 {
    margin: 0 0 20px;
    color: var(--ink);
    font-size: 16px;
}

.form-help ul {
    padding-left: 20px;
    margin: 0;
}

.form-help li {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.form-help strong {
    color: var(--ink);
}

.help-note {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    border: 1px solid var(--outline);
    margin-top: 24px;
}

/* 租户卡片展示 */
.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tenant-card {
    background: #fff;
    border: 1px solid var(--outline);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tenant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.tenant-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tenant-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.tenant-info-label {
    color: var(--muted);
    font-weight: 500;
}

.tenant-info-value {
    font-family: 'DM Mono', monospace;
    color: var(--ink);
    background: #f7f7f7;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.tenant-actions {
    display: flex;
    gap: 10px;
}

.tenant-actions .action {
    margin: 0;
    flex: 1;
    justify-content: center;
    display: inline-flex;
    align-items: center;
}

.action.ghost.small {
    background: #F8F9FA;
    color: var(--muted);
    border: 1px solid var(--outline);
}

.action.ghost.small:hover {
    background: #eee;
    color: var(--ink);
}

/* 其它组件 */
.section-divider {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-top: 10px;
    border-bottom: 2px solid #fff0eb;
    padding-bottom: 4px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    transform: translateY(100px);
    transition: transform 0.3s;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
}

.toast.info {
    background: #007AFF;
}

.toast.error {
    background: #FF3B30;
}

.action.primary {
    background: var(--accent);
    color: #fff;
}

.action.primary:hover {
    background: var(--accent-dark);
}