body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.sidebar.collapsed {
    width: 64px !important;
    min-width: 64px !important;
    padding: 12px 8px !important;
}
.sidebar.collapsed h2,
.sidebar.collapsed .role-title,
.sidebar.collapsed .login-logo,
.sidebar.collapsed .menu-item-label {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar.collapsed nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0 !important;
    position: relative;
}
.sidebar.collapsed .menu-item-icon {
    margin: 0 !important;
}

/* Ensure collapsed sidebar sits above content for tooltips */
.sidebar.collapsed {
    position: relative;
    z-index: 1000;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed nav ul li a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 8px); /* add gap */
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-size: 12px;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.sidebar.collapsed nav ul li a[data-tooltip]:hover::after {
    opacity: 1;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 180px;
    min-width: 180px;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #dadada;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar nav ul {
    list-style-type: none;
    padding: 0;
}

.sidebar nav ul li {
    /* margin: 15px 0; */
    line-height: 1.1rem;
}

.sidebar nav ul li > a {
    text-decoration: none;
    color: #333333;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar nav ul li > a .menu-item-icon {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0; /* override app.css margin */
}

.sidebar nav ul li > a .menu-item-label {
    flex: 1;
    white-space: normal;
}

.sidebar nav ul li > a .submenu-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    opacity: 0.65;
    vertical-align: middle;
}

.sidebar nav ul li a:hover {
    background-color: #e0e0e0;
}

.content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

h1 {
    color: #333333;
    margin-bottom: 20px;
}

/* Page header and description styles - Override flexbox from app.css */
.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    display: block !important;
    clear: both;
    width: 100%;
    justify-content: unset !important;
    align-items: unset !important;
    flex-direction: unset !important;
}

.page-header h1 {
    display: block !important;
    width: 100%;
    margin: 0 0 0.5rem 0 !important;
}

.page-description {
    color: #666;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: normal;
    display: block !important;
    clear: both;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    /* background-color: rgb(247 249 244); */
}

table th, table td {
    padding: 5px 10px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

table th {
    /* background-color: #f0f0f0; */
    background-color: rgb(233, 246, 208);
}

.btn-delete {
    background-color: #f44336;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.details p {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #dadada;
}

.delete-form {
    margin-top: 20px;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
}

.badge-telegram {
    background-color: #0088cc;
}

.badge-whatsapp {
    background-color: #25D366;
}

.badge-facebook {
    background-color: #3b5998;
}

.qr-code {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        box-shadow: none;
    }
    .content {
        padding: 20px;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    table tr {
        margin-bottom: 15px;
    }
    table th, table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    table th::before, table td::before {
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
    }
    table th::before {
        content: attr(data-label);
        font-weight: bold;
    }
    table td::before {
        content: attr(data-label);
    }
}

.dashboard {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #dadada;
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #5e8721;
    margin: 10px 0;
}

.stat-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
}

.stat-link:hover {
    color: #5e8721;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.activity-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #dadada;
}

.activity-card h3 {
    margin-bottom: 15px;
    margin-top: 0;
    color: #333;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #5e8721;
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
} 

table td .btn {
    padding: 2px 10px;
}

/* Data table styles for client request data */
.data-table {
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    margin-top: 10px;
}

.data-row {
    display: flex;
    border-bottom: 1px solid #dddddd;
}

.data-row:last-child {
    border-bottom: none;
}

.data-key {
    flex: 0 0 200px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333333;
    border-right: 1px solid #dddddd;
    min-width: 200px;
}

.data-value {
    flex: 1;
    padding: 12px 15px;
    color: #555555;
    word-wrap: break-word;
}

/* Responsive design for data table */
@media (max-width: 768px) {
    .data-row {
        flex-direction: column;
    }
    
    .data-key {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #dddddd;
        min-width: auto;
    }
    
    .data-value {
        border-bottom: 1px solid #dddddd;
    }
    
    .data-row:last-child .data-value {
        border-bottom: none;
    }
}

/* Working Hours Table Styles */
.working-hours-table-container {
    margin-top: 10px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    width: 100%;
}

.working-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
}

.working-hours-table th {
    background-color: #f8f9fa;
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    border-bottom: 1px solid #dddddd;
    font-size: 13px;
}

.working-hours-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #dddddd;
    vertical-align: middle;
    font-size: 13px;
}

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

.working-hours-table .working-hours-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    min-width: 0;
}

.working-hours-table .working-hours-input:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.working-hours-closed-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.working-hours-closed-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive design for working hours table */
@media (max-width: 768px) {
    .working-hours-table-container {
        overflow-x: auto;
    }
    
    .working-hours-table {
        min-width: 400px;
    }
    
    .working-hours-table th,
    .working-hours-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
    
    .working-hours-table .working-hours-input {
        font-size: 12px;
        padding: 4px 6px;
    }
}
