.mg-quote {
    margin: 12px 0 20px;
}

.mg-quote h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.mg-quote-desc {
    color: #6b7280;
    margin-bottom: 8px;
}

.mg-quote-title {
    font-weight: 600;
    color: #334155;
    margin: 8px 0 6px;
}

.mg-quote-list {
    margin: 0;
    padding-left: 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.dark .mg-quote-desc {
    color: #9aa4b2;
}

.dark .mg-quote-title {
    color: #e2e8f0;
}

.dark .mg-quote-list {
    color: #9aa4b2;
}

.mg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.mg-card {
    border: 1px solid #eceff3;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    justify-content: center;
}

.mg-card-add {
    border: 2px dashed #cbd5f5;
    background: #f5f7ff;
    color: #6b7bd6;
    align-items: center;
    justify-content: center;
}

.mg-card-add i {
    font-size: 32px;
    line-height: 1;
}

.dark .mg-card-add {
    border-color: #2d3655;
    background: #1f2433;
    color: #9aa4ff;
}

.dark .mg-card {
    background: #1f2022;
    border-color: #2c2f34;
}

.mg-card:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.dark .mg-card:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.mg-card-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mg-card-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.mg-card-pending {
    font-size: 12px;
    color: #b45309;
    background: #fef3c7;
    border-radius: 10px;
    padding: 2px 6px;
}

.dark .mg-card-pending {
    color: #facc15;
    background: rgba(180, 83, 9, 0.25);
}

.mg-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-card-head > .mg-card-avatar {
    flex: 0 0 auto;
}

.mg-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.mg-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dark .mg-card-avatar {
    background: #2a2c31;
    color: #9aa4b2;
}

.mg-card-remark {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 16px;
}

.mg-card-loading {
    color: #9ca3af;
    text-align: center;
}

.mg-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0 18px;
}

.mg-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mg-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.mg-editable {
    cursor: text;
}

.mg-editable:hover {
    background: rgba(59, 130, 246, 0.08);
}

.mg-inline-input {
    font-size: 16px;
}

.mg-member-name {
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mg-key-card {
    border: 1px dashed #cbd5f5;
    border-radius: 12px;
    padding: 12px 16px;
    background: #f8f9ff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.dark .mg-key-card {
    background: #1f2433;
    border-color: #2d3655;
}


.mg-key-title {
    font-size: 12px;
    color: #6b7280;
}

.mg-key-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mg-key-value {
    font-weight: 600;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.mg-section-title {
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    font-weight: 600;
    gap: 6px;
}

.mg-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
}

.mg-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-info-label {
    width: 56px;
    font-size: 12px;
    color: #6b7280;
}

.mg-info-value {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mg-section-divider {
    border-top: 1px dashed #e5e7eb;
    padding-top: 10px;
    margin-top: 16px;
}

.mg-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mg-item {
    border-top: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 6px 0;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mg-item-go {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    align-self: stretch;
    flex: 0 0 50px;
    color: #c2c2c2;
    font-size: 16px;
    text-decoration: none;
}

.mg-item-go:hover {
    color: #1e9fff;
}

.mg-message-item {
    cursor: pointer;
}

.mg-message-item:hover .mg-item-go {
    color: #1e9fff;
}

.mg-page {
    text-align: center;
    padding: 8px 0;
}

.mg-item:first-child {
    border-top: none;
}

.mg-message-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    margin-bottom: 10px;
}

.mg-message-item:first-child {
    border-top: 1px solid #e5e7eb;
}

.dark .mg-message-item {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.dark .mg-item {
    background: transparent;
    border-color: #2c2f34;
}

.mg-item-title {
    font-weight: 600;
    font-size: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.mg-member-code {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 4px;
}

.mg-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
}

.mg-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.mg-item-meta {
    font-size: 12px;
    color: #6b7280;
}

.mg-content-toggle {
    cursor: pointer;
    color: #1e9fff;
}

.mg-content-preview {
    display: inline-block;
    max-width: calc(100% - 40px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.mg-badge-owner {
    background-color: #93c5fd;
    color: #1e3a8a;
}

.dark .mg-badge-owner {
    background-color: #2563eb;
    color: #e0e7ff;
}

.mg-badge-member {
    background-color: #e5e7eb;
    color: #4b5563;
}

.dark .mg-badge-member {
    background-color: #374151;
    color: #e5e7eb;
}

.mg-section-right {
    font-size: 12px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mg-toggle-btn {
    font-size: 12px;
    color: #2563eb;
}

.mg-toggle-btn:hover {
    color: #1d4ed8;
}

.mg-member-tip {
    font-size: 12px;
    color: #9ca3af;
    margin: 6px 0 4px;
}

.mg-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mg-empty {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.mg-loading {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.12), rgba(255, 255, 255, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.dark .mg-loading {
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), rgba(15, 16, 18, 0.8));
}

.mg-loading-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 14px;
    color: #334155;
}

.dark .mg-loading-inner {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
}

.mg-loading-orbit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: mg-rotate 1s linear infinite;
}

.mg-loading-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mg-loading-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    border-radius: 50%;
    background: #94a3b8;
    animation: mg-bounce 1s infinite ease-in-out;
}

.mg-loading-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.mg-loading-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.dark .mg-loading-dots span {
    background: #64748b;
}

@keyframes mg-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mg-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.dark .mg-empty {
    border-color: #2c2f34;
    background: #1a1b1c;
}

.mg-invite-card {
    border: 1px solid #eceff3;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.dark .mg-invite-card {
    background: #1f2022;
    border-color: #2c2f34;
}

.mg-invite-body {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(200px, 260px);
    gap: 16px;
    margin-top: 12px;
}

.mg-invite-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mg-invite-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.mg-invite-link {
    display: flex;
    gap: 8px;
}

.mg-invite-qr {
    text-align: center;
}

.mg-qr-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 6px;
    border-radius: 12px;
    border: 1px solid #eceff3;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mg-qr-box img {
    width: 180px;
    height: 180px;
}

.mg-invite-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.mg-invite-tip {
    text-align: center;
    margin-top: 10px;
    color: #6b7280;
}

.mg-invite-wrap {
    padding: 24px 0 40px;
}

.mg-form-layer .layui-form-label {
    width: 52px;
    padding: 9px 8px 9px 0;
}

.mg-form-layer .layui-input-block {
    margin-left: 60px;
}

@media (max-width: 900px) {
    .mg-invite-body {
        grid-template-columns: 1fr;
    }
}
