body {
    font-family: 'Inter', sans-serif;
    --black: #0a0908;
    --gunmetal: #22333b;
    --almond: rgba(84, 73, 75, 0.5);
    --khaki: #c6ac8f;
    --walnut-brown: #5e503f;

    --light-blue: #a7cecb;
    --cadet-gray: #8ba6a9;
    --reseda-green: #75704e;
    --sage: #cacc90;
    --lemon-chiffon: #f4ebbe;
    
    background-color: #f3f4f6;
}
.nav-link-active { background-color: var(--walnut-brown) !important; color: white; }

.modal-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(4px);
}
.modal-backdrop.modal-open {
    opacity: 1;
    pointer-events: auto;
}
.modal-backdrop > div {
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.modal-backdrop.modal-open > div {
    opacity: 1;
    transform: scale(1);
}

#main-content-container {
    position: relative;
    overflow: hidden;
}
.main-view-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
@keyframes pageExitAnimation {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-20%); opacity: 0; }
}
@keyframes pageEnterAnimation {
    from { transform: translateX(20%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.page-exit-active {
    animation: pageExitAnimation 0.4s ease-in-out forwards;
}
.page-enter-active {
    animation: pageEnterAnimation 0.4s ease-in-out forwards;
}

@keyframes dropIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.animate-drop-in {
    opacity: 0;
    animation: dropIn 0.8s ease-out forwards;
}
.sidebar-item-hidden {
    opacity: 0;
    transform: translateY(-20px);
}

@keyframes dropInFromTop {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-drop-in-top {
    animation-name: dropInFromTop;
    animation-duration: 0.6s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    opacity: 0;
}


.text-outline { color: transparent; -webkit-text-stroke: 1px var(--khaki); }
.file-item-active, .contract-row-active { background-color: #0a09081a; }
.custom-category-link .delete-category-btn { opacity: 0; transition: opacity 0.2s ease-in-out; }
.custom-category-link:hover .delete-category-btn { opacity: 1; }
#logo-container img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.collapsible-header i, #drawing-metadata-toggle i { transition: transform 0.3s ease; }
.collapsible-header.open i, #drawing-metadata-toggle.open i { transform: rotate(180deg); }

#fullscreen-content-wrapper { cursor: grab; }
#fullscreen-content-wrapper.is-panning { cursor: grabbing; }

.modal-form-area label, #design-catalog-creator-area .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.modal-form-area input[type="text"],
/* REMOVED: input[type="date"] */
.modal-form-area input[type="datetime-local"],
.modal-form-area input[type="tel"],
.modal-form-area input[type="email"],
.modal-form-area input[type="password"],
.modal-form-area input[type="number"],
.modal-form-area input[type="url"],
/* REMOVED: input[type="time"] */
.modal-form-area select,
.modal-form-area textarea {
    margin-top: 0.25rem;
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.5rem 0.75rem;
    background-color: #5e503f;
    color: white;
    border: 1px solid #9ca3af;
}

/* NEW RULE: Fixes date input padding and clickable calendar */
.modal-form-area input[type="date"] {
    margin-top: 0.25rem;
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    /* NOTE: padding-left is handled by pl-10 class in HTML */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-right: 0.75rem;
    background-color: #5e503f;
    color: white;
    border: 1px solid #9ca3af;
    color-scheme: dark;
}

/* NEW RULE: Fixes time input text/control visibility */
.modal-form-area input[type="time"] {
    margin-top: 0.25rem;
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.5rem 0.75rem;
    background-color: #5e503f;
    color: white;
    border: 1px solid #9ca3af;
    color-scheme: dark; /* This makes the browser's time controls light */
}


/* REMOVED: This rule was breaking the date input */
/*
.modal-form-area input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}
*/

.modal-form-area input::placeholder,
.modal-form-area textarea::placeholder {
    color: #d1d5db;
    opacity: 1;
}

.modal-form-area input:focus,
.modal-form-area select:focus,
.modal-form-area textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    --tw-ring-color: #a5b4fc;
    box-shadow: 0 0 0 2px #a5b4fc;
    border-color: #818cf8;
}

.modal-form-area input[type="file"] {
     margin-top: 0.25rem;
     color: #d1d5db;
}

#permit-search-input, #permit-status-filter {
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.5rem 0.75rem;
    background-color: #5e503f;
    color: white;
    border: 1px solid #9ca3af;
}
#permit-search-input::placeholder { color: #d1d5db; }

.modal-form-area select, #permit-status-filter {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day { border: 1px solid #d1c7bc; min-height: 120px; transition: background-color 0.2s; }
.calendar-day:not(.other-month):hover { background-color: #f3ece4; }
.calendar-day.other-month { background-color: rgba(84, 73, 75, 0.5); }
.calendar-day .day-number { font-weight: 500; }
.calendar-day.today .day-number {
    background-color: var(--walnut-brown);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
}
.calendar-event {
    padding: 2px 6px;
    margin: 4px 2px;
    border-radius: 9999px;
    font-size: 0.7rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: filter 0.2s;
}
.calendar-event:hover { filter: brightness(1.1); }
.permit-event-submission { background-color: #3b82f6; }
.permit-event-approval { background-color: #22c55e; }
.permit-event-expiration { background-color: #ef4444; }

.contract-event-date { background-color: #a855f7; }
.contract-event-start { background-color: #14b8a6; }
.contract-event-end { background-color: #f97316; }

.meeting-event { background-color: #ec4899; }
.task-event { background-color: #8b5cf6; }


.permit-due-tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background-color: rgba(94, 80, 63, 0.65);
    color: white;
}
.permit-due-tab.active-tab {
    color: var(--walnut-brown);
    border-bottom-color: var(--walnut-brown);
    background-color: transparent;
}
.permit-due-item {
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(84, 73, 75, 0.5);
}
.small-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.small-calendar-day { text-align: center; padding: 0.25rem; border-radius: 50%; font-size: 0.8rem; }
.small-calendar-day.today { background-color: var(--walnut-brown); color: white; }
.small-calendar-day.other-month { color: #9ca3af; }

#invoice-creator-area .form-input, #change-order-creator-area .form-input, #design-catalog-creator-area .form-input {
    @apply w-full p-1 bg-transparent border-none focus:ring-0 text-sm;
}
#invoice-creator-area .form-group, #change-order-creator-area .form-group, #design-catalog-creator-area .form-group {
    @apply flex items-center;
}
#invoice-creator-area .form-group i, #change-order-creator-area .form-group i, #design-catalog-creator-area .form-group i {
    @apply text-gray-400 w-5 text-center;
}
#invoice-creator-area #invoice-logo-dropzone, #change-order-creator-area #change-order-logo-dropzone {
    @apply w-8 h-8 border-2 border-dashed border-gray-300 rounded-lg flex items-center justify-center text-center text-gray-500 cursor-pointer flex-shrink-0;
}
#invoice-creator-area #invoice-logo-preview, #change-order-creator-area #change-order-logo-preview {
    @apply w-full h-full object-contain;
}
#invoice-creator-area .line-item-row input {
    @apply bg-transparent border-b border-gray-200 focus:border-purple-500 focus:ring-0;
}
.word-break-all {
    word-break: break-all;
}

#invoice-sheet.has-background, #change-order-sheet.has-background {
    position: relative;
    z-index: 1;
}
#invoice-sheet.has-background::before, #change-order-sheet.has-background::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: -1;
    border-radius: 0.5rem;
}

body::-webkit-scrollbar,
.bento-content::-webkit-scrollbar,
#file-display-section::-webkit-scrollbar,
#permits-area::-webkit-scrollbar,
#time-tracking-area::-webkit-scrollbar,
#email-list-container::-webkit-scrollbar {
    display: none;
}

body,
.bento-content,
#file-display-section,
#permits-area,
#time-tracking-area,
#email-list-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#drawing-metadata-container {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}
#drawing-metadata-container.open {
    max-height: 300px;
}

.link-doc-tab {
    @apply px-4 py-2 text-sm font-medium text-gray-400 border-b-2 border-transparent hover:text-white hover:border-gray-300;
}
.link-doc-tab.active-tab {
    @apply text-white border-white;
}

.A4-landscape {
    background: white;
    width: 11.69in;
    height: 8.27in;
    display: block;
    margin: 0 auto;
    margin-bottom: 0.5in;
    padding: 0.5in;
    box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
    position: relative;
    box-sizing: border-box;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.3in;
    height: 100%;
}
.page-number {
    position: absolute;
    bottom: 0.15in;
    right: 0.3in;
    font-size: 10px;
    color: #888;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    body, html {
        background: white !important;
    }

    body > .flex.h-screen, .modal-backdrop:not(#document-detail-modal) {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }

    #document-detail-modal,
    #document-detail-modal > div,
    #document-detail-modal-content,
    #pdf-content {
        visibility: visible !important;
        position: static !important;
        display: block !important;
        overflow: visible !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    #pdf-content * {
        visibility: visible !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .A4-landscape {
        box-shadow: none !important;
        margin: 0 !important;
        border: none !important;
        page-break-after: always;
    }

    .A4-landscape:last-child {
        page-break-after: auto;
    }

    .page-number {
        display: block;
    }
}
.task-view-tab {
    @apply px-4 py-2 text-sm font-medium text-gray-500 border-b-2 border-transparent hover:text-gray-700 hover:border-gray-300;
}
.task-view-tab.active-tab {
    @apply text-indigo-600 border-indigo-500;
}

.time-view-tab {
    @apply px-4 py-2 text-sm font-medium text-gray-500 border-b-2 border-transparent hover:text-gray-700 hover:border-gray-300;
}
.time-view-tab.active-tab {
    @apply text-indigo-600 border-indigo-500;
}

.task-card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}
.task-card.expanded .task-card-details {
    max-height: 300px;
    margin-top: 1rem;
}

.kanban-column {
    min-height: 200px;
}
.kanban-column.drag-over {
    background-color: rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}
.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}
.kanban-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--air-superiority-blue);
    color: white;
    font-size: 10px;
    font-weight: bold;
    margin-left: -8px;
    border: 2px solid white;
}

