/* ── 整體容器 ── */
.mm-wrapper {
    display: flex;
    min-height: 500px;
    font-family: inherit;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    background: #ffffff;
}

/* ── 左欄 ── */
.mm-left {
    width: 210px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
}

.mm-tab-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.mm-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 20px;
    cursor: pointer;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.mm-tab:hover {
    background-color: #fff5f3;
    border-left-color: #e98b33;
    color: #e98b33;
}

.mm-tab.is-active {
    background-color: #E43414;
    border-left-color: #c22c10;
    color: #ffffff;
}

.mm-arrow {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.mm-tab:hover .mm-arrow,
.mm-tab.is-active .mm-arrow {
    opacity: 1;
}

/* ── Panel 容器（中 + 右欄橫排） ── */
.mm-panels {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.mm-panel {
    display: none;
    height: 100%;
    overflow: hidden;
}

.mm-panel.is-active {
    display: flex;
}

/* ── 中欄（第二層） ── */
.mm-center {
    width: 240px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-right: 1px solid #e8e8e8;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mm-center-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
    flex: 1;
}

.mm-center-list li,
.mm-center-item {
    list-style: none !important;
}

.mm-center-list li::before,
.mm-center-list li::marker,
.mm-center-item::before,
.mm-center-item::marker {
    display: none !important;
    content: none !important;
}

.mm-center-item {
    margin: 0;
}

.mm-center-item {
    padding: 6px 12px;
}

.mm-center-link {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 13px;
    border-radius: 10px;
    color: #333333;
    cursor: pointer;
    border-left: none;
    transition: background-color 0.15s;
    list-style: none;
}

.mm-center-link:hover {
    background-color: #fff5f3;
}

.mm-center-link:hover .mm-center-title {
    color: #E43414;
}

.mm-center-link.is-active {
    background-color: #fff5f3;
}

.mm-center-link.is-active .mm-center-title {
    color: #E43414;
}

.mm-center-body {
    display: contents;
}

.mm-center-title,
span.mm-center-title {
    display: block !important;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    transition: color 0.15s;
}

.mm-link-arrow {
    width: 13px;
    height: 13px;
    fill: #cccccc;
    flex-shrink: 0;
    transition: transform 0.15s, fill 0.15s;
}

.mm-center-link:hover .mm-link-arrow,
.mm-center-link.is-active .mm-link-arrow {
    fill: #E43414;
}

.mm-center-desc,
span.mm-center-desc {
    display: block !important;
    font-size: 12px;
    color: #666666;
    line-height: 1.55;
    width: 100%;
}

/* ── 右欄（第三層） ── */
.mm-right {
    flex: 1;
    background-color: #ffffff;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

/* subpanel 預設隱藏，active 才顯示 */
.mm-subpanel {
    display: none;
}

.mm-subpanel.is-active {
    display: block;
}

.mm-no-cards {
    font-size: 13px;
    color: #999999;
    padding: 12px 0;
    margin: 0;
}

/* ── 卡片 Grid ── */
.mm-cards-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mm-card {
    background-color: #ffffff;
    border-style: solid;
    border-width: 1px;
    border-color: #e8e8e8;
    border-radius: 6px;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mm-card:hover {
    background-color: #fff5f3;
    border-color: #E43414;
    box-shadow: 0 2px 8px rgba(228, 52, 20, 0.10);
}

.mm-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
}

.mm-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mm-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    line-height: 1.35;
    transition: color 0.15s;
}

.mm-card:hover .mm-card-title {
    color: #e98b33;
}

.mm-card-desc {
    font-size: 12px;
    color: #666666;
    line-height: 1.55;
}

.mm-card-arrow {
    width: 13px;
    height: 13px;
    fill: #cccccc;
    flex-shrink: 0;
    transition: transform 0.15s, fill 0.15s;
}

.mm-card:hover .mm-card-arrow {
    transform: translateX(3px);
    fill: #e98b33;
}

/* ── RWD ── */
@media (max-width: 768px) {
    .mm-wrapper { flex-direction: column; }
    .mm-left { width: 100%; border-right: none; border-bottom: 1px solid #e8e8e8; }
    .mm-tab-list { display: flex; flex-wrap: wrap; padding: 0; }
    .mm-tab { border-left: none; border-bottom: 3px solid transparent; }
    .mm-tab:hover { border-bottom-color: #e98b33; border-left-color: transparent; }
    .mm-tab.is-active { border-bottom-color: #E43414; border-left-color: transparent; }
    .mm-panel.is-active { flex-direction: column; }
    .mm-center { width: 100%; border-right: none; border-bottom: 1px solid #e8e8e8; padding: 12px 0; }
    .mm-center-list { display: flex; flex-wrap: wrap; }
    .mm-center-item { width: 50%; }
    .mm-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .mm-cards-grid { grid-template-columns: 1fr; }
}
