/* ===============================
   GLOBAL
=============================== */

body {
    margin: 0;
    padding: 0;
    background: #000; /* 數字雨底色 */
    font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
    color: #d7f9ff;
    overflow-x: hidden;
}

/* 數字雨背景 */
#matrixRain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

.matrix-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2;
}

/* ===============================
   SIDEBAR
=============================== */

.sidebar {
    width: 220px;
    height: 100vh;
    background: rgba(0, 20, 40, 0.88);
    backdrop-filter: blur(14px);
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.sidebar .logo {
    font-size: 22px;
    font-weight: bold;
    color: #59caff;
    margin-bottom: 25px;
    text-shadow: 0 0 12px #009dff;
}

.user-box {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 25px;
    font-size: 14px;
    color: #bfe8ff;
}

.sidebar a {
    display: block;
    padding: 10px 0;
    color: #d6eeff;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

.sidebar a:hover {
    color: #59caff;
    text-shadow: 0 0 12px #009dff;
    transform: translateX(4px);
}

.sidebar .logout {
    margin-top: 20px;
    color: #ff6b6b !important;
}

/* ===============================
   MAIN CONTENT
=============================== */

.main {
    margin-left: 240px; 
    padding: 40px 30px;
    position: relative;
    z-index: 5; /* 高於背景、低於 sidebar */
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #7fc9ff;
    text-shadow: 0 0 12px #009dff;
}

/* ===============================
   CARDS / BOXES / LIST / TABLE
=============================== */

.box,
.card {
    padding: 20px;
    background: rgba(0, 40, 80, 0.35);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    color: #cfeaff;
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: #7fc9ff;
    text-shadow: 0 0 10px #009dff;
}

/* ===============================
   TABLE
=============================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(0, 40, 80, 0.25);
    border-radius: 12px;
    overflow: hidden;
}

table thead {
    background: rgba(0, 60, 110, 0.55);
}

table thead th {
    padding: 12px;
    color: #9ed9ff;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

table tbody tr {
    transition: 0.2s;
}

table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

table td {
    padding: 12px;
    color: #dff6ff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ===============================
   BUTTONS
=============================== */

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: 0.25s;
    text-decoration: none;
}

.btn-blue {
    background: #009dff;
    color: white;
    box-shadow: 0 0 10px #009dff90;
}

.btn-blue:hover {
    background: #00b2ff;
}

.btn-red {
    background: #ff6b6b;
    color: #fff;
}

.btn-red:hover {
    background: #ff7f7f;
}

/* ===============================
   INPUT / FORM
=============================== */

input, select, textarea {
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.2);
    color: #dff6ff;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 15px;
    backdrop-filter: blur(10px);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #59caff;
    box-shadow: 0 0 8px #009dff88;
}

/* ===============================
   GENERAL UTILITY
=============================== */

.center {
    text-align: center;
}

.text-small {
    font-size: 14px;
}

.text-neon {
    color: #59caff;
    text-shadow: 0 0 8px #009dff;
}
/* ===============================
   SEARCH BAR
=============================== */

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    background: rgba(0,40,80,0.35);
    border: 1px solid rgba(120,200,255,0.35);
    border-radius: 8px;
    color: #d7f9ff;
}

.search-bar button,
.btn-new {
    padding: 10px 16px;
    background: #009dff;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 0 10px #009dff70;
}

.search-bar button:hover,
.btn-new:hover {
    background: #00b5ff;
}

/* ===============================
   TAG 標籤（客戶風險）
=============================== */

.tag {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #fff;
    display: inline-block;
}

.tag-red {
    background: #d13b3b;
    box-shadow: 0 0 6px #ff4b4b80;
}

.tag-green {
    background: #0a9f5a;
    box-shadow: 0 0 6px #1aff9a60;
}

/* ===============================
   小按鈕（操作：查看 / 編輯 / 刪除）
=============================== */

.btn-small {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: white;
    text-decoration: none;
    background: #0077ff;
    box-shadow: 0 0 8px #0077ff70;
    transition: 0.2s;
    display: inline-block;
}

.btn-small:hover {
    filter: brightness(1.25);
}

.btn-yellow {
    background: #e5a300;
    box-shadow: 0 0 8px #e5a30070;
}

.btn-red {
    background: #ff5c5c;
    box-shadow: 0 0 8px #ff5c5c80;
}
/* 表格標題置中 */
table thead th {
    text-align: center !important;
}

/* 表格內容也跟著置中（可選）*/
table tbody td {
    text-align: center;
}
/* 搜尋列按鈕高度一致 + 垂直置中 */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar input {
    flex: 1;
}

.search-bar button,
.search-bar .btn-new {
    height: 42px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 表格標題置中 */
table thead th {
    text-align: center !important;
}

/* 表格置中容器 */
.list-center {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}
