* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", Arial, sans-serif; background: #f2f2f2; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e, #0f3460); }
.login-box { width: 400px; background: #fff; border-radius: 8px; padding: 40px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-box h2 { text-align: center; color: #1a1a2e; margin-bottom: 8px; }
.login-box .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 30px; }
.form-item { margin-bottom: 18px; position: relative; }
.form-item input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; outline: none; }
.form-item input:focus { border-color: #009688; }
.form-item .icon { position: absolute; left: 12px; top: 11px; color: #999; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-row img { height: 56px; width: 180px; border-radius: 4px; cursor: pointer; border: 1px solid #ddd; flex-shrink: 0; }
.form-extra { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13px; }
.btn-login { width: 100%; padding: 11px; background: #009688; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; }
.btn-login:hover { background: #00796b; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: #999; }
.login-footer a { color: #009688; text-decoration: none; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #20222A; color: #fff; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 10; }
.sidebar .logo { padding: 18px 20px; font-size: 18px; font-weight: bold; border-bottom: 1px solid #333; }
.sidebar .logo span { color: #009688; }
.menu { list-style: none; padding: 10px 0; }
.menu > li > a { display: block; padding: 12px 20px; color: #ccc; text-decoration: none; cursor: pointer; transition: all .2s; }
.menu > li > a:hover, .menu > li > a.active { background: #009688; color: #fff; }
.menu .submenu { list-style: none; display: none; background: #1a1c24; }
.menu .submenu.open { display: block; }
.menu .submenu a { display: block; padding: 10px 20px 10px 40px; color: #aaa; text-decoration: none; font-size: 13px; }
.menu .submenu a:hover { color: #009688; background: rgba(0,150,136,.1); }
.menu .submenu a.active { background: #009688; color: #fff; }
.menu > li > a.parent-open { color: #fff; }

.main-wrap { flex: 1; margin-left: 220px; }
.topbar { background: #fff; padding: 0 20px; height: 50px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 5; }
.topbar .search-box { position: relative; }
.topbar .search-box input { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; width: 220px; font-size: 13px; }
.search-results { position: absolute; top: 34px; left: 0; width: 320px; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.1); max-height: 200px; overflow: auto; display: none; z-index: 100; }
.search-results.show { display: block; }
.search-results table { width: 100%; border-collapse: collapse; font-size: 13px; }
.search-results td { padding: 8px 12px; border-bottom: 1px solid #eee; cursor: pointer; }
.search-results tr:hover { background: #f0faf8; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.topbar-right a { color: #666; text-decoration: none; cursor: pointer; }
.topbar-right a:hover { color: #009688; }

.content { padding: 15px 20px 20px; }
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 12px; }
.breadcrumb a { color: #999; text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: #009688; }

.panel-box { background: #fff; border: 1px solid #e6e6e6; border-radius: 2px; }
.panel-hd { padding: 12px 16px; border-bottom: 1px solid #e6e6e6; font-size: 14px; font-weight: bold; color: #333; background: #fafafa; }
.panel-bd { padding: 0; }
.panel-toolbar { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-toolbar input { padding: 6px 10px; border: 1px solid #e6e6e6; border-radius: 2px; font-size: 13px; width: 200px; }

.market-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.market-table th, .market-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; text-align: left; }
.market-table th { background: #fafafa; color: #666; font-weight: normal; }
.market-table tbody tr:hover { background: #f8f8f8; }
.market-table input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }

/* Cards */
.card { background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card-title { font-size: 16px; font-weight: bold; margin-bottom: 16px; color: #333; border-left: 3px solid #009688; padding-left: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-item { background: linear-gradient(135deg, #009688, #00796b); color: #fff; padding: 20px; border-radius: 6px; text-align: center; }
.stat-item .num { font-size: 28px; font-weight: bold; }
.stat-item .label { font-size: 13px; opacity: .9; margin-top: 4px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; }
.data-table th { background: #fafafa; font-weight: bold; color: #666; }
.data-table tr:hover { background: #f9f9f9; }
.up { color: #e53935; }
.down { color: #43a047; }

/* Forms */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.form-row label { font-size: 13px; color: #666; }
.form-row select, .form-row input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.btn { padding: 8px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-green { background: #009688; color: #fff; }
.btn-green:hover { background: #00796b; }
.btn-red { background: #e53935; color: #fff; }
.btn-outline { background: #fff; border: 1px solid #009688; color: #009688; }

#chart-container { width: 100%; height: 450px; }

.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.shortcut-item { text-align: center; padding: 20px 10px; background: #f8f9fa; border-radius: 6px; cursor: pointer; transition: all .2s; }
.shortcut-item:hover { background: #e0f2f1; transform: translateY(-2px); }
.shortcut-item i { font-size: 28px; color: #009688; display: block; margin-bottom: 8px; }
.shortcut-item span { font-size: 13px; color: #666; }

.msg { padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 13px; }
.msg-success { background: #e8f5e9; color: #2e7d32; }
.msg-error { background: #ffebee; color: #c62828; }

@media (max-width: 768px) {
  .sidebar { width: 0; overflow: hidden; }
  .main-wrap { margin-left: 0; }
}
