:root {
    --ms-bg: #f4f6fb;
    --ms-surface: #ffffff;
    --ms-surface-soft: #f8fafc;
    --ms-border: #e5e7eb;
    --ms-border-strong: #cbd5e1;
    --ms-text: #111827;
    --ms-muted: #6b7280;
    --ms-muted-2: #94a3b8;

    --ms-navy: #111827;
    --ms-navy-2: #0f172a;
    --ms-primary: #0f766e;
    --ms-primary-2: #0d9488;
    --ms-primary-soft: #ecfeff;
    --ms-gold: #b8892d;
    --ms-gold-soft: #fffbeb;

    --ms-success: #047857;
    --ms-success-bg: #ecfdf5;
    --ms-warning: #92400e;
    --ms-warning-bg: #fffbeb;
    --ms-danger: #b91c1c;
    --ms-danger-bg: #fef2f2;
    --ms-info: #1d4ed8;
    --ms-info-bg: #eff6ff;

    --ms-sidebar-width: 280px;
    --ms-topbar-height: 68px;

    --ms-radius-xs: 8px;
    --ms-radius-sm: 12px;
    --ms-radius-md: 16px;
    --ms-radius-lg: 20px;
    --ms-radius-xl: 24px;

    --ms-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
    --ms-shadow-md: 0 14px 35px rgba(15, 23, 42, 0.08);
    --ms-shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.12);

    --ms-ease: 160ms ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body.ms-body {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 34rem),
        radial-gradient(circle at top right, rgba(184, 137, 45, 0.12), transparent 28rem),
        var(--ms-bg);
    color: var(--ms-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

body.ms-nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
}

.ms-shell {
    min-height: 100vh;
    display: flex;
}

.ms-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ms-sidebar-width);
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    color: #ffffff;
    z-index: 70;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.20);
}

.ms-sidebar-brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f766e, #b8892d);
    color: #ffffff;
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.35);
}

.ms-brand-text strong {
    display: block;
    font-size: 19px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ms-brand-text span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.60);
}

.ms-sidebar-nav {
    padding: 16px 12px;
    overflow-y: auto;
    flex: 1;
}

.ms-nav-section-title {
    padding: 14px 10px 8px;
    font-size: 11px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.42);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.ms-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 800;
    font-size: 14px;
    transition: background var(--ms-ease), color var(--ms-ease), transform var(--ms-ease);
}

.ms-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.ms-nav-link.is-active {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(13, 148, 136, 0.86));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.25);
}

.ms-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.10);
    flex: 0 0 auto;
    font-size: 15px;
}

.ms-nav-link.is-active .ms-nav-icon {
    background: rgba(255, 255, 255, 0.18);
}

.ms-sidebar-footer {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-member-mini {
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.ms-member-mini strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
}

.ms-member-mini span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.54);
    font-size: 12px;
    word-break: break-all;
}

.ms-main {
    width: 100%;
    min-width: 0;
    margin-left: var(--ms-sidebar-width);
}

.ms-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--ms-topbar-height);
    padding: 12px 24px;
    background: rgba(244, 246, 251, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.70);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ms-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ms-mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ms-border);
    border-radius: 14px;
    background: var(--ms-surface);
    color: var(--ms-text);
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
}

.ms-topbar-title {
    min-width: 0;
}

.ms-topbar-title strong {
    display: block;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.ms-topbar-title span {
    display: block;
    margin-top: 3px;
    color: var(--ms-muted);
    font-size: 12px;
}

.ms-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ms-logout-form {
    margin: 0;
}

.ms-content {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 26px;
}

.ms-content.is-wide {
    max-width: none;
}

.ms-page-head {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.ms-page-title-wrap {
    min-width: 0;
}

.ms-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ms-primary-soft);
    color: var(--ms-primary);
    border: 1px solid rgba(15, 118, 110, 0.14);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 10px;
}

.ms-page-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.ms-page-desc {
    margin: 8px 0 0;
    color: var(--ms-muted);
    line-height: 1.7;
}

