/* =========================================
   公司银行账户模块 公共样式
   路径: /opt/finsys/static/css/cobank.css
   ========================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 顶部导航 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0 30px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
.navbar .brand { font-size: 18px; font-weight: 600; }
.navbar .user-info { font-size: 14px; }
.navbar .user-info a { color: #fff; margin-left: 16px; text-decoration: none; opacity: 0.85; }
.navbar .user-info a:hover { opacity: 1; text-decoration: underline; }

/* 整体布局 */
.layout {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

/* 主内容 */
.main-content {
    flex: 1;
    overflow-x: auto;
    margin-left: 10px;
}
.container {
    margin: 0;
    padding: 24px 20px 24px 30px;
    width: 100%;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-header h2 { font-size: 22px; color: #333; }
.page-header a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}
.page-header a:hover { text-decoration: underline; }

/* 搜索和操作栏 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.toolbar input[type="text"] {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 260px;
    outline: none;
    transition: border-color 0.3s;
}
.toolbar input[type="text"]:focus { border-color: #667eea; }

/* 按钮 */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn:hover { opacity: 0.85; }
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-search { background: #667eea; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-back { background: #eee; color: #333; }

/* 表格 */
.table-wrap {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead { background: #f8f9fa; }
th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    white-space: nowrap;
}
th { color: #666; font-weight: 600; font-size: 13px; }
tr:hover { background: #f5f7ff; }
tr:last-child td { border-bottom: none; }
.actions { display: flex; gap: 6px; }

/* 链接样式 */
td a.link-cell {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
td a.link-cell:hover {
    text-decoration: underline;
    color: #5a6fd6;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.2s;
}
.pagination a:hover { background: #667eea; color: #fff; border-color: #667eea; }
.pagination .current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
.pagination .disabled {
    color: #aaa;
    cursor: not-allowed;
}
.page-info {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}
.empty-msg {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 16px;
}

/* 确认对话框 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}
.modal-box p { font-size: 16px; color: #333; margin-bottom: 24px; }
.modal-btns { display: flex; gap: 12px; justify-content: center; }
.modal-btns .btn { min-width: 80px; }

/* 详情页样式 */
.detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.detail-table {
    width: 100%;
    border-collapse: collapse;
}
.detail-table th,
.detail-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    text-align: left;
    white-space: normal;
}
.detail-table th {
    width: 140px;
    color: #888;
    font-weight: 500;
    background: #fafafa;
}
.detail-table td {
    color: #333;
}
.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}
.detail-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
}

/* 表单样式 */
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    max-width: 720px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}
.form-group label .required { color: #e74c3c; margin-left: 2px; }
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    outline: none;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus { border-color: #667eea; }
.form-group input[readonly] {
    background: #f5f5f5;
    color: #999;
}

.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group { flex: 1; }

.form-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
}
.msg {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    min-height: 20px;
}
.msg.success { color: #27ae60; }
.msg.error { color: #e74c3c; }

/* 面包屑 */
.breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}
.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: #ccc; }

/* =========================================
   登录/注册页面样式
   ========================================= */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}
.auth-card h1 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 6px;
}
.auth-subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-msg {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff0f0;
    font-size: 14px;
}
.auth-form .form-group {
    margin-bottom: 18px;
}
.auth-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}
.auth-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 0;
    font-size: 16px;
    border-radius: 8px;
    text-align: center;
}
