/* 店铺账号管理 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
}

.sa-wrapper {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
}

.sa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 2px solid #0fa171;
}

.sa-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
}

.sa-add-btn {
    padding: 8px 20px;
    background: #0fa171;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}

.sa-add-btn:hover {
    background: #0d8a62;
}

.sa-body {
    padding: 16px 24px 24px;
}

/* 表格 */
.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sa-table thead tr {
    background: #f5f6fa;
}

.sa-table th {
    padding: 10px 12px;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e4ec;
    text-align: left;
    white-space: nowrap;
}

.sa-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.sa-table tbody tr:hover {
    background: #f9fdfb;
}

.loading-row td {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* 按钮 */
.sa-edit-btn, .sa-delete-btn, .sa-token-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity .2s;
    margin-right: 4px;
}

.sa-edit-btn {
    background: #0fa171;
    color: #fff;
}

.sa-edit-btn:hover { opacity: .85; }

.sa-token-btn {
    background: #3498db;
    color: #fff;
}

.sa-token-btn:hover { opacity: .85; }

.sa-delete-btn {
    background: #e74c3c;
    color: #fff;
}

.sa-delete-btn:hover { opacity: .85; }

/* 凭证状态徽标 */
.sa-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.sa-badge-ok {
    background: #e8f8f0;
    color: #0fa171;
    border: 1px solid #b8e6d0;
}

.sa-badge-no {
    background: #fef0f0;
    color: #e74c3c;
    border: 1px solid #fcc;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    min-width: 380px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 16px;
    color: #2c3e50;
}

.modal-content label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    color: #555;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

.modal-content textarea {
    resize: vertical;
    min-height: 50px;
    line-height: 1.5;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: #0fa171;
}

.sa-hint-label {
    font-size: 12px !important;
    color: #888 !important;
}

.sa-hint-label textarea {
    font-size: 13px;
    color: #333;
}

.modal-actions {
    margin-top: 20px;
    text-align: right;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.modal-actions button:first-child {
    background: #0fa171;
    color: #fff;
}

.modal-actions button:last-child {
    background: #e8e8e8;
    color: #333;
}

/* 移动端 */
@media (max-width: 768px) {
    .sa-wrapper {
        margin: 10px;
        border-radius: 4px;
    }
    .sa-header {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .sa-title { font-size: 15px; }
    .sa-add-btn { font-size: 13px; padding: 6px 14px; }
    .sa-body {
        padding: 10px;
        overflow-x: auto;
    }
    .sa-table {
        min-width: 500px;
        font-size: 13px;
    }
    .sa-table th, .sa-table td {
        padding: 8px 10px;
    }
    .modal-content {
        min-width: auto;
        width: 90%;
        margin: 0 10px;
    }
}