.mini-progress-bar > div {
    transition: width 0.5s ease-in-out;
}

@keyframes progressBarAnimation {
    from { width: 0%; }
}
.animated-progress-bar {
    animation: progressBarAnimation 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.cost-table-row {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.phase-breakdown-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}
.phase-breakdown-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.text-xxs {
    font-size: 0.65rem;
    line-height: 0.8rem;
}

.member-earning-table {
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}
.member-earning-table td {
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.member-earning-table tr:first-child td:first-child {
    border-top-left-radius: 0.5rem;
}
.member-earning-table tr:first-child td:last-child {
    border-top-right-radius: 0.5rem;
}
.member-earning-table tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
.member-earning-table tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}
.member-earning-table tr:last-child td {
    border-bottom: none;
}
.member-earning-table td:first-child {
    font-weight: 600;
    color: #a3cef1;
    width: 40%;
}
.member-earning-table td:last-child {
    text-align: right;
    font-family: monospace;
    font-size: 1.125rem;
}

.project-earnings-table th {
    color: #a3cef1;
    font-weight: 600;
}
.project-earnings-table tr.top-earner {
    background-color: rgba(96, 150, 186, 0.6);
}
.project-earnings-table tr.top-earner:hover {
    background-color: rgba(96, 150, 186, 0.7);
}

.comment-item .comment-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.comment-item:hover .comment-actions {
    opacity: 1;
}

#dashboard-area {
    background-color: rgba(139, 166, 169, 0.6);
}
.dashboard-title-bg {
    background-color: rgba(117, 112, 78, 0.5);
}
.dashboard-card {
    background-color: rgba(117, 112, 78, 0.9);
    display: flex;
    flex-direction: column;
}
.dashboard-card h3, .dashboard-card .uppercase {
    color: var(--lemon-chiffon);
}
.dashboard-card p, .dashboard-card span {
    color: var(--lemon-chiffon);
}
.progress-bar {
    background-color: rgba(202, 204, 144, 0.4);
    border-radius: 9999px;
    height: 0.375rem;
}
.progress-bar-inner {
    background-color: var(--lemon-chiffon);
    height: 0.375rem;
    border-radius: 9999px;
}
.project-list-item .project-color {
    @apply w-4 h-4 rounded-full mr-3;
}
.db-collapsible-header {
    @apply flex justify-between items-center p-3 rounded-md cursor-pointer border-b border-gray-300/50;
}
.db-collapsible-header:hover {
    background-color: rgba(202, 204, 144, 0.3);
}
.db-collapsible-content {
    @apply pl-2;
}