.ms-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ms-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--ms-radius-lg);
    box-shadow: var(--ms-shadow-sm);
}

.ms-card.is-flat {
    box-shadow: none;
}

.ms-card.is-highlight {
    border-color: rgba(15, 118, 110, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
}

.ms-card-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--ms-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ms-card-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.ms-card-desc {
    margin: 6px 0 0;
    color: var(--ms-muted);
    line-height: 1.65;
    font-size: 13px;
}

.ms-card-body {
    padding: 22px;
}

.ms-card-foot {
    padding: 16px 22px;
    border-top: 1px solid var(--ms-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ms-grid {
    display: grid;
    gap: 18px;
}

.ms-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ms-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ms-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ms-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.ms-stat-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    background: var(--ms-surface);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--ms-radius-lg);
    box-shadow: var(--ms-shadow-sm);
}

.ms-stat-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    right: -55px;
    top: -55px;
}

.ms-stat-label {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--ms-muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.ms-stat-value {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--ms-text);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.ms-stat-hint {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    color: var(--ms-muted);
    font-size: 12px;
}

.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 13px;
    border: 1px solid var(--ms-border-strong);
    background: var(--ms-surface);
    color: var(--ms-text);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform var(--ms-ease), background var(--ms-ease), border-color var(--ms-ease), box-shadow var(--ms-ease);
    white-space: nowrap;
}

.ms-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ms-btn:disabled,
.ms-btn.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ms-btn.is-primary {
    background: var(--ms-primary);
    border-color: var(--ms-primary);
    color: #ffffff;
}

.ms-btn.is-primary:hover {
    background: #0d6a63;
}

.ms-btn.is-dark {
    background: var(--ms-navy);
    border-color: var(--ms-navy);
    color: #ffffff;
}

.ms-btn.is-gold {
    background: var(--ms-gold);
    border-color: var(--ms-gold);
    color: #ffffff;
}

.ms-btn.is-danger {
    background: var(--ms-danger);
    border-color: var(--ms-danger);
    color: #ffffff;
}

.ms-btn.is-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ms-muted);
}

.ms-btn.is-outline {
    background: transparent;
    color: var(--ms-text);
}

.ms-btn.is-sm {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 12px;
}

.ms-btn.is-lg {
    min-height: 50px;
    padding: 0 20px;
    border-radius: 16px;
    font-size: 15px;
}

.ms-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--ms-radius-md);
    border: 1px solid var(--ms-border);
    background: var(--ms-surface);
    font-size: 14px;
    line-height: 1.65;
    font-weight: 700;
}

.ms-alert.is-success {
    background: var(--ms-success-bg);
    border-color: #a7f3d0;
    color: var(--ms-success);
}

.ms-alert.is-warning {
    background: var(--ms-warning-bg);
    border-color: #fde68a;
    color: var(--ms-warning);
}

.ms-alert.is-danger,
.ms-alert.is-error {
    background: var(--ms-danger-bg);
    border-color: #fecaca;
    color: var(--ms-danger);
}

