

:root {
    --primary-color: #4f46e5;
    --accent-color: #10b981;
    --app-bg: #f9fafb;
    --sidebar-bg: #111827;
    --card-bg: #ffffff;
    --sidebar-text: #d1d5db;
    --sidebar-text-hover: #ffffff;
    --sidebar-active-bg: #4f46e5;
    --sidebar-active-text: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;

    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 12px;

    --priority-urgent: #ef4444;
    --priority-high: #f97316;
    --priority-medium: #3b82f6;
    --priority-low: #6b7280;

    --note-yellow: #fef9c3;
    --note-blue: #dbeafe;
    --note-pink: #fce7f3;
    --note-green: #dcfce7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--app-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* --- Loader --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.spinner {
    width: 56px;
    height: 56px;
    border: 7px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Modal --- */
#modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}
#modal-backdrop.visible {
    opacity: 1;
}
.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#modal-backdrop.visible .modal-content {
    transform: scale(1);
}
.modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.modal-form .form-group {
    margin-bottom: 1rem;
}
.modal-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.modal-form input, .modal-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9fafb;
    font-size: 1rem;
}

/* --- Login Page --- */
#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    animation: fadeIn 1s ease-in-out;
    background-color: var(--app-bg);
}
.login-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    max-width: 400px;
    z-index: 1;
}
.login-header h2 {
    font-weight: 700;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}
.login-header p {
    color: var(--text-light);
    margin-bottom: 2.5rem;
}
.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}
.login-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--app-bg);
    font-size: 1rem;
}
.login-btn {
    width: 100%;
    background-image: linear-gradient(to right, #4f46e5 0%, #8b5cf6 51%, #4f46e5 100%);
    background-size: 200% auto;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s ease-out;
    box-shadow: var(--shadow-md);
}
.login-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem;
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.sidebar-header h2 {
    font-weight: 700;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
}
.sidebar-header i {
    color: #a78bfa;
}
.sidebar-nav {
    flex-grow: 1;
}
.sidebar-nav ul {
    list-style: none;
}
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}
.sidebar-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-hover);
}
.sidebar-nav li a.active {
    background: linear-gradient(to right, #4f46e5, #8b5cf6);
    color: var(--sidebar-active-text);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.sidebar-nav li a i {
    margin-right: 1rem;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}
.sidebar-footer {
    margin-top: auto;
}

/* --- Main Content --- */
main {
    flex-grow: 1;
    margin-left: 260px;
    padding: 2rem;
    transition: margin-left 0.3s ease-in-out;
}
.page-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
}
.page-content {
    display: none;
}
.page-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}
.main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}
.menu-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}
.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.header-user span {
    font-weight: 600;
}

/* --- Components --- */
.btn {
    background-image: linear-gradient(to right, #4f46e5 0%, #8b5cf6 51%, #4f46e5 100%);
    background-size: 200% auto;
    color: #fff;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.4s ease-out;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}
.btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.card:not(.idea-card):not(.content-calendar-container):hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Dashboard */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.stat-card .icon {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #4f46e5, #8b5cf6);
    color: #fff;
    padding: 1.2rem;
    border-radius: 50%;
    height: 64px;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-card-info h3 { font-size: 2rem; font-weight: 700; }
.stat-card-info p { color: var(--text-light); font-size: 0.9rem; font-weight: 500; }
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}
.card h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.project-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}
.project-list-item:last-child { border-bottom: none; }
.project-info p { font-weight: 600; margin-bottom: 0.2rem; }
.project-info span { font-size: 0.85rem; color: var(--text-light); }

/* Projects */
.project-card h3 { font-size: 1.2rem; }
.project-status {
    padding: 0.3rem 0.8rem; border-radius: 99px;
    font-size: 0.75rem; font-weight: 600; text-transform: capitalize;
}
.project-status.in-progress { background-color: #fef3c7; color: #d97706; }
.project-status.completed { background-color: #dcfce7; color: #16a34a; }
.project-status.on-hold { background-color: #fee2e2; color: #dc2626; }
.progress-bar {
    width: 100%; background-color: #e5e7eb; border-radius: 99px;
    height: 8px; margin: 1rem 0; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background-color: var(--primary-color); border-radius: 99px;
}
.project-card-footer {
    margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color);
    font-size: 0.9rem; color: var(--text-light); display: flex;
    justify-content: space-between; align-items: center;
}

/* Kanban */
.kanban-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; align-items: start;
}
@media (min-width: 640px) {
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
    .kanban-board { grid-template-columns: repeat(4, 1fr); }
}
.kanban-column {
    background-color: #f3f4f6; border-radius: var(--border-radius); padding: 1rem;
}
.kanban-column-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}
.task-card {
    background-color: var(--card-bg); padding: 1rem; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}
.task-card:hover { transform: scale(1.03); }
.task-card.priority-urgent { border-left-color: var(--priority-urgent); }
.task-card.priority-high { border-left-color: var(--priority-high); }
.task-card.priority-medium { border-left-color: var(--priority-medium); }
.task-card.priority-low { border-left-color: var(--priority-low); }
.task-meta { margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-light); }

