/* 码支付系统 - 主样式文件 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* 侧边栏布局 */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #2c3e50;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    border-bottom: 1px solid #1a252f;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #1a252f;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover {
    background: #34495e;
    color: #fff;
}

.sidebar-menu li.active a {
    background: #3498db;
    color: #fff;
}

.sidebar-menu li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
}

/* 顶部导航栏 */
.navbar-top {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.navbar-top .navbar-brand {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.navbar-top .navbar-right {
    display: flex;
    align-items: center;
}

.navbar-top .navbar-right a {
    margin-left: 20px;
    color: #666;
    text-decoration: none;
}

.navbar-top .navbar-right a:hover {
    color: #3498db;
}

/* 内容区域 */
.content-wrapper {
    padding: 20px;
    background-color: #f5f5f5;
    min-height: calc(100vh - 60px);
}

.content-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.content-header .btn {
    margin-left: 10px;
}

/* 信息盒子 */
.info-box {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.info-box-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
}

.info-box-content {
    flex: 1;
    padding-left: 15px;
}

.info-box-text {
    font-size: 14px;
    color: #666;
}

.info-box-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

.bg-aqua {
    background-color: #00c0ef;
}

.bg-green {
    background-color: #00a65a;
}

.bg-yellow {
    background-color: #f39c12;
}

.bg-red {
    background-color: #dd4b39;
}

/* 盒子 */
.box {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.box-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.box-header h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.box-body {
    padding: 20px;
}

.box-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* 表格 */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
    border: 1px solid #ddd;
}

.table > thead > tr > th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: left;
    padding: 10px;
}

.table > tbody > tr > td {
    padding: 10px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

/* 标签 */
.label {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: normal;
    border-radius: 3px;
}

.label-success {
    background-color: #5cb85c;
    color: #fff;
}

.label-warning {
    background-color: #f0ad4e;
    color: #fff;
}

.label-danger {
    background-color: #d9534f;
    color: #fff;
}

.label-info {
    background-color: #5bc0de;
    color: #fff;
}

.label-default {
    background-color: #777;
    color: #fff;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: #007AFF;
    border-color: #0066CC;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0066CC;
}

.btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: #fff;
}

.btn-success:hover {
    background-color: #4cae4c;
}

.btn-info {
    background-color: #5bc0de;
    border-color: #46b8da;
    color: #fff;
}

.btn-info:hover {
    background-color: #46b8da;
}

.btn-warning {
    background-color: #f0ad4e;
    border-color: #eea236;
    color: #fff;
}

.btn-warning:hover {
    background-color: #eea236;
}

.btn-danger {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #fff;
}

.btn-danger:hover {
    background-color: #d43f3a;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 表单 */
.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-control:focus {
    border-color: #007AFF;
    outline: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

.form-inline .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
    margin-right: 15px;
}

/* 分页 */
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
}

.pagination > li {
    display: inline;
}

.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.5;
    text-decoration: none;
    color: #007AFF;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background-color: #eee;
}

.pagination > .active > a,
.pagination > .active > span {
    z-index: 3;
    color: #fff;
    background-color: #007AFF;
    border-color: #007AFF;
}

/* 面板 */
.panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.panel-heading {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.panel-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.panel-body {
    padding: 15px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    position: relative;
    width: 600px;
    margin: 30px auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header .close {
    float: right;
    font-size: 21px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    opacity: 0.2;
    cursor: pointer;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
}

/* 登录页面 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 400px;
    max-width: 90%;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h2 {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.login-logo p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

.login-box-body {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    color: #007AFF;
    margin: 0 10px;
}

/* 警告框 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.dropdown-menu > li > a {
    display: block;
    padding: 3px 20px;
    clear: both;
    font-weight: normal;
    line-height: 1.5;
    color: #333;
    white-space: nowrap;
}

.dropdown-menu > li > a:hover {
    background-color: #f5f5f5;
}

/* 二维码上传 */
.qrcode-upload-wrap {
    position: relative;
}

.qrcode-file-input {
    display: none !important;
}

.qrcode-preview-area {
    width: 220px;
    height: 220px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.3s, background 0.3s;
    background: #fafafa;
}

.qrcode-preview-area:hover {
    border-color: #007AFF;
    background: #f0f7ff;
}

.qrcode-preview-area.has-image {
    border-style: solid;
    border-color: #e0e0e0;
    background: #fff;
}

.qrcode-preview-area.has-image:hover {
    border-color: #007AFF;
}

.qrcode-placeholder {
    text-align: center;
    color: #999;
}

.qrcode-placeholder i {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
    color: #ccc;
}

.qrcode-placeholder span {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.qrcode-placeholder small {
    display: block;
    font-size: 11px;
    color: #bbb;
}

.qrcode-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qrcode-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.qrcode-actions .btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.qrcode-upload-progress {
    margin-top: 6px;
    display: none;
}

.uploading-text {
    color: #007AFF;
    font-size: 12px;
}

.uploading-text i {
    margin-right: 4px;
}

.qrcode-clear-btn {
    color: #999;
    border-color: #ddd;
    background: #fff;
}

.qrcode-clear-btn:hover {
    color: #d9534f;
    border-color: #d9534f;
}

/* 响应式 */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px;
    }

    .info-box {
        margin-bottom: 10px;
    }

    .login-box {
        width: 90%;
    }

    .modal-dialog {
        width: 90%;
    }
}