.ms-alert.is-info {
    background: var(--ms-info-bg);
    border-color: #bfdbfe;
    color: var(--ms-info);
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.ms-badge.is-success {
    background: var(--ms-success-bg);
    border-color: #a7f3d0;
    color: var(--ms-success);
}

.ms-badge.is-warning {
    background: var(--ms-warning-bg);
    border-color: #fde68a;
    color: var(--ms-warning);
}

.ms-badge.is-danger,
.ms-badge.is-error {
    background: var(--ms-danger-bg);
    border-color: #fecaca;
    color: var(--ms-danger);
}

.ms-badge.is-primary {
    background: var(--ms-primary-soft);
    border-color: #99f6e4;
    color: var(--ms-primary);
}

.ms-badge.is-dark {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.ms-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ms-form-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ms-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-label {
    color: #374151;
    font-size: 13px;
    font-weight: 900;
}

.ms-label small {
    color: var(--ms-muted);
    font-weight: 700;
}

.ms-input,
.ms-select,
.ms-textarea {
    width: 100%;
    border: 1px solid var(--ms-border-strong);
    border-radius: 13px;
    background: #ffffff;
    color: var(--ms-text);
    font-size: 14px;
    outline: none;
    transition: border-color var(--ms-ease), box-shadow var(--ms-ease), background var(--ms-ease);
}

.ms-input,
.ms-select {
    min-height: 44px;
    padding: 0 13px;
}

.ms-textarea {
    min-height: 120px;
    padding: 12px 13px;
    resize: vertical;
    line-height: 1.6;
}

.ms-input:focus,
.ms-select:focus,
.ms-textarea:focus {
    border-color: rgba(15, 118, 110, 0.78);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
}

.ms-input[readonly],
.ms-select[disabled],
.ms-input[disabled],
.ms-textarea[disabled] {
    background: #f8fafc;
    color: #64748b;
}

.ms-help {
    margin: 0;
    color: var(--ms-muted);
    font-size: 12px;
    line-height: 1.55;
}

.ms-search-card {
    padding: 18px;
    margin-bottom: 18px;
}

.ms-table-wrap {
    overflow-x: auto;
}

.ms-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.ms-table th,
.ms-table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--ms-border);
    text-align: left;
    vertical-align: middle;
}

.ms-table th {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    background: #f8fafc;
    white-space: nowrap;
}

.ms-table td {
    color: var(--ms-text);
    font-size: 14px;
}

.ms-table tbody tr:hover {
    background: #fafafa;
}

.ms-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ms-actions.is-right {
    justify-content: flex-end;
}

.ms-empty {
    padding: 42px 18px;
    text-align: center;
    color: var(--ms-muted);
}

.ms-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    background: var(--ms-surface-soft);
    color: var(--ms-muted);
    font-size: 25px;
}

.ms-empty strong {
    display: block;
    color: var(--ms-text);
    font-size: 17px;
    margin-bottom: 6px;
}

.ms-empty p {
    margin: 0;
    line-height: 1.7;
}

.ms-meta-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px 16px;
    margin: 0;
}

.ms-meta-list dt {
    color: var(--ms-muted);
    font-size: 13px;
    font-weight: 800;
}

.ms-meta-list dd {
    margin: 0;
    color: var(--ms-text);
    font-weight: 800;
    word-break: break-word;
}

.ms-split {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.ms-sticky-panel {
    position: sticky;
    top: calc(var(--ms-topbar-height) + 20px);
}

.ms-image-box {
    aspect-ratio: 3 / 4;
    border-radius: var(--ms-radius-md);
    border: 1px dashed var(--ms-border-strong);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--ms-muted);
    text-align: center;
    line-height: 1.7;
    padding: 16px;
}

.ms-image-box img,
.ms-image-box canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.ms-image-box.has-image {
    padding: 0;
    border-style: solid;
    background: #f8fafc;
}

.ms-progress-card {
    width: 100%;
    display: grid;
    place-items: center;
    gap: 12px;
    text-align: center;
}

.ms-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 4px solid rgba(15, 118, 110, 0.14);
    border-top-color: var(--ms-primary);
    animation: ms-spin 1s linear infinite;
}

.ms-progress-rail {
    width: min(260px, 100%);
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.ms-progress-fill {
    height: 100%;
    width: 36%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ms-primary-2), var(--ms-primary));
    transition: width 300ms ease;
    position: relative;
}

.ms-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.32) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.32) 50%,
        rgba(255, 255, 255, 0.32) 75%,
        transparent 75%
    );
    background-size: 22px 22px;
    animation: ms-stripe 1s linear infinite;
}

@keyframes ms-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ms-stripe {
    from { background-position: 0 0; }
    to { background-position: 22px 0; }
}

.ms-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ms-border);
    margin-bottom: 18px;
}