.bento-box .bento-content {
    max-height: 250px;
    overflow-y: auto;
    transition: max-height 0.5s ease-in-out;
    flex-grow: 1;
}

.bento-box.expanded .bento-content {
    max-height: 1000px;
}

.bento-header {
    cursor: pointer;
}

.category-header-bg {
    background-color: rgba(84, 73, 75, 0.5);
}


#sidebar-branding {
    position: relative;
    overflow: hidden;
    background-color: #0a0908;
}

.sidebar-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.sidebar-branding-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

.event-ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: rgba(0,0,0,0.1);
    padding: 8px 0;
    border-radius: 4px;
}
.event-ticker {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}
.event-ticker-item {
    display: inline-block;
    padding: 0 2rem;
    color: var(--lemon-chiffon);
}
.event-ticker-item i {
    margin-right: 8px;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.meeting-list-item {
    position: relative;
}

.meeting-item-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    display: flex;
    gap: 8px;
}

.meeting-list-item:hover .meeting-item-actions {
    opacity: 1;
}

.meeting-action-btn {
    color: var(--lemon-chiffon);
    background: none;
    border: none;
    cursor: pointer;
}
.meeting-action-btn:hover {
    color: white;
}


.meeting-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.meeting-detail-table th, .meeting-detail-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(244, 235, 190, 0.2);
}
.meeting-detail-table th {
    font-weight: bold;
    color: var(--sage);
}
.meeting-detail-table .status-scheduled {
    background-color: rgba(59, 130, 246, 0.2);
}
.meeting-detail-table .status-completed {
    background-color: rgba(34, 197, 94, 0.2);
}
.meeting-detail-table .status-cancelled {
    background-color: rgba(239, 68, 68, 0.2);
}
.meeting-detail-table .meeting-notes, .meeting-detail-table .meeting-action-items {
    font-size: 0.8rem;
    color: var(--sage);
    white-space: pre-wrap;
}

