/* ============================================
   股票交易登记系统 — 生态禅意主题
   配色：深竹绿 #2d5016 | 青叶 #5a8f3e
         浅芽 #8ab661 | 大地 #d4c5a9
         宣纸 #f5f0eb | 墨色 #2c2c2c
   ============================================ */

/* === 基础重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f0eb;
    color: #2c2c2c;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #5a8f3e;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #2d5016;
}

/* === 容器布局 === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(45, 80, 22, 0.06);
    border-radius: 8px;
    flex: 1;
}

/* === 页头导航 === */
.header {
    background: linear-gradient(135deg, #2d5016, #5a8f3e);
    padding: 0;
    box-shadow: 0 2px 12px rgba(45, 80, 22, 0.2);
    margin-bottom: 30px;
}

.header .container {
    background: transparent;
    box-shadow: none;
    padding: 0 30px;
    border-radius: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 0;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
    letter-spacing: 2px;
}
.navbar-brand:hover {
    color: #d4e8c2;
}
.navbar-brand small {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.8;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
}

.navbar-menu li a {
    display: block;
    color: rgba(255,255,255,0.9);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.navbar-menu li a:hover,
.navbar-menu li a.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}
.navbar-menu li a.active {
    background: rgba(255,255,255,0.2);
}

/* === 账户切换器 === */
.account-switcher {
    margin-left: 12px;
}
.account-switcher select {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 6px 28px 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
    font-family: inherit;
}
.account-switcher select:hover {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}
.account-switcher select option {
    background: #2d5016;
    color: #ffffff;
    padding: 4px 8px;
}

/* === 页尾 === */
.footer {
    background: #2d5016;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 18px 0;
    margin-top: 30px;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.footer a {
    color: #b8d9a0;
}
.footer a:hover {
    color: #ffffff;
}

/* === 页面标题 === */
.page-title {
    font-size: 22px;
    color: #2d5016;
    border-left: 4px solid #5a8f3e;
    padding-left: 14px;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 1px;
}

.section-title {
    font-size: 17px;
    color: #3d6b28;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e0d6;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === 统计卡片 === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    background: #f9f6f2;
    border: 1px solid #e8e0d6;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    transition: all 0.3s ease;
}
.stat-card:hover {
    border-color: #b8d9a0;
    box-shadow: 0 4px 16px rgba(90, 143, 62, 0.10);
    transform: translateY(-2px);
}

.stat-card .stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d5016;
}
.stat-card .stat-value.green { color: #2d5016; }
.stat-card .stat-value.red { color: #b34a4a; }
.stat-card .stat-value.blue { color: #3a7bb5; }

/* === 表单样式 === */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d6b28;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d4c5a9;
    border-radius: 6px;
    font-size: 14px;
    background: #fdfcfa;
    color: #2c2c2c;
    transition: all 0.3s ease;
    font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #5a8f3e;
    box-shadow: 0 0 0 3px rgba(90, 143, 62, 0.12);
    background: #ffffff;
}
textarea {
    min-height: 80px;
    resize: vertical;
}

/* === 按钮系统 === */
.btn {
    display: inline-block;
    padding: 9px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    font-family: inherit;
    text-align: center;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #5a8f3e, #3d6b28);
    color: #ffffff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4a7a32, #2d5016);
}

.btn-success {
    background: linear-gradient(135deg, #6a9f4e, #4a7a32);
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, #c0392b, #96281b);
    color: #ffffff;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #a93226, #7a1f15);
}

.btn-warning {
    background: linear-gradient(135deg, #d4a017, #b8860b);
    color: #ffffff;
}

.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-link {
    background: transparent;
    color: #5a8f3e;
    padding: 5px 10px;
}
.btn-link:hover {
    background: rgba(90, 143, 62, 0.08);
    box-shadow: none;
}

/* === 表格 === */
.table-container {
    overflow-x: auto;
    margin: 16px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
}

table th {
    background: #f0ebe4;
    color: #2d5016;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #d4c5a9;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

table td {
    padding: 9px 12px;
    border-bottom: 1px solid #ede7df;
    vertical-align: middle;
}

table tr:hover td {
    background: #f7f3ed;
}

table .win { color: #2d5016; font-weight: 600; }
table .lose { color: #b34a4a; font-weight: 600; }
table .total-row td {
    background: #f0ebe4;
    font-weight: 700;
    border-top: 2px solid #5a8f3e;
}

/* === 消息提示 === */
.msg {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid;
}
.msg-success {
    background: #eaf5e2;
    border-color: #5a8f3e;
    color: #2d5016;
}
.msg-error {
    background: #fce8e6;
    border-color: #c0392b;
    color: #96281b;
}
.msg-info {
    background: #e8f0fa;
    border-color: #3a7bb5;
    color: #1a4d7a;
}

/* === 禅意装饰 === */
.zen-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d4c5a9, transparent);
    margin: 30px 0;
}

/* === 空状态 === */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}
.empty-state .icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 10px;
}

/* === 标签 === */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.tag-win { background: #e0f0d5; color: #2d5016; }
.tag-lose { background: #f5d5d0; color: #b34a4a; }
.tag-buy { background: #d5e8f5; color: #1a4d7a; }
.tag-sell { background: #f5e8d5; color: #7a5a1a; }

/* === 响应式 === */
@media (max-width: 768px) {
    .container { padding: 15px; }
    .navbar { flex-direction: column; gap: 10px; }
    .navbar-menu { justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    table { font-size: 12px; }
    table th, table td { padding: 6px 8px; }
}

/* === 滚动条美化 === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f5f0eb; }
::-webkit-scrollbar-thumb { background: #c4b8a8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a89888; }