.ms-tab-btn {
    border: 0;
    background: transparent;
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 900;
    color: var(--ms-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.ms-tab-btn.is-active {
    color: var(--ms-primary);
    border-bottom-color: var(--ms-primary);
}

.ms-tab-panel {
    display: none;
}

.ms-tab-panel.is-active {
    display: block;
}

.ms-mobile-overlay {
    display: none;
}

.ms-only-mobile {
    display: none !important;
}

.ms-hide {
    display: none !important;
}

.ms-mt-0 { margin-top: 0 !important; }
.ms-mt-1 { margin-top: 8px !important; }
.ms-mt-2 { margin-top: 14px !important; }
.ms-mt-3 { margin-top: 20px !important; }
.ms-mb-0 { margin-bottom: 0 !important; }
.ms-mb-1 { margin-bottom: 8px !important; }
.ms-mb-2 { margin-bottom: 14px !important; }
.ms-mb-3 { margin-bottom: 20px !important; }

@media (max-width: 1180px) {
    .ms-dashboard-grid,
    .ms-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ms-grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ms-split {
        grid-template-columns: 1fr;
    }

    .ms-sticky-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .ms-sidebar {
        transform: translateX(-100%);
        transition: transform 220ms ease;
    }

    body.ms-nav-open .ms-sidebar {
        transform: translateX(0);
    }

    .ms-mobile-overlay {
        position: fixed;
        inset: 0;
        display: none;
        background: rgba(15, 23, 42, 0.48);
        z-index: 60;
    }

    body.ms-nav-open .ms-mobile-overlay {
        display: block;
    }

    .ms-main {
        margin-left: 0;
    }

    .ms-topbar {
        padding: 10px 14px;
    }

    .ms-mobile-menu-btn {
        display: inline-grid;
        place-items: center;
    }

    .ms-content {
        padding: 18px 14px 28px;
    }

    .ms-page-title {
        font-size: 25px;
    }

    .ms-topbar-actions {
        display: none;
    }

    .ms-only-mobile {
        display: block !important;
    }
}

@media (max-width: 640px) {
    .ms-dashboard-grid,
    .ms-grid.cols-2,
    .ms-grid.cols-3,
    .ms-grid.cols-4,
    .ms-form-grid,
    .ms-form-grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .ms-card-head,
    .ms-page-head,
    .ms-card-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .ms-page-actions,
    .ms-actions.is-right {
        justify-content: stretch;
    }

    .ms-page-actions .ms-btn,
    .ms-card-foot .ms-btn,
    .ms-actions.is-right .ms-btn {
        width: 100%;
    }

    .ms-meta-list {
        grid-template-columns: 1fr;
    }

    .ms-table {
        min-width: 680px;
    }
}
/* --------------------------------------------------------------------------
   MachoSuit compact cute polish v20260429
   공통 레이아웃/카드/버튼/테이블/폼을 작고 촘촘하게 맞추는 최종 보정.
   -------------------------------------------------------------------------- */
:root {
    --ms-sidebar-width: 252px;
    --ms-topbar-height: 60px;
    --ms-radius-xs: 7px;
    --ms-radius-sm: 10px;
    --ms-radius-md: 14px;
    --ms-radius-lg: 18px;
    --ms-radius-xl: 22px;
    --ms-shadow-sm: 0 5px 15px rgba(15, 23, 42, 0.055);
    --ms-shadow-md: 0 10px 26px rgba(15, 23, 42, 0.075);
    --ms-shadow-lg: 0 16px 42px rgba(15, 23, 42, 0.11);
}

body.ms-body {
    font-size: 14px;
    line-height: 1.48;
    letter-spacing: -0.01em;
}

.ms-sidebar-brand { padding: 17px 16px 14px; }
.ms-sidebar-nav { padding: 12px 10px; }
.ms-sidebar-footer { padding: 12px 13px 14px; }
.ms-brand-logo { width: 36px; height: 36px; border-radius: 13px; font-size: 18px; }
.ms-brand-text strong { font-size: 17px; }
.ms-brand-text span { font-size: 11px; }
.ms-nav-link { min-height: 40px; padding: 0 10px; border-radius: 13px; font-size: 13px; gap: 10px; }
.ms-nav-icon { width: 25px; height: 25px; border-radius: 9px; font-size: 13px; }
.ms-nav-section-title { padding: 12px 9px 7px; font-size: 10px; }
.ms-member-mini { border-radius: 14px; padding: 11px; }
.ms-member-mini strong { font-size: 13px; }
.ms-member-mini span { font-size: 11px; }

.ms-topbar { min-height: 60px; padding: 9px 20px; }
.ms-mobile-menu-btn { width: 38px; height: 38px; border-radius: 13px; font-size: 17px; }
.ms-topbar-title strong { font-size: 16px; }
.ms-topbar-title span { font-size: 12px; }
.ms-topbar-actions { gap: 7px; }
.ms-content { padding: 20px; }
.ms-page-head { margin-bottom: 14px; gap: 14px; }
.ms-eyebrow { min-height: 24px; padding: 0 9px; font-size: 11px; margin-bottom: 8px; }
.ms-page-title { font-size: 24px; }
.ms-page-desc { margin-top: 6px; font-size: 12px; line-height: 1.6; }
.ms-page-actions { gap: 7px; }

.ms-card,
.ms-stat-card,
.ms-search-card,
.ms-image-box,
.ms-alert,
.ms-empty-icon,
.ms-member-mini {
    box-shadow: var(--ms-shadow-sm);
}

.ms-card,
.ms-stat-card { overflow: hidden; }
.ms-card-head { padding: 15px 17px; gap: 12px; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92)); }
.ms-card-title { font-size: 16px; }
.ms-card-desc { margin-top: 5px; font-size: 12px; line-height: 1.58; }
.ms-card-body { padding: 16px; }
.ms-card-foot { padding: 13px 16px; gap: 7px; }
.ms-grid { gap: 14px; }
.ms-dashboard-grid { gap: 14px; margin-bottom: 14px; }
.ms-stat-card { padding: 16px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.ms-stat-card::before { content: ""; position: absolute; left: 14px; top: 14px; width: 7px; height: 7px; border-radius: 999px; background: rgba(15, 118, 110, .22); }
.ms-stat-card::after { width: 112px; height: 112px; right: -50px; top: -50px; }
.ms-stat-label { font-size: 12px; margin-bottom: 8px; }
.ms-stat-value { font-size: 28px; }
.ms-stat-hint { margin-top: 8px; font-size: 11px; }

.ms-btn { min-height: 36px; padding: 0 12px; border-radius: 12px; gap: 6px; font-size: 13px; line-height: 1; box-shadow: 0 1px 0 rgba(15,23,42,.03); }
.ms-btn.is-sm { min-height: 30px; padding: 0 10px; border-radius: 10px; font-size: 11px; }
.ms-btn.is-lg { min-height: 44px; padding: 0 16px; border-radius: 14px; font-size: 14px; }
.ms-btn.is-primary { background: linear-gradient(135deg, #0f766e, #0d9488); border-color: #0f766e; }
.ms-btn.is-dark { background: linear-gradient(135deg, #111827, #1e293b); border-color: #111827; }
.ms-btn.is-outline { background: rgba(255,255,255,.82); }
.ms-btn.is-gold { background: linear-gradient(135deg, #b8892d, #d6a84a); border-color: #b8892d; }
.ms-actions { gap: 6px; }

.ms-alert { margin-bottom: 14px; padding: 11px 13px; border-radius: 14px; font-size: 13px; line-height: 1.55; }
.ms-badge { min-height: 24px; padding: 0 9px; font-size: 11px; line-height: 1; }
.ms-form-grid { gap: 12px; }
.ms-form-row { gap: 6px; }
.ms-label { font-size: 12px; }
.ms-input, .ms-select, .ms-textarea { border-radius: 12px; font-size: 13px; box-shadow: inset 0 1px 0 rgba(15,23,42,.03); }
.ms-input, .ms-select { min-height: 40px; padding: 0 12px; }
.ms-textarea { min-height: 104px; padding: 10px 12px; line-height: 1.55; }
.ms-help { font-size: 11px; line-height: 1.5; }
.ms-search-card { padding: 14px; margin-bottom: 14px; }

.ms-table th,
.ms-table td { padding: 10px 11px; }
.ms-table th { font-size: 11px; }
.ms-table td { font-size: 13px; }
.ms-table th:first-child { border-top-left-radius: 12px; }
.ms-table th:last-child { border-top-right-radius: 12px; }
.ms-table tbody tr:hover { background: #f8fafc; }
.ms-empty { padding: 30px 14px; }
.ms-empty-icon { width: 44px; height: 44px; border-radius: 16px; font-size: 21px; }
.ms-empty strong { font-size: 15px; }
.ms-empty p { font-size: 12px; line-height: 1.6; }
.ms-meta-list { grid-template-columns: 128px 1fr; gap: 8px 12px; }
.ms-meta-list dt,
.ms-meta-list dd { font-size: 12px; line-height: 1.5; }
.ms-split { grid-template-columns: 340px minmax(0, 1fr); gap: 16px; }
.ms-mt-1 { margin-top: 7px !important; }
.ms-mt-2 { margin-top: 12px !important; }
.ms-mt-3 { margin-top: 16px !important; }
.ms-mb-1 { margin-bottom: 7px !important; }
.ms-mb-2 { margin-bottom: 12px !important; }
.ms-mb-3 { margin-bottom: 16px !important; }

/* Dashboard custom classes */
.dash-hero,
.dash-card,
.dash-status-card,
.dash-flow-card,
.dash-mini-profile,
.dash-job-item,
.dash-work-item { border-radius: 18px !important; box-shadow: 0 7px 20px rgba(15,23,42,.055) !important; }
.dash-hero { margin-bottom: 14px !important; }
.dash-hero-inner { gap: 14px !important; padding: 18px !important; }
.dash-kicker,
.dash-status-label,
.dash-mini-line,
.dash-flow-card p,
.dash-card-head p,
.dash-work-meta,
.dash-small-note,
.dash-empty-soft p { font-size: 11px !important; }
.dash-title { font-size: 23px !important; line-height: 1.22 !important; }
.dash-desc { font-size: 12px !important; line-height: 1.55 !important; }
.dash-status-grid,
.dash-flow-grid,
.dash-two-col,
.dash-work-list,
.dash-job-list { gap: 11px !important; }
.dash-status-card { padding: 13px !important; }
.dash-status-icon { width: 34px !important; height: 34px !important; border-radius: 13px !important; font-size: 17px !important; }
.dash-status-value { font-size: 25px !important; }
.dash-status-hint,
.dash-progress-pill,
.dash-action-group .ms-btn { font-size: 11px !important; }
.dash-flow-card,
.dash-card-body,
.dash-work-item,
.dash-job-item { padding: 13px !important; }
.dash-card-head { padding: 13px 14px !important; }
.dash-card-head h3,
.dash-flow-card h3,
.dash-work-title,
.dash-job-title { font-size: 14px !important; }

/* Customer detail custom classes */
.cd-hero,
.cd-section,
.cd-mini-card,
.cd-profile-card,
.cd-fit-card,
.cd-job-card { border-radius: 18px !important; box-shadow: 0 7px 20px rgba(15,23,42,.055) !important; }
.cd-hero,
.cd-section { padding: 13px !important; margin-bottom: 12px !important; }
.cd-avatar,
.cd-empty-icon,
.cd-fit-icon { width: 38px !important; height: 38px !important; border-radius: 14px !important; font-size: 18px !important; }
.cd-section-title,
.cd-fit-title,
.cd-profile-name,
.cd-job-title { font-size: 14px !important; }
.cd-section-desc,
.cd-info-list,
.cd-profile-sub,
.cd-profile-main,
.cd-profile-mini,
.cd-profile-value,
.cd-fit-meta,
.cd-job-sub,
.cd-note,
.cd-mini-hint,
.cd-pill,
.cd-chip,
.cd-flow-badge { font-size: 11px !important; }
.cd-mini-value { font-size: 18px !important; }
.cd-profile-card,
.cd-fit-card,
.cd-job-card,
.cd-mini-card { padding: 12px !important; }
.cd-stat-grid,
.cd-grid-2,
.cd-profile-list,
.cd-fit-list,
.cd-job-grid,
.cd-progress-row,
.cd-quick-actions { gap: 10px !important; }

/* Fittings list custom classes */
.ms-fit-page .fit-stat,
.ms-fit-page .fit-card,
.ms-fit-page .fit-mini,
.ms-fit-page .fit-step,
.ms-fit-page .fit-search-card { border-radius: 18px !important; box-shadow: 0 7px 20px rgba(15,23,42,.05) !important; }
.ms-fit-page .fit-stat-grid,
.ms-fit-page .fit-card-list,
.ms-fit-page .fit-mini-grid,
.ms-fit-page .fit-progress { gap: 10px !important; }
.ms-fit-page .fit-stat { padding: 13px !important; }
.ms-fit-page .fit-stat .emoji,
.ms-fit-page .fit-emoji,
.ms-fit-page .fit-empty-icon { width: 34px !important; height: 34px !important; border-radius: 13px !important; font-size: 17px !important; }
.ms-fit-page .fit-stat .label,
.ms-fit-page .fit-sub,
.ms-fit-page .fit-mini .label,
.ms-fit-page .fit-step span,
.ms-fit-page .fit-empty p { font-size: 11px !important; }
.ms-fit-page .fit-stat .value { font-size: 24px !important; }
.ms-fit-page .fit-card-head,
.ms-fit-page .fit-card-body,
.ms-fit-page .fit-mini,
.ms-fit-page .fit-step { padding: 12px !important; }
.ms-fit-page .fit-title { font-size: 14px !important; }
.ms-fit-page .fit-mini .value,
.ms-fit-page .fit-step strong { font-size: 12px !important; }

/* Render/AI/result local card classes */
.render-card,
.summary-card,
.notice-card,
.next-step-card,
.result-card,
.ai-card,
.job-card,
.status-card { border-radius: 18px !important; }
.render-card h4,
.summary-card h3,
.notice-card h2,
.next-step-card h3,
.result-card h3,
.ai-card h3,
.job-card h3,
.status-card h3 { font-size: 15px !important; }
.render-card,
.summary-card,
.notice-card,
.next-step-card,
.result-card,
.ai-card,
.job-card,
.status-card,
.render-info-line,
.photo-help,
.photo-meta,
.status-pill { font-size: 11px !important; }

@media (max-width: 860px) {
    :root { --ms-sidebar-width: 252px; --ms-topbar-height: 56px; }
    .ms-topbar { min-height: 56px; padding: 8px 12px; }
    .ms-content { padding: 13px 11px 24px; }
    .ms-page-title,
    .dash-title { font-size: 21px !important; }
    .ms-card-head,
    .ms-card-body,
    .ms-card-foot,
    .ms-stat-card,
    .ms-search-card { padding: 12px !important; }
    .ms-dashboard-grid,
    .dash-status-grid,
    .dash-flow-grid,
    .dash-two-col,
    .cd-stat-grid,
    .cd-grid-2,
    .ms-fit-page .fit-stat-grid { gap: 10px !important; }
    .ms-btn { min-height: 35px; font-size: 12px; border-radius: 12px; }
}

@media (max-width: 640px) {
    body.ms-body { font-size: 13px; }
    .ms-page-actions .ms-btn,
    .ms-card-foot .ms-btn,
    .ms-actions.is-right .ms-btn,
    .dash-hero-actions .ms-btn,
    .dash-action-group .ms-btn,
    .cd-actions .ms-btn,
    .cd-quick-actions .ms-btn { width: 100%; }
    .ms-table { min-width: 620px; }
}
.ms-brand-logo.is-image {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0px;
}

.ms-brand-logo.is-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}