/* ============================================================
   member.css - 會員專區樣式 (完整版含 RWD)
   ============================================================ */

/* ============================================================
   1. Member Container (左側選單 + 右側內容)
   ============================================================ */
.member-container {
    display: flex;
    min-height: calc(100vh - 120px);
    background: #f5f7fa;
}

/* ============================================================
   2. 左側選單
   ============================================================ */
.sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid #e8ecf1;
    flex-shrink: 0;
    padding: 20px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}

/* 使用者資訊 */
.sidebar-user {
    text-align: center;
    padding: 10px 15px 20px;
    border-bottom: 1px solid #e8ecf1;
    margin-bottom: 10px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.sidebar-user .user-name {
    font-weight: 600;
    color: #1a2332;
    font-size: 15px;
}

.sidebar-user .user-org {
    font-size: 13px;
    color: #888;
}

/* 選單項目 */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sidebar-menu li a:hover {
    background: #f0f4f9;
    border-left-color: #2e7d32;
    color: #1a2332;
}

.sidebar-menu li a.active {
    background: #e8f5e9;
    border-left-color: #2e7d32;
    color: #1a2332;
    font-weight: 600;
}

.sidebar-menu li.divider {
    height: 1px;
    background: #e8ecf1;
    margin: 10px 15px;
}

/* 登出按鈕 */
.logout-form {
    display: block;
    margin: 0;
    padding: 0;
}

.logout-form button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: #555;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.logout-form button:hover {
    background: #fde8e8;
    border-left-color: #d32f2f;
    color: #d32f2f;
}

/* ============================================================
   3. 右側內容區
   ============================================================ */
.content-area {
    flex: 1;
    padding: 25px 35px;
    background: #f5f7fa;
}

.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-header h2 {
    font-size: 24px;
    color: #1a2332;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #666;
    font-size: 15px;
}

/* ============================================================
   4. 說明卡片
   ============================================================ */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    border: 1px solid #e8ecf1;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.info-card h3 {
    font-size: 18px;
    color: #1a2332;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    padding: 7px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}

.info-card ul li:last-child {
    border-bottom: none;
}

.info-card ul li strong {
    color: #1a2332;
}

/* ============================================================
   5. 快速功能
   ============================================================ */
.dashboard-section {
    margin-bottom: 25px;
}

.dashboard-section h3 {
    font-size: 18px;
    color: #1a2332;
    margin-bottom: 12px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-btn {
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s ease;
    font-weight: 500;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================================
   6. 按鈕顏色（與 product.css 一致）
   ============================================================ */
.green-btn {
    background: #2e7d32;
    color: #fff !important;
}
.green-btn:hover {
    background: #1b5e20;
}

.blue-btn {
    background: #1565c0;
    color: #fff !important;
}
.blue-btn:hover {
    background: #0d47a1;
}

.gray-btn {
    background: #616161;
    color: #fff !important;
}
.gray-btn:hover {
    background: #424242;
}

/* ============================================================
   7. 錯誤/成功訊息
   ============================================================ */
.error-msg {
    padding: 12px 16px;
    background: #fde8e8;
    color: #c62828;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    margin-bottom: 16px;
    font-size: 14px;
}

.success-msg {
    padding: 12px 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ============================================================
   8. 🌐 RWD - 平板 (768px 以下)
   ============================================================ */
@media screen and (max-width: 768px) {
    .member-container {
        flex-direction: column;
        min-height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8ecf1;
        padding: 10px 0;
        box-shadow: none;
    }

    .sidebar-user {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 8px 16px 12px;
        text-align: left;
        border-bottom: 1px solid #e8ecf1;
        margin-bottom: 8px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0;
    }

    .sidebar-user .user-org {
        font-size: 12px;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        padding: 0 10px;
    }

    .sidebar-menu li {
        flex: 1 1 auto;
    }

    .sidebar-menu li a {
        padding: 8px 14px;
        font-size: 13px;
        border-left: none;
        border-bottom: 3px solid transparent;
        text-align: center;
        border-radius: 4px 4px 0 0;
    }

    .sidebar-menu li a.active {
        border-left: none;
        border-bottom-color: #2e7d32;
        background: #e8f5e9;
        border-radius: 4px 4px 0 0;
    }

    .sidebar-menu li a:hover {
        border-left: none;
        border-bottom-color: #2e7d32;
        background: #f0f4f9;
        border-radius: 4px 4px 0 0;
    }

    .sidebar-menu li.divider {
        display: none;
    }

    .logout-form button {
        text-align: center;
        padding: 8px 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        font-size: 13px;
        border-radius: 4px 4px 0 0;
    }

    .logout-form button:hover {
        border-left: none;
        border-bottom-color: #d32f2f;
        background: #fde8e8;
        border-radius: 4px 4px 0 0;
    }

    .content-area {
        padding: 18px 20px;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    .info-card {
        padding: 18px 20px;
    }

    .info-card h3 {
        font-size: 16px;
    }

    .quick-actions {
        gap: 8px;
    }

    .quick-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============================================================
   9. 🌐 RWD - 手機 (480px 以下)
   ============================================================ */
@media screen and (max-width: 480px) {
    .sidebar-menu {
        flex-direction: column;
        padding: 0 10px;
    }

    .sidebar-menu li {
        flex: 1 1 auto;
    }

    .sidebar-menu li a {
        text-align: left;
        padding: 10px 15px;
        border-bottom: none;
        border-left: 3px solid transparent;
        font-size: 14px;
        border-radius: 0;
    }

    .sidebar-menu li a.active {
        border-left-color: #2e7d32;
        border-bottom: none;
        background: #e8f5e9;
        border-radius: 0 4px 4px 0;
    }

    .sidebar-menu li a:hover {
        border-left-color: #2e7d32;
        border-bottom: none;
        border-radius: 0 4px 4px 0;
    }

    .logout-form button {
        text-align: left;
        padding: 10px 15px;
        border-bottom: none;
        border-left: 3px solid transparent;
        font-size: 14px;
        border-radius: 0;
    }

    .logout-form button:hover {
        border-bottom: none;
        border-left-color: #d32f2f;
        background: #fde8e8;
        border-radius: 0 4px 4px 0;
    }

    .content-area {
        padding: 12px 14px;
    }

    .dashboard-header h2 {
        font-size: 18px;
    }

    .dashboard-header p {
        font-size: 14px;
    }

    .info-card {
        padding: 15px 16px;
        border-radius: 8px;
    }

    .info-card h3 {
        font-size: 15px;
    }

    .info-card ul li {
        font-size: 13px;
        padding: 5px 0;
    }

    .info-card p {
        font-size: 14px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-btn {
        text-align: center;
        padding: 10px 16px;
        font-size: 14px;
    }
}