/* LawFirm admin skin — 照 screenshot：白卡 + sidebar + 藍/橙按鈕 */
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", sans-serif; background: #f3f5f9; color: #333; font-size: 14px; }

.topbar { display: flex; align-items: center; justify-content: space-between; background: #fff; height: 64px; padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 10; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: 4px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topicon { color: #555; font-size: 16px; text-decoration: none; }
.topicon:hover { color: #2f6fed; }
.lang { color: #555; cursor: pointer; }
.userchip { color: #333; display: flex; align-items: center; gap: 6px; }

.shell { display: flex; min-height: calc(100vh - 64px); }
.sidebar { width: 200px; background: #fff; padding: 12px 0; flex-shrink: 0; }
.menu { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #444; text-decoration: none; border-left: 3px solid transparent; }
.menu i { width: 18px; text-align: center; }
.menu:hover { background: #f6f8fc; }
.menu.on { color: #2f6fed; border-left-color: #2f6fed; background: #f0f5ff; }
.menu-sep { height: 10px; border-top: 1px solid #eee; margin: 10px 0; }

.content { flex: 1; padding: 20px 28px; overflow-x: auto; }
.crumb { color: #8a94a6; margin-bottom: 14px; }

/* 搜尋卡 + 表格 */
.card { background: #fff; border-radius: 8px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.filters { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-end; }
.f-item { display: flex; flex-direction: column; gap: 6px; }
.f-item label { color: #333; font-weight: 600; }
.f-item input, .f-item select { border: 1px solid #d9d9d9; border-radius: 6px; padding: 8px 12px; width: 190px; font-size: 14px; outline: none; }
.f-item input:focus, .f-item select:focus { border-color: #2f6fed; }
.f-range { display: flex; align-items: center; gap: 6px; }

.btn { border: 0; border-radius: 6px; padding: 9px 22px; font-size: 14px; cursor: pointer; color: #fff; display: inline-block; text-decoration: none; }
.btn-search { background: #e8742a; }
.btn-reset { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-add { background: #2f6fed; }
.btn-green { background: #52a01a; }
.btn-red { background: #e23a3a; }
.btn-grey { background: #97a1af; }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }

table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th { text-align: left; padding: 12px 10px; border-bottom: 1px solid #eee; font-weight: 600; }
table.data td { padding: 11px 10px; border-bottom: 1px solid #f2f2f2; }
table.data tr:hover td { background: #f8faff; }
table.data a { color: #2f6fed; text-decoration: none; }
table.data a:hover { text-decoration: underline; }
.empty { text-align: center; color: #999; padding: 40px 0; }

.pager { display: flex; gap: 8px; align-items: center; padding: 14px 4px; }
.pager a, .pager b { border: 1px solid #d9d9d9; border-radius: 4px; padding: 6px 14px; color: #333; text-decoration: none; background: #fff; }
.pager b { background: #2f6fed; color: #fff; border-color: #2f6fed; }

/* modal dialog（對應舊 DialogShow） */
.dlg.hide { display: none; }
.dlg { position: fixed; inset: 0; z-index: 100; }
.dlg-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.dlg-box { position: relative; margin: 40px auto; background: #fff; border-radius: 8px; overflow: hidden; max-width: 95vw; }
.dlg-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid #eee; }
.dlg-x { color: #888; font-size: 18px; text-decoration: none; }
.dlg-frame { border: 0; width: 100%; height: calc(100% - 45px); }

/* edit 頁（iframe 內） */
.edit-form { padding: 20px 26px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 30px; }
.edit-grid .f-item input, .edit-grid .f-item select, .edit-grid .f-item textarea { width: 100%; }
.edit-grid .full { grid-column: 1 / -1; }
.edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.chk-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 0; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1c2b4a, #2f6fed); }
.login-card { background: #fff; border-radius: 12px; padding: 40px; width: 380px; }
.login-card h1 { font-size: 20px; margin: 0 0 6px; }
.login-card .sub { color: #8a94a6; margin-bottom: 26px; }
.login-card input { width: 100%; border: 1px solid #d9d9d9; border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.login-card .btn { width: 100%; padding: 12px; }
.login-err { color: #e23a3a; margin-bottom: 12px; }

/* desktop 工作台 */
.welcome { background: linear-gradient(90deg, #1c2b4a, #40518a); color: #fff; border-radius: 8px; padding: 34px 30px; margin-bottom: 16px; }
.welcome h2 { margin: 0 0 6px; font-weight: 500; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: #fff; border-radius: 8px; padding: 18px 22px; min-height: 220px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; color: #2f6fed; display: flex; justify-content: space-between; }
.panel h3 .tabs { font-weight: 400; color: #666; font-size: 13px; }
.panel h3 .tabs a { color: #666; text-decoration: none; margin-left: 10px; }
.panel h3 .tabs a.on { color: #2f6fed; }

/* 案件詳情 tab 列 + header */
.case-head { margin-bottom: 10px; }
.case-head-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; font-size: 13px; }
.case-head-grid b { color: #666; font-weight: 500; }
.tabs { display: flex; gap: 2px; margin: 10px 0; flex-wrap: wrap; }
.tabs .tab { padding: 7px 14px; background: #f0f2f5; border-radius: 6px 6px 0 0; color: #555; text-decoration: none; font-size: 13px; }
.tabs .tab.on { background: #fff; color: #2f6fed; font-weight: 600; }
.muted { color: #888; font-size: 12px; }
