/* ==========================================================================
   assets/css/main.css - 全站子網頁統一風格藍本 (卡片、表單、按鈕、網格)
   ========================================================================== */

body {
    font-family: "Microsoft JhengHei", "Segoe UI", sans-serif;
    background-color: #f4f7f6;
    color: #2d3748;
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

/* 內容容器 */
.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* 標題風格 */
h2, h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* 統一卡片外觀 */
.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* 彈性網格排版 */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.full-width { grid-column: span 3; }
.half-width { grid-column: span 2; }

/* 表單欄位與標籤 */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #2d3748;
    font-size: 14px;
}
.required-field::after {
    content: " *";
    color: #e74c3c;
}

/* 統一輸入框、下拉選單、文字框樣式 */
input[type="text"], 
input[type="number"], 
input[type="password"], 
select, 
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    outline: none;
}
.readonly-input {
    background: #edf2f7 !important;
    color: #4a5568;
    font-weight: bold;
    cursor: not-allowed;
}

/* 單選與複選區塊樣式 */
.opt-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    min-height: 40px;
    align-items: center;
    box-sizing: border-box;
}
.opt-group label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 13px;
}
.opt-group input[type="radio"], 
.opt-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* 統一綠色儲存按鈕 */
.btn-green {
    background: #27ae60;
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-green:hover {
    background: #219653;
}

/* 統一表格樣式 (若管理列表頁面有需要) */
.main-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}
.main-table th, .main-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.main-table th {
    background-color: #f7fafc;
    color: #4a5568;
    font-weight: bold;
}
.main-table tr:hover {
    background-color: #f8fafc;
}