@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    --bg-top: #f4f7ff;
    --bg-bottom: #e6ecfb;
    --surface: #ffffff;
    --surface-soft: #f4f7ff;
    --line: #d8deef;
    --text: #1f2c44;
    --muted: #66748f;
    --primary: #2a4fbf;
    --primary-hover: #203f99;
    --accent: #1d84d9;
    --error-bg: #fde8e8;
    --error-text: #8b1f1f;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 14px 36px rgba(31, 44, 68, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: clamp(12px, 3vw, 24px);
}

.login-card,
.dashboard-card,
.form-card,
.view-card {
    width: 100%;
    max-width: 1024px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(215, 230, 221, 0.7);
}

.login-card {
    max-width: 420px;
    padding: 24px;
}

.dashboard-card,
.form-card,
.view-card {
    padding: clamp(14px, 2.6vw, 24px);
}

.logo {
    display: block;
    width: 120px;
    max-width: 100%;
    margin: 0 auto 14px;
}

.logo-small {
    width: 96px;
    height: auto;
}

.portal-logo {
    width: 96px;
}

h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

h2 {
    margin: 0;
    font-size: clamp(1.1rem, 2.7vw, 1.35rem);
}

.subtitle {
    text-align: center;
    margin: 6px 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.alert-error,
.alert-success,
.alert-info {
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.93rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert-success {
    background: #eaf2ff;
    color: #1f3c78;
}

.alert-info {
    background: #eaf4ff;
    color: #11406f;
}

.login-form,
.plantao-form {
    display: grid;
    gap: 10px;
}

.login-form label,
.plantao-form label {
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #41526f;
}

.login-form input,
.plantao-form input,
.plantao-form textarea,
.plantao-form select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 0.98rem;
    font-family: inherit;
    background: #fff;
}

.plantao-form textarea {
    min-height: 80px;
    resize: vertical;
}

.inline-field-group {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
}

.login-form input:focus,
.plantao-form input:focus,
.plantao-form textarea:focus,
.plantao-form select:focus {
    outline: 2px solid #aac4f7;
    border-color: #aac4f7;
}

.login-form button,
.form-actions button {
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, #3d74db 100%);
}

.login-form button:hover,
.form-actions button:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #2d5fc6 100%);
}

.dashboard-header {
    width: 100%;
    max-width: 1024px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(215, 230, 221, 0.8);
    padding: 14px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-header h1 {
    text-align: left;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.dashboard-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.89rem;
}

.icon {
    margin-right: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-link,
.btn-small,
.menu-button {
    text-decoration: none;
    color: #fff;
    background: var(--primary);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.86rem;
    border: 0;
}

.menu-link:hover,
.btn-small:hover,
.menu-button:hover {
    background: var(--primary-hover);
}

.logout-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf2ff;
}

.logout-link:hover {
    background: #dfe8ff;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.filter-helper {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.period-filter {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(242, 246, 255, 0.98) 100%);
    border: 1px solid rgba(216, 222, 239, 0.9);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(31, 44, 68, 0.08);
}

.period-field {
    display: grid;
    gap: 6px;
}

.period-field label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #506285;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.period-field input {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    min-height: 46px;
}

.period-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.period-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.period-actions button {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(42, 79, 191, 0.22);
}

.period-actions .btn-secondary {
    min-height: 46px;
    padding: 0 16px;
    background: #eef3ff;
    color: #2a4fbf;
    border-color: rgba(42, 79, 191, 0.16);
}

.period-actions .btn-secondary:hover {
    background: #e1e9ff;
}

