.v24-smh-app {
    --v24-border: #d5dde3;
    --v24-border-strong: #b8c4cd;
    --v24-bg: #eff3f6;
    --v24-panel: #ffffff;
    --v24-panel-soft: #f7fafb;
    --v24-text: #15222d;
    --v24-muted: #5f6f7c;
    --v24-accent: #0d5c63;
    --v24-accent-strong: #09474d;
    --v24-accent-soft: #e2eff0;
    color: var(--v24-text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    border: 1px solid var(--v24-border);
    min-height: 680px;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.v24-smh-auth-shell {
    --v24-border: #d5dde3;
    --v24-panel: #ffffff;
    --v24-text: #15222d;
    --v24-muted: #5f6f7c;
    --v24-accent: #0d5c63;
    min-height: 640px;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at top left, rgba(13, 92, 99, 0.12), transparent 30%),
        linear-gradient(160deg, #edf4f4 0%, #f8fafb 55%, #eef2f5 100%);
    color: var(--v24-text);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.v24-smh-auth-card {
    width: min(460px, 100%);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--v24-border);
    box-shadow: 0 24px 70px rgba(23, 33, 43, 0.12);
    padding: 28px;
}

.v24-smh-auth-brand h1 {
    margin: 6px 0 10px;
    font-size: 32px;
    line-height: 1.1;
}

.v24-smh-auth-brand p,
.v24-smh-auth-meta,
.v24-smh-user {
    color: var(--v24-muted);
}

.v24-smh-auth-eyebrow {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid rgba(13, 92, 99, 0.18);
    background: rgba(13, 92, 99, 0.08);
    color: var(--v24-accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.v24-smh-auth-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.v24-smh-auth-form label,
.v24-smh-form-grid label,
.v24-smh-sheet label,
.v24-smh-admin-form label {
    display: grid;
    gap: 6px;
}

.v24-smh-auth-form span,
.v24-smh-sheet label span,
.v24-smh-admin-form label span {
    font-size: 14px;
}

.v24-smh-auth-form input[type="text"],
.v24-smh-auth-form input[type="password"],
.v24-smh-app input[type="search"],
.v24-smh-app input[type="text"],
.v24-smh-app input[type="email"],
.v24-smh-app input[type="url"],
.v24-smh-app input[type="date"],
.v24-smh-app input[type="datetime-local"],
.v24-smh-app input[type="number"],
.v24-smh-app textarea,
.v24-smh-app select,
.v24-smh-admin-form input,
.v24-smh-admin-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--v24-border);
    background: #fff;
    color: var(--v24-text);
}

.v24-smh-auth-form button,
.v24-smh-button,
.v24-smh-button-primary,
.v24-smh-module-tab,
.v24-smh-reader-actions button,
.v24-smh-toolbar button,
.v24-smh-actions button,
.v24-smh-inline-action button {
    border: 1px solid var(--v24-border);
    background: #fff;
    color: var(--v24-text);
    padding: 9px 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.v24-smh-auth-form button {
    width: 100%;
    padding: 12px 16px;
}

.v24-smh-button-primary,
.v24-smh-actions .v24-smh-button-primary {
    background: var(--v24-accent);
    color: #fff;
    border-color: var(--v24-accent);
}

.v24-smh-button:hover,
.v24-smh-module-tab:hover,
.v24-smh-reader-actions button:hover,
.v24-smh-toolbar button:hover,
.v24-smh-actions button:hover,
.v24-smh-inline-action button:hover {
    background: #f3f7f8;
    border-color: var(--v24-border-strong);
}

.v24-smh-button-primary:hover,
.v24-smh-actions .v24-smh-button-primary:hover {
    background: var(--v24-accent-strong);
    border-color: var(--v24-accent-strong);
}

.v24-smh-link {
    border: 0;
    background: transparent;
    color: var(--v24-accent);
    cursor: pointer;
    padding: 0;
}

.v24-smh-auth-alert {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #efc2c2;
    background: #fff1f1;
    color: #8b2a2a;
}

.v24-smh-auth-remember {
    margin: 0;
}

.v24-smh-auth-meta {
    margin-top: 14px;
    font-size: 14px;
}

.v24-smh-auth-meta a,
.v24-smh-app a {
    color: var(--v24-accent);
}

.v24-smh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--v24-border);
    background: linear-gradient(135deg, #fbfcfd 0%, #eef4f4 100%);
}

.v24-smh-header span {
    display: block;
    font-size: 12px;
    color: var(--v24-muted);
}

.v24-smh-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.v24-smh-status {
    font-size: 12px;
    color: var(--v24-muted);
}

.v24-smh-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--v24-panel-soft);
    border-bottom: 1px solid var(--v24-border);
}

.v24-smh-module-tab {
    min-width: 120px;
}

.v24-smh-module-tab.is-active {
    background: var(--v24-accent);
    border-color: var(--v24-accent);
    color: #fff;
}

.v24-smh-module-toolbar,
.v24-smh-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.v24-smh-module-toolbar {
    padding: 12px 16px;
    background: rgba(247, 250, 251, 0.8);
    border-bottom: 1px solid var(--v24-border);
}

.v24-smh-shell {
    display: grid;
    grid-template-columns: 240px minmax(280px, 360px) 1fr;
    min-height: 580px;
}

.v24-smh-dual {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    min-height: 540px;
}

.v24-smh-sidebar,
.v24-smh-list,
.v24-smh-reader {
    padding: 14px;
    border-right: 1px solid var(--v24-border);
    overflow: auto;
    background: var(--v24-panel);
}

