@font-face {
    font-family: 'Poppins';
    src: url('font/poppins.regular.ttf') format('truetype');
    font-weight: 400;
}
@font-face {
    font-family: 'Poppins';
    src: url('font/poppins.bold.otf') format('truetype');
    font-weight: 700;
}
@font-face {
    font-family: 'Satoshi';
    src: url('font/Satoshi-Regular.otf') format('opentype');
    font-weight: 400;
}
@font-face {
    font-family: 'Satoshi';
    src: url('font/Satoshi-Bold.otf') format('opentype');
    font-weight: 700;
}
@font-face {
    font-family: 'Satoshi';
    src: url('font/Satoshi-Black.otf') format('opentype');
    font-weight: 900;
}
@font-face {
    font-family: 'Satoshi';
    src: url('font/Satoshi-Medium.otf') format('opentype');
    font-weight: 500;
}

:root {
    --bg-dark-green: #0f2a0f;
    --accent-green: #5a9e2f;
    --btn-green: #4f9d3e;
    --text-white: #ffffff;
    --text-grey: #cfcfcf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark-green);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Satoshi', sans-serif;
    color: white;
}

.container {
    padding: 0 40px; 
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #387023;
    border: none;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar-logo {
    margin-bottom: 50px;
    text-align: center;
}

.sidebar-logo .logo {
    max-width: 80%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-white);
    text-decoration: none;
    font-family: 'Satoshi', sans-serif;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-link.active {
    background: var(--text-white);
    color: #387023;
    border-color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.sidebar-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--bg-dark-green);
    color: white;
    border: 2px solid #c8e6c9;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

#dashboard-section {
    padding: 60px 0 60px 0;
    background: white;
    min-height: 100vh;
    margin-left: 260px;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-title {
    font-size: 48px;
    color: #1a1a1a;
    font-weight: 400;
    margin-bottom: 0;
}

.timezone-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timezone-wrapper label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.timezone-select {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    background-color: #f0f9f0;
    color: #0f2a0f;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.timezone-select:hover {
    border-color: var(--accent-green);
    background-color: #e8f5e9;
}

.dashboard-table {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr 0.8fr;
    background: #a8d5a8;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
    gap: 20px;
}

.header-cell {
    font-size: 14px;
    font-weight: 600;
    color: #2d4a2d;
    font-family: 'Satoshi', sans-serif;
}

.booking-entry {
    background: #d4ecd4;
    border-left: 2px solid #c8e6c9;
    border-right: 2px solid #c8e6c9;
    border-bottom: 2px solid #c8e6c9;
    margin-bottom: 0;
    overflow: hidden;
}

.booking-entry:first-of-type {
    border-top: 2px solid #c8e6c9;
}

.booking-entry:last-of-type {
    border-radius: 0 0 16px 16px;
}

.entry-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr 0.8fr;
    padding: 18px 20px;
    gap: 20px;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.entry-row:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.entry-cell {
    font-size: 14px;
    color: #333;
}

.entry-cell.more-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.more-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-arrow {
    width: 12px;
    height: 12px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

.booking-entry.active .dropdown-arrow {
    transform: rotate(180deg);
}

.details-panel {
    max-height: 0;
    overflow: hidden;
    background: white;
    border-top: 1px solid #c8e6c9;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.details-panel.active {
    max-height: 2000px;
    opacity: 1;
}

.details-content {
    padding: 30px;
    animation: fadeInContent 0.4s ease forwards;
}

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

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.details-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    margin-bottom: 0;
}

.full-width-section {
    margin-bottom: 20px;
}

.detail-title {
    font-size: 13px;
    font-weight: 700;
    color: #4a7c4a;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    font-family: 'Satoshi', sans-serif;
}

.detail-section p {
    font-size: 13px;
    color: #333;
    line-height: 1.8;
    margin: 3px 0;
    font-weight: 400;
}

.detail-section p::first-line {
    font-weight: 600;
}

.inline-space {
    display: inline-block;
    width: 20px;
}

.message-textarea {
    background: #e8e8e8;
    border: 1px solid #999;
    border-radius: 8px;
    padding: 20px;
    min-height: 100px;
    margin-top: 5px;
}

.message-textarea p {
    font-size: 13px;
    color: #333;
    font-weight: 400;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    background-color: white;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(90, 158, 47, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.sort-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.page-info {
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 70px;
    text-align: center;
}

.page-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f2f2f2;
}

.sort-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Satoshi', sans-serif;
}

.sort-btn {
    padding: 10px 16px;
    border-radius: 50px;
    border: 2px solid #c8e6c9;
    background-color: white;
    color: #333;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-btn:hover {
    border-color: var(--accent-green);
    background-color: #f0f9f0;
}

.sort-btn.active {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.sort-btn .btn-label {
    font-weight: 500;
}

.sort-btn .btn-value {
    font-weight: 500;
}

.settings-btn {
    background-color: var(--btn-green);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Satoshi', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

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

.pagination-bottom {
    margin-top: 20px;
    justify-content: center;
    padding-bottom: 40px;
}

.view-section {
    display: none;
    animation: fadeInContent 0.4s ease forwards;
}

.view-section.active {
    display: block;
}

.chat-header {
    grid-template-columns: 1.5fr 3fr 2fr 1fr;
}

.chat-row {
    grid-template-columns: 1.5fr 3fr 2fr 1fr;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
}

.small-btn {
    padding: 8px 16px;
    font-size: 13px;
    margin: 0;
}

.chat-app-container {
    display: flex;
    height: calc(100vh - 350px);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #c8e6c9;
    margin: 0;
}

.chat-app-sidebar {
    width: 350px;
    border-right: 1px solid #c8e6c9;
    display: flex;
    flex-direction: column;
    background: #9dc48335;
}

.chat-app-list {
    flex: 1;
    overflow-y: auto;
}

.chat-app-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-app-item:hover {
    background: #f0f9f0;
}

.chat-app-item.active {
    background: #d4ecd4;
    border-left: 4px solid var(--accent-green);
}

.chat-app-item-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.chat-app-item-info h4 {
    color: #1a1a1a;
    font-size: 15px;
    font-family: 'Satoshi', sans-serif;
}

.chat-app-item-info span {
    font-size: 12px;
    color: #888;
}

.chat-app-item p {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-app-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-app-header {
    padding: 20px 30px;
    border-bottom: 1px solid #c8e6c9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-app-header h3 {
    color: #1a1a1a;
    font-size: 18px;
    font-family: 'Satoshi', sans-serif;
}

.chat-app-header span {
    font-size: 13px;
    color: #888;
}

.chat-app-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f9f9f9;
}

.chat-bubble {
    max-width: 70%;
    padding: 15px;
    border-radius: 12px;
    position: relative;
}

.chat-bubble p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.chat-time {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 8px;
    text-align: right;
}

.user-bubble {
    background: white;
    border: 1px solid #eee;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.admin-bubble {
    background: #d4ecd4;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.admin-bubble p {
    color: #0f2a0f;
}

.admin-bubble .chat-time {
    color: #4a7c4a;
}

.chat-app-readonly-notice {
    padding: 20px;
    border-top: 1px solid #c8e6c9;
    background: white;
    text-align: center;
    color: #888;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    .dashboard-title {
        font-size: 42px;
    }
    .table-header {
        gap: 15px;
        padding: 14px 18px;
    }
    .entry-row {
        gap: 15px;
        padding: 16px 18px;
    }
    .details-grid {
        gap: 30px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    }
    
    #dashboard-section {
        margin-left: 0;
        padding: 80px 0 40px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .chat-app-container {
        flex-direction: column;
    }
    
    .chat-app-sidebar {
        width: 100%;
        height: 30vh;
        border-right: none;
        border-bottom: 1px solid #c8e6c9;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .settings-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        order: 2; 
    }
    
    .timezone-wrapper {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .dashboard-title {
        text-align: center;
        font-size: 32px;
        line-height: 1.2;
    }

    .search-wrapper {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .sort-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .sort-group {
        width: 100%;
        gap: 8px;
    }
    
    .pagination-controls {
        margin-left: 0;
        justify-content: center;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid #c8e6c9;
    }

    .sort-label {
        width: 100%;
        font-size: 13px;
        margin-bottom: 4px;
    }

    .sort-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 12px;
        gap: 4px;
    }

    .sort-btn .btn-label {
        display: none;
    }

    .table-header {
        display: none !important;
    }
    
    .dashboard-table {
        border-radius: 12px;
        background: transparent;
    }
    
    .booking-entry {
        border-radius: 12px !important;
        margin-bottom: 12px;
        border: 2px solid #c8e6c9 !important;
        background: #d4ecd4;
    }
    
    .booking-entry:first-of-type {
        border-top: 2px solid #c8e6c9;
    }
    
    .booking-entry:last-of-type {
        border-radius: 12px;
        margin-bottom: 0;
    }
    
    .entry-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        position: relative;
    }
    
    .entry-cell {
        font-size: 13px;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .entry-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a7c4a;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-family: 'Satoshi', sans-serif;
    }
    
    .entry-cell.more-info {
        position: absolute;
        top: 16px;
        right: 16px;
        width: auto;
    }
    
    .entry-cell.more-info::before {
        display: none;
    }
    
    .more-btn {
        padding: 6px;
        min-width: 40px;
        min-height: 40px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        transition: background 0.2s ease;
    }
    
    .more-btn:active {
        background: rgba(255, 255, 255, 0.8);
    }
    
    .dropdown-arrow {
        width: 14px;
        height: 14px;
    }
    
    .details-content {
        padding: 20px 16px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .details-column {
        gap: 20px;
    }
    
    .detail-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .detail-section p {
        font-size: 12px;
        line-height: 1.6;
    }
    
    .message-textarea {
        padding: 14px;
        min-height: 80px;
    }
    
    .message-textarea p {
        font-size: 12px;
    }
    
    .inline-space {
        width: 12px;
    }

    .chat-row {
        grid-template-columns: 1fr;
    }
    
    .text-truncate {
        white-space: normal;
        overflow: visible;
        padding-right: 0;
    }

    .small-btn {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .dashboard-title {
        font-size: 28px;
    }
    
    .timezone-select {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px;
    }
    
    .booking-entry {
        margin-bottom: 10px;
        border-radius: 10px;
    }
    
    .entry-row {
        padding: 14px 12px;
        padding-right: 50px;
    }
    
    .entry-cell {
        font-size: 12px;
    }
    
    .entry-cell::before {
        font-size: 10px;
    }
    
    .entry-cell.more-info {
        top: 14px;
        right: 12px;
    }
    
    .more-btn {
        min-width: 36px;
        min-height: 36px;
    }
    
    .details-content {
        padding: 16px 12px;
    }
    
    .details-column {
        gap: 16px;
    }
    
    .detail-title {
        font-size: 11px;
    }
    
    .detail-section p {
        font-size: 11px;
    }
    
    .message-textarea {
        padding: 12px;
    }
    
    .message-textarea p {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .dashboard-title {
        font-size: 24px;
    }
    
    .entry-row {
        padding: 12px 10px;
        padding-right: 46px;
    }
    
    .entry-cell {
        font-size: 11px;
    }
    
    .more-btn {
        min-width: 32px;
        min-height: 32px;
    }
    
    .dropdown-arrow {
        width: 12px;
        height: 12px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .entry-row:active {
        background-color: rgba(255, 255, 255, 0.7);
    }
    
    .more-btn:active {
        transform: scale(0.95);
    }
    
    .timezone-select {
        padding: 12px 14px;
    }
}