.kpi-card {
    background: linear-gradient(160deg, #f8faff 0%, #eef3ff 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.kpi-card h3 {
    margin: 0;
    font-size: 0.86rem;
    color: #506285;
    font-weight: 700;
}

.kpi-card p {
    margin: 8px 0 0;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 800;
    color: #283f7f;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.chart-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 12px;
}

.chart-card h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.chart-shell {
    position: relative;
    width: 100%;
    height: clamp(190px, 34vw, 280px);
}

.table-wrap {
    margin-top: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #e3e8f5;
    text-align: left;
    padding: 10px;
    font-size: 0.9rem;
    vertical-align: top;
}

.data-table th {
    color: #41526f;
    background: #f2f5fd;
    font-weight: 800;
}

.actions-col {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-print {
    background: #3a5db3;
}

.btn-secondary {
    text-decoration: none;
    border: 1px solid var(--line);
    color: #35476a;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    background: #fff;
}

.modules-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.module-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
}

.module-card.is-disabled {
    opacity: 0.78;
}

.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.module-head h3 {
    margin: 0;
    font-size: 0.96rem;
}

.module-tag {
    font-size: 0.76rem;
    font-weight: 800;
    color: #5c6f93;
    background: #edf1fb;
    border-radius: 999px;
    padding: 5px 10px;
}

.module-tag.is-ok {
    color: #1d5f2f;
    background: #e5f6eb;
}

.module-card p {
    margin: 10px 0;
    color: #4e5f80;
    font-size: 0.91rem;
}

.module-link {
    display: inline-flex;
}

.module-note {
    margin: 0;
    font-weight: 600;
}

.module-buttons-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.module-quick-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #bdd0f4;
    border-radius: 999px;
    padding: 8px 14px;
    background: #eef4ff;
    color: #24428f;
    font-size: 0.86rem;
    font-weight: 800;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.module-quick-button:hover {
    background: #e2ecff;
    border-color: #9eb8ec;
}

.module-quick-button.is-assistencial {
    border-color: #9ec8f1;
    background: #eaf5ff;
    color: #1f4d79;
}

.module-quick-button.is-educacao {
    border-color: #b6d8a8;
    background: #eef8e9;
    color: #365f2a;
}

.module-quick-button.is-gestao {
    border-color: #d0c3eb;
    background: #f4effd;
    color: #4c3b7d;
}

.module-quick-button.is-tecnologia {
    border-color: #b5d9db;
    background: #ebf8f8;
    color: #1f5b62;
}

.module-quick-button.is-operacional {
    border-color: #e8caa3;
    background: #fdf5e9;
    color: #7a4e1f;
}

.module-quick-button.is-comunicacao {
    border-color: #f2b6c3;
    background: #feeff3;
    color: #7b3043;
}

.module-horizontal-menu {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.module-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
    padding: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.module-menu-item:hover {
    transform: translateY(-2px);
    border-color: #b8c8ea;
    box-shadow: 0 10px 24px rgba(31, 44, 68, 0.12);
}

.module-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e7eeff;
    color: #26479f;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.module-menu-content {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.module-menu-content strong {
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.module-menu-content small {
    color: #4e5f80;
    font-size: 0.82rem;
    line-height: 1.3;
}

.module-menu-arrow {
    margin-left: auto;
    color: #4d63a0;
    font-size: 1rem;
    flex: 0 0 auto;
}

.module-menu-item.is-assistencial .module-menu-icon {
    background: #dbeeff;
    color: #1f4d79;
}

.module-menu-item.is-educacao .module-menu-icon {
    background: #e6f4df;
    color: #365f2a;
}

.module-menu-item.is-gestao .module-menu-icon {
    background: #eee5ff;
    color: #4c3b7d;
}

.module-menu-item.is-tecnologia .module-menu-icon {
    background: #def1f2;
    color: #1f5b62;
}

.module-menu-item.is-operacional .module-menu-icon {
    background: #fbead4;
    color: #7a4e1f;
}

.module-menu-item.is-comunicacao .module-menu-icon {
    background: #fbe1e8;
    color: #7b3043;
}

.chat-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    min-height: 72vh;
}

.chat-sidebar {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-sidebar-head {
    padding: 12px 12px 8px;
    border-bottom: 1px solid #dbe4fa;
}

.chat-sidebar-head h2 {
    font-size: 1rem;
}

.chat-sidebar-head p {
    margin: 5px 0 0;
    font-size: 0.84rem;
    color: #53678f;
}

.chat-users-list {
    padding: 8px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
}

.chat-user-item {
    border: 1px solid #d5def2;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

.chat-user-item.is-active {
    border-color: #9bb4ea;
    box-shadow: 0 8px 18px rgba(42, 79, 191, 0.12);
}

.chat-user-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chat-user-meta strong {
    font-size: 0.9rem;
}

.chat-user-meta small {
    color: #64779c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.chat-status-dot.is-online {
    background: #1eaf58;
    box-shadow: 0 0 0 3px rgba(30, 175, 88, 0.18);
}

.chat-status-dot.is-offline {
    background: #d83b3b;
    box-shadow: 0 0 0 3px rgba(216, 59, 59, 0.2);
}

.user-presence {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.user-presence.is-online {
    background: #e7f8ee;
    color: #1d6e38;
}

.user-presence.is-offline {
    background: #eef2f8;
    color: #5a6883;
}

.chat-unread {
    background: #2b57c7;
    color: #fff;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.chat-main {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 0;
}

.chat-main-head {
    padding: 12px 14px;
    border-bottom: 1px solid #dce5f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.chat-main-head h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-main-head p {
    margin: 4px 0 0;
    color: #5f7398;
    font-size: 0.84rem;
}

.chat-typing-status {
    margin: 6px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #2f63d2;
    min-height: 1em;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-typing-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chat-toolbar {
    border-bottom: 1px solid #dce5f8;
    padding: 10px 12px;
    background: #f9fbff;
}

.chat-search-input {
    width: 100%;
    border: 1px solid #ccd7ee;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.9rem;
    color: #2f4367;
    background: #fff;
}

.chat-search-input:focus {
    outline: none;
    border-color: #87a4e2;
    box-shadow: 0 0 0 3px rgba(64, 108, 207, 0.14);
}

.chat-presence-badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 0.75rem;
}

.chat-presence-badge.is-online {
    color: #1d6e38;
    background: #e3f6ea;
}

.chat-presence-badge.is-offline {
    color: #5d6b86;
    background: #edf1f9;
}

.chat-messages {
    padding: 14px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 14% 10%, rgba(64, 123, 255, 0.06), transparent 44%),
        radial-gradient(circle at 90% 80%, rgba(29, 132, 217, 0.08), transparent 44%),
        #f9fbff;
    display: grid;
    gap: 10px;
}

.chat-bubble {
    max-width: min(72%, 540px);
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid #d8e2f6;
    background: #fff;
    box-shadow: 0 6px 14px rgba(23, 44, 89, 0.07);
}

.chat-bubble.is-outgoing {
    margin-left: auto;
    background: linear-gradient(145deg, #2d59cc 0%, #3f74df 100%);
    border-color: #2d59cc;
    color: #fff;
}

.chat-bubble-body p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble time {
    display: block;
    margin-top: 7px;
    font-size: 0.72rem;
    opacity: 0.78;
}

.chat-file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    text-decoration: none;
    font-weight: 700;
    color: inherit;
}

.chat-image-preview {
    display: block;
    margin-top: 8px;
    max-width: 240px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(198, 214, 244, 0.8);
}

.chat-form {
    border-top: 1px solid #dce5f8;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.chat-file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.chat-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c3d2f2;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f0f5ff;
    color: #2a4ea8;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.84rem;
}

.chat-file-input {
    display: none;
}

.chat-attachment-name {
    color: #65789e;
    font-size: 0.83rem;
}

.chat-send-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.chat-send-row textarea {
    border: 1px solid #ccd7ee;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    resize: vertical;
    min-height: 48px;
}

.chat-send-row button {
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2a4fbf 0%, #3d74db 100%);
}

.chat-empty {
    color: #5d7196;
    margin: 0;
    text-align: center;
    padding: 20px;
    font-weight: 700;
}

.screen-fieldset {
    margin: 6px 0 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}

.screen-fieldset legend {
    font-size: 0.82rem;
    font-weight: 800;
    color: #425777;
    padding: 0 8px;
}

.documents-users-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.documents-users-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    font-family: inherit;
    font-size: 0.92rem;
    background: #fff;
}

.documents-users-select:disabled {
    opacity: 0.65;
    background: #f4f7fc;
}

.doc-read-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.doc-read-status.is-read {
    background: #e7f8ee;
    color: #1d6e38;
}

.doc-read-status.is-pending {
    background: #fdeeee;
    color: #8a2a2a;
}

.doc-read-details {
    margin-top: 6px;
}

.doc-read-details summary {
    cursor: pointer;
    font-size: 0.84rem;
    color: #324e87;
    font-weight: 700;
}

.doc-read-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #f7f9ff;
    border: 1px solid #dde6fb;
    border-radius: 10px;
    padding: 10px;
}

.doc-read-grid h4 {
    margin: 0 0 6px;
    font-size: 0.83rem;
}

.doc-read-list {
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 4px;
}

.doc-read-list li {
    font-size: 0.82rem;
    color: #3d5277;
}

.screen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.checkbox-group-toggle {
    margin: 0 0 8px;
    font-weight: 800;
    color: #2c4a87;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #344765;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.checkbox-line input {
    width: 16px;
    height: 16px;
}

.form-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.detail-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fafbff;
}

