/* CSS 變數系統 */
:root {
    /* 品牌主色 - 橘色系 */
    --primary-color: #ffa73b;
    --primary-dark: #ff8800;
    --primary-light: #fff8ef;
    --primary-gradient: #ffa73b;

    /* 文字顏色 */
    --text-primary: #333;
    --text-secondary: #555;
    --text-tertiary: #888;
    --text-muted: rgba(51,51,51,.85);
    --text-white: white;

    /* 背景色 */
    --bg-body: #f5f5f5;
    --bg-white: white;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafafa;

    /* 邊框色 */
    --border-color: #ddd;
    --border-light: #e9ecef;
    --border-lighter: #f0f0f0;

    /* 語意色 */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --warning-color: #ff9800;

    /* 字體 */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
}

/* 共用基礎樣式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
    background: #f5f5f5;
    padding: 0;
}

/* ==================== Navigation Bar ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    height: 50px;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 0;
}

.navbar-link {
    display: inline-block;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.navbar-link:hover {
    color: #0D47A1;
    border-bottom-color: #0D47A1;
}

.navbar-link.active {
    color: #0D47A1;
    border-bottom-color: #0D47A1;
}

.navbar-btn {
    font-family: inherit;
}

.container {
    max-width: 1184px;
    margin: 70px auto 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: var(--primary-gradient);
    color: var(--text-white);
    padding: 20px 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header h1 {
    font-size: 22px;
    margin: 0;
    flex-shrink: 0;
}

/* 計畫選擇器包裝 */
.plan-selector-wrapper {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.plan-selector-wrapper label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.plan-selector-wrapper select {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-selector-wrapper select:hover {
    background: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.plan-selector-wrapper select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 保額輸入框樣式 */
.plan-selector-wrapper input[type="number"] {
    width: 100px;
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.2s ease;
}

.plan-selector-wrapper input[type="number"]:hover {
    background: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.plan-selector-wrapper input[type="number"]:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.plan-selector-wrapper .coverage-unit {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

/* 響應式設計 */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .plan-selector-wrapper {
        width: 100%;
        justify-content: space-between;
    }

    .plan-selector-wrapper select {
        flex: 1;
        min-width: 0;
    }
}

/* 舊的計畫選擇器樣式（保留以防其他地方使用） */
.plan-selector {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-selector label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.plan-selector select {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.plan-selector select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: white;
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 30px;
    min-height: 600px;
}

.tab-content.active {
    display: block;
}

/* 通用按鈕樣式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: #f8f9fa;
}

.add-item-btn {
    width: 100%;
    padding: 15px;
    border: 2px dashed var(--border-color);
    background: var(--bg-light);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.add-item-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

/* 手機版響應式設計 */
@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 16px 15px;
    }

    .header h1 {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 12px;
    }

    .tab-content {
        padding: 15px;
    }

    .tab {
        padding: 12px 8px;
        font-size: 13px;
    }

    .add-item-btn {
        padding: 12px;
    }
}
