/* Base styles and variables */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --bot-message-bg: #e9f0f8;
    --user-message-bg: #f0f7ed;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

/* App container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: white;
    box-shadow: var(--shadow);
}

/* Header */
.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header title with client name */
.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header buttons container */
.header-buttons {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
}

/* Header button */
.header-button, .settings-button, .clients-button {
    color: white;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    text-decoration: none;
}

.header-button:hover, .settings-button:hover, .clients-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Delete button */
.delete-button {
    color: #dc3545;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    margin-left: 0.5rem;
}

.delete-button:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #bd2130;
}

/* Clear button */
.clear-button {
    color: #dc3545;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    margin-left: 0.5rem;
}

.clear-button:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #bd2130;
}

.app-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Navigation */
.app-nav {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Chat container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message styling */
.message {
    display: flex;
    margin-bottom: 1rem;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
    flex-direction: row-reverse;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.bot-message .message-content {
    background-color: var(--bot-message-bg);
    margin-right: 0.5rem;
}

.user-message .message-content {
    background-color: var(--user-message-bg);
    margin-left: 0.5rem;
}

.message-text {
    margin-bottom: 0.3rem;
    white-space: pre-wrap; /* Preserve newlines and wrap text */
}

.message-time {
    font-size: 0.7rem;
    color: var(--secondary-color);
    text-align: right;
}

/* Avatar styling */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Bot message styling to ensure proper alignment */
.bot-message {
    align-self: flex-start;
    flex-direction: row-reverse;
    align-items: flex-start !important; /* Align items to the top */
}

/* Bot avatar styling - using !important to ensure styles are applied */
.bot-message .bot-avatar {
    width: 90px !important; /* Half the previous size */
    height: 90px !important; /* Half the previous size */
    background-color: transparent !important; /* Remove background color when using logo */
    margin-left: 15px !important; /* Add some spacing between message and avatar */
    align-self: flex-start !important; /* Align avatar to the top */
}

/* Style for the company logo in bot avatar */
.bot-avatar .bot-logo {
    width: 90px !important; /* Half the previous size */
    height: 90px !important; /* Half the previous size */
    object-fit: contain !important;
    border-radius: 50% !important;
}

/* Fix message content to be independent of avatar */
.bot-message .message-content {
    background-color: var(--bot-message-bg);
    margin-right: 0.5rem;
    padding: 0.8rem 1rem;
    align-self: flex-start !important; /* Align content to the top */
}

/* Monthly view wrapper positioning */
.monthly-view-wrapper {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    background-color: transparent;
    width: 100%;
    box-shadow: none;
    margin-left: 105px !important; /* Align with the message content (90px avatar + 15px margin) */
}

.user-avatar {
    background-color: var(--accent-color);
}

/* Input area */
.chat-input-container {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

#chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--primary-color);
}

/* Microphone button */
.mic-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.mic-button:hover {
    background-color: #3a5a8a;
}

.mic-button.disabled {
    background-color: var(--secondary-color);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Send button */
#send-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#send-button:hover {
    background-color: #3a5a8a;
}

#send-button:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bot-message-bg);
    border-radius: var(--border-radius);
    width: fit-content;
    margin-bottom: 1rem;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: inline-block;
    margin: 0 1px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Absence table styling */
.absence-table-wrapper {
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
}

.absence-table-wrapper h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.absence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.absence-table th,
.absence-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.absence-table th {
    background-color: #f1f5fb;
    font-weight: 600;
    color: var(--primary-color);
}

.absence-table tr:last-child td {
    border-bottom: none;
}

.absence-table tr:hover td {
    background-color: #f9fbfd;
}

/* Absence type badges */
.absence-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.absence-badge.vacation {
    background-color: #e3f2fd;
    color: #0277bd;
}

.absence-badge.sick {
    background-color: #ffebee;
    color: #c62828;
}

.absence-badge.permesso {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.absence-badge.absent {
    background-color: #f5f5f5;
    color: #616161;
}

/* Combined absence badge for multiple entries */
.combined-absence-badge {
    display: flex;
    gap: 3px;
    padding: 2px;
    border-radius: 12px;
    background-color: #f8f9fa;
}

.mini-absence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.mini-absence-badge.vacation {
    background-color: #0277bd;
}

.mini-absence-badge.sick {
    background-color: #c62828;
}

.mini-absence-badge.permesso {
    background-color: #2e7d32;
}

.mini-absence-badge.absent {
    background-color: #616161;
}

.mini-absence-badge.smart_working {
    background-color: #9c27b0;
}

/* Action badges */
.action-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.action-badge.add {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.action-badge.update {
    background-color: #fff8e1;
    color: #ff8f00;
}

.action-badge.delete {
    background-color: #ffebee;
    color: #c62828;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    background-color: #4a6da7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

.btn:hover {
    background-color: #3a5a8f;
}

/* Disabled button style */
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    color: #dc3545;
    background-color: transparent;
    border: none;
}

.btn-danger:hover {
    color: #bd2130;
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

/* Monthly view toggle button */
.monthly-view-toggle {
    margin-top: 0.5rem;
}

.monthly-view-button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

/* Aligned monthly view button */
.monthly-view-button.aligned-with-message {
    margin-left: -105px; /* Align with the message content */
}

/* Adjust monthly view button alignment for mobile */
@media (max-width: 768px) {
    .monthly-view-button.aligned-with-message {
        margin-left: -45px; /* Align with the smaller avatar on mobile */
    }
}

.monthly-view-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Message with monthly view wrapper */
.message-with-monthly-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Message with absence table */
.message-with-absence-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Absence table container in chat */
.absence-table-container {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Monthly view wrapper (outside message) */
.monthly-view-wrapper {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    background-color: transparent;
    width: 100%;
    box-shadow: none;
}

/* Monthly view container in chat */
.monthly-view-container {
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 8px;
    border: none;
    width: 100%;
}

/* Chat monthly table */
.chat-monthly-table {
    width: 100%;
    font-size: 0.8rem;
    background-color: transparent;
}

.chat-monthly-table h3 {
    font-size: 1rem;
    padding: 0.5rem;
    margin: 0;
    background-color: transparent;
    border-bottom: none;
}

.chat-monthly-table table {
    width: 100%;
    border-collapse: collapse;
}

.chat-monthly-table th,
.chat-monthly-table td {
    padding: 0.4rem;
    text-align: center;
    border-bottom: 1px dotted var(--border-color);
    border-right: none;
}

.chat-monthly-table th:first-child,
.chat-monthly-table td:first-child {
    text-align: center;
    font-weight: 600;
    width: 30px;
}

.chat-monthly-table th {
    background-color: transparent;
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.chat-monthly-table .absence-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    margin: 0 auto;
}

.chat-monthly-table .absence-indicator.vacation {
    background-color: #0277bd;
}

.chat-monthly-table .absence-indicator.sick {
    background-color: #c62828;
}

.chat-monthly-table .absence-indicator.permesso {
    background-color: #2e7d32;
}

.chat-monthly-table .absence-indicator.absent {
    background-color: #616161;
}

.chat-monthly-table .weekend {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

/* Holiday styling for monthly tables */
.chat-monthly-table .holiday,
.monthly-table-wrapper .holiday,
table tbody tr td.holiday,
table thead tr th.holiday {
    background-color: #ffebee !important;
    color: #c62828 !important;
}

/* Loading and error states */
.monthly-view-container .loading,
.monthly-view-container .error-message {
    padding: 1rem;
    text-align: center;
    color: var(--secondary-color);
}

.monthly-view-container .error-message {
    color: #c62828;
}

/* Statistics button and table styles */
.statistics-button-container {
    margin-top: 10px;
    margin-bottom: 10px;
}

.statistics-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.statistics-button:hover {
    background-color: #3a5a8a;
}

.statistics-table-container {
    margin-top: 10px;
    margin-bottom: 10px;
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.statistics-table h3 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f1f5fb;
}

.statistics-table th,
.statistics-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.statistics-table th {
    background-color: #f1f5fb;
    font-weight: 600;
    color: var(--primary-color);
}

.statistics-table tr:last-child td {
    border-bottom: none;
}

.statistics-table tr:hover td {
    background-color: #f9fbfd;
}

/* Title link */
.title-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.title-link:hover {
    opacity: 0.9;
}

/* Tab navigation */
.tab-navigation {
    display: flex;
    background-color: #f1f5fb;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    padding: 0 1rem;
}

/* Tab container to center tabs */
.tab-buttons-container {
    display: flex;
    flex: 1;
    justify-content: center;
}

/* Back button */
.back-button {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: color 0.2s;
    margin-right: 0.5rem;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.back-button:hover {
    color: var(--primary-color);
    background-color: transparent;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
}

/* Month header */
.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.month-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

/* Month subheader with toggle button */
.month-subheader {
    display: flex;
    justify-content: flex-end;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.toggle-button-container {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 0;
    width: 100%;
}

.toggle-view-btn {
    padding: 5px 10px;
    background-color: #4a6da7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.toggle-view-btn:hover {
    background-color: #3a5a8f;
}

/* Monthly table in the unified view */
.monthly-table-wrapper {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
}

.monthly-table-wrapper h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Migration notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 300px;
    animation: slide-in 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-content .fa-sync {
    color: var(--primary-color);
}

.notification-content .fa-check {
    color: #28a745;
}

.notification-content .fa-exclamation-triangle {
    color: #dc3545;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Client info in header */
.client-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 5px;
    display: none; /* Hide client info in header */
}

/* Client name subtitle for page sections */
.client-name-subtitle {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
    display: inline-block;
}

/* Client name inline with title */
.client-name-inline {
    font-size: 1.2em;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
    display: inline-block;
    vertical-align: baseline;
}

/* Month header left section with title and client name */
.month-header-left {
    display: flex;
    align-items: baseline;
}

.month-header-left .month-title {
    margin-right: 5px;
}

/* Welcome client name in index.html */
#welcome-client-name {
    font-size: 1.5em;
    color: #4a6da7;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Add space between dash and client name */
.client-info span {
    margin-left: 0.5rem;
}

/* Logout button */
.logout-button {
    color: white;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    text-decoration: none;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Month closed notification */
.month-closed-notification {
    margin-bottom: 1rem;
    width: 100%;
}

.month-closed-notification .alert {
    padding: 0.6rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f1f2f6;
    color: #6c757d;
    border-left: 3px solid #dc3545;
    font-size: 0.9rem;
}

.month-closed-notification .fa-lock {
    font-size: 1rem;
    color: #dc3545;
}

/* Disabled input for closed months */
#chat-input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* New Chat Indicator */
.new-chat-indicator {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    animation: fade-in 0.5s ease-in-out;
}

.new-chat-banner {
    background-color: #e9f0f8;
    color: #4B6CB7;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    max-width: 85%;
}

.new-chat-banner i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.new-chat-banner span {
    font-weight: 500;
    margin-right: 15px;
}

.new-chat-banner .timestamp {
    font-size: 0.8rem;
    color: #6c757d;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        max-width: 100%;
        margin: 0;
    }
    
    /* Fix header buttons overlap with title */
    .app-header h1 {
        font-size: 1.5rem;
        padding-right: 80px; /* Make room for the header buttons */
    }
    
    /* Adjust client info for mobile */
    .client-info {
        position: static;
        transform: none;
        margin: 0.5rem auto;
        width: fit-content;
        font-size: 0.8rem;
    }
    
    .header-buttons {
        right: 0.5rem;
    }
    
    .header-button, .settings-button, .clients-button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    /* Improved chat bubble layout for mobile */
    .message {
        max-width: 95%;
    }
    
    /* Optimize bot message layout */
    .bot-message {
        margin-left: 0;
    }
    
    /* Reduce bot avatar size on mobile */
    .bot-message .bot-avatar {
        width: 40px !important;
        height: 40px !important;
        margin-left: 5px !important;
    }
    
    .bot-avatar .bot-logo {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Make message content wider */
    .bot-message .message-content {
        flex: 1;
        max-width: calc(100% - 50px);
    }
    
    /* Adjust monthly view wrapper margin to match smaller avatar */
    .monthly-view-wrapper {
        margin-left: 45px !important;
    }
    
    .absence-table {
        font-size: 0.75rem;
    }
    
    .absence-table th,
    .absence-table td {
        padding: 0.4rem 0.5rem;
    }
    
    .statistics-table {
        font-size: 0.75rem;
    }
    
    .statistics-table th,
    .statistics-table td {
        padding: 0.4rem 0.5rem;
    }
    
    .chat-monthly-table {
        font-size: 0.7rem;
    }
    
    .chat-monthly-table th,
    .chat-monthly-table td {
        padding: 0.3rem;
    }
    
    .chat-monthly-table .absence-indicator {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    /* Fix for mobile tab navigation */
    .tab-navigation {
        padding: 0 0.5rem;
    }
    
    .back-button, .delete-button, .clear-button {
        width: 40px;
        height: 40px;
        margin: 0 0.25rem;
    }
    
    .tab-button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}