/* Data Table */
.data-table-wrapper {
    overflow-x: auto;
}
.data-table table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 1rem; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.data-table th { font-weight: 600; font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; }
.user-info { display: flex; align-items: center; gap: 1rem; }
.user-info img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.user-role {
    padding: 0.2rem 0.8rem; border-radius: 99px; font-size: 0.8rem;
    font-weight: 500; background-color: #e0e7ff; color: var(--primary-color);
}
.file-icon { font-size: 1.2rem; margin-right: 0.5rem; width: 20px; text-align: center; }
.file-icon.type-pdf { color: #ef4444; }
.file-icon.type-doc { color: #3b82f6; }
.file-icon.type-xls { color: #16a34a; }
.file-icon.type-ppt { color: #f97316; }
.file-icon.type-video { color: #8b5cf6; }

/* Notes */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.note-card {
    padding: 1.5rem; box-shadow: var(--shadow-md);
    position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}
.note-card.yellow { background-color: var(--note-yellow); border-top: 4px solid #facc15; }
.note-card.blue { background-color: var(--note-blue); border-top: 4px solid #60a5fa; }
.note-card.pink { background-color: var(--note-pink); border-top: 4px solid #f472b6; }
.note-card.green { background-color: var(--note-green); border-top: 4px solid #4ade80; }

/* Assets Page */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.asset-card { padding: 0; overflow: hidden; }
.asset-thumbnail { height: 180px; background-size: cover; background-position: center; position: relative; }
.asset-type-badge {
    position: absolute; top: 1rem; left: 1rem; background-color: rgba(0, 0, 0, 0.5);
    color: #fff; padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.8rem;
    backdrop-filter: blur(4px); display: flex; align-items: center; gap: 6px;
}
.asset-info { padding: 1rem; }
.asset-info h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.asset-info p { font-size: 0.9rem; color: var(--text-light); }

/* NEW Calendar Page */
.content-calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 1rem; }
.content-calendar-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-light); }
.content-calendar-header h2 { font-size: 1.3rem; }
.content-calendar-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.calendar-column { border-right: 1px solid var(--border-color); }
.calendar-column:last-child { border-right: none; }
.calendar-column-header { display: flex; justify-between; align-items: center; padding: 0.75rem; border-bottom: 1px solid var(--border-color); }
.calendar-column-header .day-name { font-weight: 600; }
.calendar-column-header .day-number { font-weight: 500; color: var(--text-light); }
.calendar-column-body { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; min-height: 500px; }
.content-card { padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 0.5rem; }
.content-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.content-card-header p { font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.content-card-header time { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; }
.content-card-status { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.content-card-status .status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-published .status-dot { background-color: var(--accent-color); }
.content-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-pill { padding: 0.2rem 0.6rem; font-size: 0.75rem; font-weight: 500; border-radius: 99px; }
.tag-blue { background-color: #dbeafe; color: #3b82f6; }
.tag-gray { background-color: #e5e7eb; color: #4b5563; }
.tag-orange { background-color: #ffedd5; color: #f97316; }
.tag-purple { background-color: #f3e8ff; color: #9333ea; }
.tag-green { background-color: #dcfce7; color: #16a34a; }
.tag-pink { background-color: #fce7f3; color: #db2777; }
.tag-red { background-color: #fee2e2; color: #dc2626; }
.content-card-platforms { display: flex; gap: 0.75rem; font-size: 1.1rem; color: var(--text-light); margin-top: 0.25rem; }
.content-card-platforms .fa-threads { font-size: 1rem; }

/* Chat Page */
.chat-container {
    display: grid; grid-template-columns: 300px 1fr;
    height: calc(100vh - 200px); position: relative;
    overflow: hidden;
}
.chat-sidebar {
    border-right: 1px solid var(--border-color);
    padding: 1rem; display: flex; flex-direction: column;
}
.chat-sidebar h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.contact-list { overflow-y: auto; }
.contact {
    display: flex; align-items: center; gap: 1rem; padding: 0.8rem;
    border-radius: 8px; cursor: pointer; transition: background-color 0.2s;
}
.contact:hover, .contact.active { background-color: #f3f4f6; }
.contact img { width: 40px; height: 40px; border-radius: 50%; }
.contact-info p { font-weight: 600; }
.contact-info span { font-size: 0.8rem; color: var(--text-light); }
.chat-window {
    background-color: #f9fafb;
    display: flex; flex-direction: column;
}
.chat-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color);
    font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 1rem;
}
.chat-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.chat-header-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.btn-back { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.chat-messages { flex-grow: 1; padding: 1.5rem; overflow-y: auto; }
.message {
    display: flex; gap: 0.75rem; margin-bottom: 1rem; max-width: 80%;
}
.message-bubble { padding: 0.7rem 1rem; border-radius: 12px; }
.message.sent { margin-left: auto; flex-direction: row-reverse; }
.message.sent .message-bubble { background-color: var(--primary-color); color: #fff; border-bottom-right-radius: 2px;}
.message.received .message-bubble { background: #fff; color: var(--text-color); border: 1px solid var(--border-color); border-bottom-left-radius: 2px;}
.chat-input {
    padding: 1rem 1.5rem; border-top: 1px solid var(--border-color);
    display: flex; gap: 1rem; background: #fff;
}
.chat-input input {
    flex-grow: 1; padding: 0.8rem; border: 1px solid var(--border-color);
    border-radius: 8px; background-color: #fff;
}
.chat-input .btn { padding: 0.8rem; }

/* Settings Page */
.settings-container { display: grid; gap: 2rem; }
.settings-form { margin-top: 1.5rem; }
.settings-form .form-group { margin-bottom: 1.5rem; }
.settings-form label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.settings-form input {
    width: 100%; max-width: 400px; padding: 0.8rem;
    border-radius: 8px; border: 1px solid var(--border-color);
    background-color: #f9fafb;
}
.permission-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.permission-row:last-child { border-bottom: none; }
.permission-role { font-weight: 600; }
.permission-toggles { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.toggle-group { display: flex; align-items: center; gap: 0.5rem; }
.toggle-group span { font-size: 0.9rem; text-transform: capitalize; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; border-radius: 24px; transition: .4s;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .4s;
}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }

/* Ideas Page */
#add-idea-form.card {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0;
    padding: 1rem;
}
#idea-url-input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.idea-card {
    padding: 0;
    display: flex;
    flex-direction: column;
}
.idea-thumbnail-link {
    display: block;
}
.idea-thumbnail {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}
.idea-info {
    padding: 1rem;
}
.idea-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.idea-info h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s;
}
.idea-info h3 a:hover {
    color: var(--primary-color);
}
.idea-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}
.idea-meta img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.comments-section {
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1rem;
    background-color: #f9fafb;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}
.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.comment-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-top: 2px;
}
.comment-body {
    background: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    flex-grow: 1;
}
.comment-body strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}
.add-comment-form {
    display: flex;
    gap: 0.5rem;
}
.add-comment-form input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.9rem;
}
.add-comment-form button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    main {
        margin-left: 0;
        padding: 1rem;
    }
    .main-header {
        padding: 0.8rem 1rem;
    }
    .menu-toggle-btn {
        display: block;
    }
    .header-user span {
        display: none;
    }
    .page-header {
        margin-bottom: 1.5rem;
    }
    .content-calendar-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    .calendar-column {
        min-width: 280px;
    }

    .chat-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 170px);
    }
    .chat-sidebar {
        width: 100%;
        transition: transform 0.3s ease-in-out;
        transform: translateX(0);
        border: none;
    }
    .chat-window {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
        border-radius: var(--border-radius);
    }
    .chat-container.is-chatting .chat-sidebar {
        transform: translateX(-100%);
    }
    .chat-container.is-chatting .chat-window {
        transform: translateX(0);
    }
    .btn-back {
        display: block;
    }
    .permission-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .permission-role {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }
}