.payroll-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - 10rem);
    perspective: 2000px;
    position: relative;
}

.payroll-card {
    background-color: #6096ba;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.7s ease-in-out, width 0.7s ease-in-out, left 0.7s ease-in-out, top 0.7s ease-in-out, height 0.7s ease-in-out, opacity 0.7s ease-in-out;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.payroll-card .payroll-card-inner {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.payroll-card.fullscreen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 20;
    cursor: default;
    transform: rotateY(0deg) !important;
}

.payroll-card.fullscreen .payroll-card-inner {
    overflow-y: auto;
}

.payroll-card.minimized {
    transform: scale(0.8);
    opacity: 0.3;
    pointer-events: none;
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fade-in-down 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards 0.2s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse {
    animation: pulse 2.5s infinite;
}

@keyframes slide-up-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#leave-request-confirmation {
    animation: slide-up-fade-in 0.5s ease-out forwards;
}

.shadow-top {
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 1024px) {
    #left-sidebar {
        width: 5rem;
    }
    #left-sidebar .ml-2 {
        display: none;
    }
    #left-sidebar .nav-link {
        justify-content: center;
    }
    #brand-name, #project-header label, #project-actions {
        display: none;
    }
    #sidebar-project-selector {
        padding: 0.5rem;
    }
    #right-sidebar {
        width: 14rem;
    }

    #hero-section {
        justify-content: center;
        text-align: center;
    }
    #main-content {
        text-align: center;
    }
    #cta-buttons {
        justify-content: center;
    }
    #card-container {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    #app-container {
        flex-direction: column;
    }
    #left-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 200px;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    #left-sidebar.open {
        transform: translateX(0);
    }
    #left-sidebar .ml-2, #brand-name {
        display: block;
    }
     #left-sidebar .nav-link {
        justify-content: flex-start;
    }
    
    #right-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 256px;
        z-index: 40;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        background-color: #c6ac8fff;
        margin: 0;
        border-radius: 0;
        box-shadow: -2px 0 8px rgba(0,0,0,0.15);
    }
    #right-sidebar.open {
        transform: translateX(0);
    }
    #right-sidebar > div {
        border-radius: 0;
        margin: 0;
        height: 100%;
        box-shadow: none;
    }

    main.flex-1 {
        width: 100%;
    }
    main > header {
        padding-left: 4rem;
        padding-right: 4rem;
        height: 4rem;
    }
    #main-header-title {
        font-size: 1.25rem;
    }
    .main-view-area {
        padding: 1rem;
    }

    #mobile-menu-button, #right-sidebar-toggle-button {
        display: block;
        z-index: 30;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    #mobile-menu-button {
        left: 1rem;
    }
    #right-sidebar-toggle-button {
        right: 1rem;
    }

    #hero-section {
        padding: 1rem;
    }
    #main-headline {
        font-size: 2.5rem;
    }
    #subheading {
        font-size: 1.1rem;
    }
    #cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    #rotating-messages-container {
        min-width: auto;
        height: 60px;
    }
        
    .modal-backdrop > div {
        width: 90%;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    #permits-area {
        flex-direction: column;
    }
    #permit-sidebar {
        width: 100%;
        margin-top: 1rem;
        flex-shrink: 1;
    }
}