.detail-block p {
    margin: 8px 0 0;
}

.print-only {
    display: none;
}

.print-header {
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #d8deef;
    margin-bottom: 14px;
    padding-bottom: 10px;
}

.print-logo {
    width: 58px;
    height: auto;
}

.print-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.print-header p {
    margin: 3px 0 0;
    color: #4a5874;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .kpi-grid,
    .charts-grid,
    .view-grid,
    .modules-grid,
    .screen-grid {
        grid-template-columns: 1fr;
    }

    .period-filter {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .period-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .period-actions button,
    .period-actions .btn-secondary {
        width: 100%;
    }

    .module-horizontal-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .chat-sidebar {
        min-height: 240px;
        max-height: 320px;
    }
}

@media (max-width: 760px) {
    .dashboard-page {
        padding: 10px;
        gap: 10px;
    }

    .login-card,
    .dashboard-card,
    .form-card,
    .view-card,
    .dashboard-header {
        border-radius: 14px;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: #fff;
        border: 1px solid #e5e9f7;
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 8px 10px;
    }

    .data-table td {
        border: 0;
        border-bottom: 1px dashed #e1e8f4;
        padding: 8px 4px;
        min-height: 28px;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #6d7c98;
        font-weight: 800;
        margin-bottom: 4px;
    }

    .actions-col {
        justify-content: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button,
    .form-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .inline-field-group {
        grid-template-columns: 1fr;
    }

    .module-buttons-row {
        flex-direction: column;
    }

    .module-quick-button {
        width: 100%;
        justify-content: center;
    }

    .module-horizontal-menu {
        grid-template-columns: 1fr;
    }

    .chat-send-row {
        grid-template-columns: 1fr;
    }

    .chat-bubble {
        max-width: 90%;
    }
}

@media print {
    .no-print {
        display: none;
    }

    .print-only {
        display: flex;
    }

    body {
        background: #fff;
    }

    .dashboard-page {
        padding: 0;
    }

    .view-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