.v24-smh-sidebar {
    background: #fbfcfc;
}

.v24-smh-reader {
    border-right: 0;
}

.v24-smh-sidebar h2,
.v24-smh-attachments h3,
.v24-smh-reader h3 {
    font-size: 13px;
    margin: 12px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v24-muted);
}

.v24-smh-list-button,
.v24-smh-message,
.v24-smh-record,
.v24-smh-attachment {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 12px;
    margin: 0 0 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 10px;
}

.v24-smh-list-button:hover,
.v24-smh-message:hover,
.v24-smh-record:hover,
.v24-smh-attachment:hover {
    background: #eef5f4;
    border-color: var(--v24-border);
}

.v24-smh-list-button.is-active,
.v24-smh-record.is-active,
.v24-smh-message.is-active {
    background: var(--v24-accent-soft);
    border-color: #bfd7d9;
}

.v24-smh-message.is-unseen {
    background: #f0f7f7;
    border-color: #c4dfdf;
}

.v24-smh-message strong,
.v24-smh-message span,
.v24-smh-message small,
.v24-smh-record strong,
.v24-smh-record span,
.v24-smh-record small {
    display: block;
}

.v24-smh-message small,
.v24-smh-record small {
    color: var(--v24-muted);
}

.v24-smh-message-meta,
.v24-smh-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v24-smh-message-meta {
    margin-top: 8px;
}

.v24-smh-message-meta span,
.v24-smh-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #d6e2e4;
    border-radius: 999px;
    background: #f5fafb;
    color: var(--v24-muted);
    font-size: 12px;
}

.v24-smh-reader-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.v24-smh-reader-header h2 {
    margin: 0 0 10px;
}

.v24-smh-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    justify-content: flex-end;
}

.v24-smh-inline-action {
    display: flex;
    gap: 8px;
    align-items: center;
}

.v24-smh-inline-action select {
    min-width: 180px;
}

.v24-smh-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.v24-smh-body {
    line-height: 1.6;
    padding: 16px;
    border: 1px solid var(--v24-border);
    background: #fff;
    overflow: auto;
}

.v24-smh-body pre {
    white-space: pre-wrap;
    margin: 0;
    font-family: Consolas, monospace;
}

.v24-smh-attachments {
    margin-top: 18px;
}

.v24-smh-compose,
.v24-smh-sheet {
    position: fixed;
    inset: 88px 24px 24px auto;
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100vh - 112px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--v24-border);
    box-shadow: 0 18px 60px rgba(20, 30, 40, 0.16);
    padding: 18px;
    z-index: 9999;
}

.v24-smh-sheet {
    width: min(760px, calc(100vw - 48px));
}

.v24-smh-compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.v24-smh-field,
.v24-smh-sheet label {
    margin-bottom: 10px;
}

.v24-smh-compose textarea {
    min-height: 220px;
    resize: vertical;
}

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

.v24-smh-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.v24-smh-shell-calendar {
    grid-template-columns: 280px minmax(280px, 380px) 1fr;
}

.v24-smh-card-stack {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.v24-smh-card {
    border: 1px solid var(--v24-border);
    background: var(--v24-panel-soft);
    padding: 14px;
    border-radius: 14px;
}

.v24-smh-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.v24-smh-card-header h3,
.v24-smh-card-header h4 {
    margin: 0 0 6px;
}

.v24-smh-card p {
    margin: 6px 0;
}

.v24-smh-color-chip,
.v24-smh-color-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--chip, #0d5c63);
    margin-right: 8px;
    flex: 0 0 auto;
}

.v24-smh-color-badge {
    width: 18px;
    height: 18px;
    margin-right: 0;
}

.v24-smh-share-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(184, 196, 205, 0.35);
}

.v24-smh-share-row:last-child {
    border-bottom: 0;
}

.v24-smh-share-row span {
    font-size: 14px;
}

.v24-smh-sidebar .v24-smh-list-button strong {
    display: inline;
}

.v24-smh-sidebar .v24-smh-list-button small {
    display: block;
    color: var(--v24-muted);
    margin-top: 4px;
}

.v24-smh-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.v24-smh-admin-card {
    background: #fff;
    border: 1px solid var(--v24-border);
    padding: 16px;
    margin-top: 16px;
}

.v24-smh-admin-form {
    display: grid;
    gap: 10px;
}

.v24-smh-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.v24-smh-checkbox input {
    width: auto !important;
}

@media (max-width: 1100px) {
    .v24-smh-shell,
    .v24-smh-dual,
    .v24-smh-admin-grid,
    .v24-smh-detail-grid {
        grid-template-columns: 1fr;
    }

    .v24-smh-sidebar,
    .v24-smh-list,
    .v24-smh-reader {
        border-right: 0;
        border-bottom: 1px solid var(--v24-border);
        min-height: 220px;
    }

    .v24-smh-reader {
        border-bottom: 0;
    }
}

@media (max-width: 720px) {
    .v24-smh-auth-card {
        padding: 22px 18px;
    }

    .v24-smh-auth-brand h1 {
        font-size: 28px;
    }

    .v24-smh-header {
        align-items: flex-start;
    }

    .v24-smh-header-actions,
    .v24-smh-reader-actions,
    .v24-smh-inline-action,
    .v24-smh-module-toolbar,
    .v24-smh-toolbar,
    .v24-smh-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .v24-smh-form-grid {
        grid-template-columns: 1fr;
    }

    .v24-smh-compose,
    .v24-smh-sheet {
        inset: 72px 12px 12px 12px;
        width: auto;
        max-height: calc(100vh - 84px);
        padding: 14px;
    }
}