.marquee-container-wrapper {
    width: 100%;
    overflow: hidden; 
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
    background-color: transparent;
    color: #495057; 
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 40s linear infinite;
    will-change: transform;
}

.marquee-item {
    display: flex;
    align-items: center;
    padding: 0 6rem;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: #0056b3;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%); 
    }
}

.marquee-container-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes email-stagger-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(74, 144, 226, 0.4), inset 0 0 4px rgba(74, 144, 226, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.6), inset 0 0 8px rgba(74, 144, 226, 0.5);
    }
}


#email-area {
    --glow-color: rgba(74, 144, 226, 0.7);
}

.email-glass-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

#email-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.email-sidebar-btn {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #94a3b8;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
}

.email-sidebar-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.email-sidebar-btn.active {
    color: white;
    background-color: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

.email-tooltip {
    position: absolute;
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background-color: #1e293b;
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 50;
}

.email-sidebar-btn.group:hover .email-tooltip {
    opacity: 1;
}

#email-list-container {
    scrollbar-width: none;
}
#email-list-container::-webkit-scrollbar {
    display: none;
}

.email-card {
    opacity: 0;
    animation: email-stagger-in 0.5s ease-out forwards;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.email-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--glow-color);
}

.email-card.unread {
    font-weight: 600;
}

.email-card.unread .sender-name,
.email-card.unread .subject {
    font-weight: bold;
    color: white;
}

.email-card .unread-dot {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 10px;
    height: 10px;
    background-color: var(--glow-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-color);
}

.email-card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-bold;
    color: white;
    flex-shrink: 0;
}

.email-card .sender-name {
    color: #e2e8f0;
}

.email-card .subject {
    color: #cbd5e1;
}

.email-card .snippet,
.email-card .timestamp {
    font-size: 0.875rem;
    color: #94a3b8;
}

#email-viewer-panel.is-visible {
    transform: translateX(0);
}

.email-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #94a3b8;
    background: transparent;
    transition: all 0.2s ease;
}
.email-icon-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

#email-viewer-content .subject {
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.2;
}
#email-viewer-content .sender-avatar {
    width: 48px;
    height: 48px;
}
#email-viewer-content .sender-info .name {
    font-weight: 600;
    color: white;
}
#email-viewer-content .sender-info .email,
#email-viewer-content .timestamp {
    color: #94a3b8;
    font-size: 0.875rem;
}
#email-viewer-content .email-body {
    color: #cbd5e1;
    line-height: 1.6;
}
#email-viewer-content .email-body a {
    color: #60a5fa;
    text-decoration: underline;
}

.attachment-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}
.attachment-card:hover {
    background: rgba(255, 255, 255, 0.1);
}
.attachment-card .file-icon {
    font-size: 1.5rem;
    color: #94a3b8;
}

.email-glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.email-glass-input::placeholder {
    color: #94a3b8;
}
.email-glass-input:focus {
    outline: none;
    border-color: var(--glow-color);
    box-shadow: 0 0 10px var(--glow-color);
}

#email-compose-panel {
    min-width: 400px;
    min-height: 300px;
    max-width: 95vw;
    max-height: 90vh;
    transition: all 0.3s ease-in-out;
    transform-origin: bottom right;
}

#email-compose-panel.minimized {
    height: 48px !important;
    width: 280px !important;
    overflow: hidden;
}

#email-compose-panel.maximized {
    width: 95vw !important;
    height: 90vh !important;
    top: 5vh !important;
    left: 2.5vw !important;
    right: auto !important;
    bottom: auto !important;
}

#compose-header {
    touch-action: none;
}

.resizer {
    position: absolute;
    z-index: 10;
}

