/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    height: 100vh;
    overflow-x: hidden;
}

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

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    height: 100%;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #3e5368;
}

.logo h2 {
    font-size: 1.8em;
    font-weight: 600;
}

nav ul {
    list-style: none;
    margin-top: 20px;
}

nav ul li {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

nav ul li:hover {
    background-color: #3e5368;
}

nav ul li.active {
    background-color: #3498db;
}

nav ul li i {
    margin-right: 10px;
    font-size: 1.2em;
}

/* Main content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Header styles */
header {
    background-color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-bar form {
    display: flex;
    align-items: center;
    background-color: #f5f7fa;
    border-radius: 4px;
    padding: 0 15px;
    height: 40px;
}

.search-bar i {
    margin-right: 10px;
    color: #7f8c8d;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    font-size: 14px;
}

.search-bar button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #2980b9;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info i {
    font-size: 1.2em;
    margin-right: 20px;
    color: #7f8c8d;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content area styles */
.content {
    padding: 30px;
    flex: 1;
}

.content h1 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #2c3e50;
}

/* CRM Logo in title */
h1.with-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crm-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #2196f3;
    color: white;
    border-radius: 50%;
}

.crm-logo i {
    font-size: 0.8em;
}

.customer-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.customer-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.customer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.avatar.large {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.customer-header h2 {
    margin: 10px 0 5px;
    color: #2c3e50;
}

.customer-header p {
    color: #7f8c8d;
    font-size: 14px;
}

.customer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
}

.info-item i {
    margin-right: 10px;
    color: #3498db;
    font-size: 1.2em;
    width: 20px;
    text-align: center;
}

.activity-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.activity-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.activity-timeline {
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: #e0e0e0;
}

.timeline-item {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    margin-right: 15px;
}

.timeline-content {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
}

.timeline-date {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 5px;
}

/* Minified view styles */
.minified-view .dashboard {
    display: block;
    height: auto;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.minified-view .main-content {
    width: 100%;
}

.minified-view .content {
    padding: 12px;
}

.minified-view .content h1 {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #34495e;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.minified-view .customer-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.minified-view .customer-card {
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.minified-view .customer-header {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    min-width: 100px;
}

.minified-view .avatar.large {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.minified-view .customer-header h2 {
    font-size: 1em;
    margin: 2px 0;
    text-align: center;
    word-break: break-word;
}

.minified-view .customer-header p {
    font-size: 0.8em;
    text-align: center;
}

.minified-view .customer-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.minified-view .info-item {
    font-size: 0.85em;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.minified-view .info-item i {
    margin-right: 6px;
    color: #3498db;
    font-size: 0.9em;
    width: 14px;
    text-align: center;
}

.minified-view .activity-section {
    margin-top: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 15px;
}

.minified-view .activity-section h3 {
    font-size: 1em;
    color: #34495e;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.minified-view .activity-section h3::before {
    content: "\f017";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #3498db;
    font-size: 0.9em;
}

.minified-view .activity-timeline {
    padding-left: 6px;
    position: relative;
}

.minified-view .activity-timeline::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #e9ecef;
}

.minified-view .timeline-item {
    padding: 8px 0 8px 20px;
    position: relative;
    border-bottom: 1px dashed #e9ecef;
    margin-bottom: 6px;
}

.minified-view .timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.minified-view .timeline-item::before {
    content: none;
}

.minified-view .timeline-icon {
    position: absolute;
    left: -14px;
    top: 8px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3498db;
    z-index: 2;
}

.minified-view .timeline-icon i {
    font-size: 0.7em;
    color: #3498db;
}

.minified-view .timeline-content {
    font-size: 0.85em;
    line-height: 1.3;
}

.minified-view .timeline-date {
    font-size: 0.75em;
    color: #7f8c8d;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}

.minified-view .timeline-date::before {
    content: "\f133";
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    margin-right: 4px;
    font-size: 0.9em;
    color: #95a5a6;
}

.minified-view .interaction-id {
    font-size: 0.75em;
    color: #6c757d;
    margin-top: 4px;
    background-color: #f8f9fa;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 2px solid #3498db;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.minified-view .interaction-id i {
    margin-right: 3px;
    font-size: 0.9em;
    color: #3498db;
}

.minified-view .activity-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8em;
}

.minified-view .activity-footer a {
    color: #3498db;
    text-decoration: none;
}

.minified-view .activity-footer a:hover {
    text-decoration: underline;
}

/* Activity types styling */
.minified-view .timeline-item.call-activity .timeline-icon {
    border-color: #27ae60;
}

.minified-view .timeline-item.call-activity .timeline-icon i {
    color: #27ae60;
}

.minified-view .timeline-item.email-activity .timeline-icon {
    border-color: #e74c3c;
}

.minified-view .timeline-item.email-activity .timeline-icon i {
    color: #e74c3c;
}

.minified-view .timeline-item.deal-activity .timeline-icon {
    border-color: #f39c12;
}

.minified-view .timeline-item.deal-activity .timeline-icon i {
    color: #f39c12;
}

/* Agent specific elements for minified view */
.minified-view .quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.minified-view .action-button {
    background-color: #e9ecef;
    border: none;
    color: #495057;
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.minified-view .action-button i {
    margin-right: 4px;
    font-size: 0.9em;
}

.minified-view .action-button:hover {
    background-color: #dee2e6;
}

.minified-view .action-button.primary {
    background-color: #e3f2fd;
    color: #0d6efd;
}

.minified-view .action-button.primary:hover {
    background-color: #d0e7fb;
}

.minified-view .customer-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.minified-view .stat-item {
    background-color: #ffffff;
    border-radius: 4px;
    padding: 6px 10px;
    flex: 1;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.minified-view .stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #34495e;
}

.minified-view .stat-label {
    font-size: 0.7em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .customer-panel {
        grid-template-columns: 1fr;
    }
}

.interaction-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interaction-banner p {
    margin: 0;
}

.interaction-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-id-btn {
    background-color: transparent;
    border: none;
    color: #2196f3;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.copy-id-btn:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

.copy-id-btn i {
    font-size: 0.9em;
}

.short-id {
    font-family: monospace;
}

.full-id {
    display: none;
}