#folder-context-menu {
    border: 1px solid #e5e7eb;
    padding: 0.25rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

#folder-context-menu button {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-itemsZ: center;
    justify-content: center;
    border-radius: 0.375rem;
    color: #374151;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

#folder-context-menu button:hover {
    background-color: #f3f4f6;
}

.schedule-tab.active-tab {
    color: #22333bff;
    border-color: #22333bff;
}

@keyframes scheduleFadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scheduleFadeOutSlide {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.schedule-view-enter {
    animation-name: scheduleFadeInSlide;
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}
.schedule-view-exit {
    animation-name: scheduleFadeOutSlide;
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

@keyframes pulse-highlight {
    0% { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0); }
}
.pulse-highlight {
    animation: pulse-highlight 1s ease-out;
}

.schedule-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}
.schedule-panel-content.expanded {
    max-height: 500px;
}

.availability-grid-container {
    display: grid;
    grid-template-columns: 120px repeat(24, 1fr);
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.availability-header-row {
    grid-column: 1 / -1;
    display: contents;
}

.availability-header-label {
    grid-column: 1 / 2;
    grid-row: 1;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.availability-hour-cell {
    grid-row: 1;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0.25rem;
}

.availability-day-row {
    grid-column: 1 / -1;
    display: contents;
}

.availability-day-label {
    grid-column: 1 / 2;
    font-weight: 600;
    padding: 0.75rem;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    position: sticky;
    left: 0;
    z-index: 10;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.availability-day-label:hover {
    background-color: #f3f4f6;
}


.availability-day-grid {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-template-rows: 60px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.availability-day-grid .availability-hour-line {
    border-right: 1px dotted #d1d5db;
}
.availability-day-grid .availability-hour-line:last-child {
    border-right: none;
}

.availability-entry {
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.availability-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.availability-entry.preferred {
    background-color: #f5f3ff;
    border: 1px solid #dcd7fe;
    color: #5b21b6;
}
.availability-entry.unavailable {
    background-color: #fee2e2; /* light red */
    border: 1px solid #fca5a5; /* medium red */
    color: #991b1b; /* dark red */
}
/* NEW: Added styles for busy and pto entries */
.availability-entry.busy {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #4b5563;
}
.availability-entry.pto {
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}
.availability-entry.allday {
    font-style: italic;
}

.availability-entry-time {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}
.availability-entry-location {
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0.8;
}

.availability-status-pending {
    background-color: #fef3c7;
    color: #b45309;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.availability-status-approved {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
/* NEW: Added style for declined status */
.availability-status-declined {
    background-color: #fecaca;
    color: #b91c1c;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
/* NEW: Added style for draft status */
.availability-status-draft {
    background-color: #e5e7eb;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.availability-type-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    transition: all 0.2s ease-in-out;
}
.availability-type-btn.active.preferred {
    background-color: #22c55e;
    color: white;
    border-color: #22c55e;
}
.availability-type-btn.active.unavailable {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

.availability-type-btn.active.busy {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}
.availability-type-btn.active.pto {
    background-color: #f97316;
    color: white;
    border-color: #f97316;
}


#availability-all-day-toggle {
    transition: background-color 0.2s ease-in-out;
    background-color: #6b7280;
}
#availability-all-day-toggle.enabled {
    background-color: #22c55e;
}
#availability-all-day-toggle span {
    transition: transform 0.2s ease-in-out;
}
#availability-all-day-toggle.enabled span {
    transform: translateX(20px);
}

#add-availability-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
    overflow: hidden;
}
#add-availability-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#add-availability-user-avatar span {
    font-size: 1rem;
    line-height: 1.5rem;
}

.modal-form-area input[readonly] {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(156, 163, 175, 0.5);
    color: #9ca3af;
    cursor: not-allowed;
}

/* =================================================================== */
/* --- NEW STYLES FOR TEAM AVAILABILITY V2 --- */
/* =================================================================== */

.team-availability-table {
    border-collapse: collapse;
    width: 100%;
}
.team-availability-table th,
.team-availability-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.team-availability-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f9fafb;
}
.team-availability-table tbody tr:last-child td {
    border-bottom: none;
}
.team-availability-table .approve-schedule-btn,
.team-availability-table .decline-schedule-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* NEW: Styles for hover-to-show edit/delete icons on team schedule rows */
.team-availability-table .action-icons {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.team-availability-table tr.group:hover .action-icons {
    opacity: 1;
}
/* End of new styles */

.mini-calendar-container-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
}
.mini-availability-grid-container {
    display: grid;
    grid-template-columns: 40px repeat(8, 1fr); /* 1 label col + 8 3-hour cols */
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    background-color: #ffffff;
}
.mini-availability-header-row {
    grid-column: 1 / -1;
    display: contents;
}
.mini-availability-header-label {
    grid-column: 1 / 2;
    grid-row: 1;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mini-availability-hour-cell {
    grid-row: 1;
    font-size: 0.65rem;
    color: #6b7280;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.25rem 0.1rem;
}
.mini-availability-day-row {
    grid-column: 1 / -1;
    display: contents;
}
.mini-availability-day-label {
    grid-column: 1 / 2;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    position: sticky;
    left: 0;
    z-index: 5;
}
.mini-availability-day-grid {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: 32px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}
.mini-availability-day-grid .mini-availability-hour-line {
    border-right: 1px dotted #d1d5db;
}
.mini-availability-day-grid .mini-availability-hour-line:last-child {
    border-right: none;
}
.mini-availability-entry {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.mini-availability-entry.allday {
    font-style: italic;
    opacity: 0.6;
}
.mini-availability-entry.preferred {
    background-color: #c4b5fd; /* light purple */
    border: 1px solid #a78bfa;
}
.mini-availability-entry.unavailable {
    background-color: #fca5a5; /* light red */
    border: 1px solid #f87171;
}
.mini-availability-entry.busy {
    background-color: #9ca3af; /* gray */
    border: 1px solid #6b7280;
}
.mini-availability-entry.pto {
    background-color: #fdba74; /* light orange */
    border: 1px solid #fb923c;
}

/* =================================================================== */
/* --- NEW STYLES FOR ADMIN EDIT MODAL --- */
/* =================================================================== */

/* Dark theme for the admin's availability grid */
.admin-availability-grid-container {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-availability-grid-container .availability-header-label {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-availability-grid-container .availability-hour-cell {
    color: #9ca3af;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-availability-grid-container .availability-day-label {
    color: #e5e7eb;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
}
.admin-availability-grid-container .availability-day-label:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.admin-availability-grid-container .availability-day-grid {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-availability-grid-container .availability-hour-line {
    border-right: 1px dotted rgba(255, 255, 255, 0.2);
}
.admin-availability-grid-container .availability-hour-line:last-child {
    border-right: none;
}

/* Dark theme for entries */
.admin-availability-grid-container .availability-entry.preferred {
    background-color: #166534;
    border: 1px solid #22c55e;
    color: #dcfce7;
}
.admin-availability-grid-container .availability-entry.unavailable {
    background-color: #991b1b; /* dark red */
    border: 1px solid #dc2626; /* brighter red border */
    color: #fee2e2; /* light red text */
}
.admin-availability-grid-container .availability-entry.busy {
    background-color: #4b5563;
    border: 1px solid #9ca3af;
    color: #f3f4f6;
}
.admin-availability-grid-container .availability-entry.pto {
    background-color: #9a3412;
    border: 1px solid #fdba74;
    color: #fff7ed;
}

/* Checkboxes in request approval modal */
#request-approval-modal input[type="checkbox"] {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}
#request-approval-modal input[type="checkbox"]:checked {
    background-color: #7c3aed;
    border-color: #7c3aed;
}

/* =================================================================== */
/* --- NEW STYLES FOR 24-HOUR MINI-CALENDAR --- */
/* =================================================================== */

/* Override grid to have 24 hour columns + 1 label column */
.mini-availability-grid-container.mini-grid-24-hour {
    grid-template-columns: 40px repeat(24, 1fr);
    min-width: 700px; /* Ensure it's wide enough to be readable */
}

/* Make header cells smaller */
.mini-grid-24-hour .mini-availability-hour-cell {
    font-size: 0.6rem; /* 10px */
    padding: 0.25rem 0;
    line-height: 1;
    /* Allow text to wrap if needed, e.g., "12am" */
    overflow-wrap: break-word;
}

/* Set day grid to 24 columns */
.mini-grid-24-hour .mini-availability-day-grid {
    grid-template-columns: repeat(24, 1fr);
}