:root {
    --primary-color: #dc3545;
    --primary-hover: #c82333;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    padding-top: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom button styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Link styles */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Card styles */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
}

/* Dashboard styles */
.dashboard-card {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .card-title {
    margin-bottom: 1rem;
    font-weight: 600;
}

.dashboard-stat {
    text-align: center;
    padding: 1.5rem;
}

.dashboard-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.dashboard-stat .stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Task list styles */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox {
    margin-right: 1rem;
}

.task-content {
    flex: 1;
}

.task-title {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.task-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.task-actions {
    margin-left: 1rem;
}

/* Progress bar styles */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Notification styles */
.notification-badge {
    position: relative;
    display: inline-block;
}

.notification-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: rgba(220, 53, 69, 0.05);
}

.notification-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Chat styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
}

.chat-input {
    padding: 1rem;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.message {
    margin-bottom: 1rem;
    max-width: 75%;
}

.message-sent {
    margin-left: auto;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 1rem 0 1rem 1rem;
    padding: 0.75rem 1rem;
}

.message-received {
    margin-right: auto;
    background-color: #fff;
    border-radius: 0 1rem 1rem 1rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-time {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    transition: all 0.3s;
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.75rem 1rem;
}

.sidebar .nav-link:hover {
    color: #fff;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Table styles */
.table-hover tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Responsive styles */
@media (max-width: 767.98px) {
    body {
        padding-top: 70px;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        z-index: 1000;
        background-color: #343a40;
        transition: all 0.3s;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
    
    main {
        padding-top: 1.5rem !important;
    }
    
    .dashboard-stat .stat-value {
        font-size: 2rem;
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Animation styles */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Custom checkbox */
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Task completion animation */
.task-complete-animation {
    animation: taskComplete 0.5s ease-in-out;
}

@keyframes taskComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 100px auto;
    background-color: var(--primary-color);
    border-radius: 100%;  
    animation: sk-scaleout 1.0s infinite ease-in-out;
}

@keyframes sk-scaleout {
    0% { 
        transform: scale(0);
    } 100% {
        transform: scale(1.0);
        opacity: 0;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
    padding: 0.75rem;
}

/* Campaign editor styles */
.campaign-editor {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    min-height: 300px;
}

.ck-editor__editable {
    min-height: 300px;
}

/* Client selector styles */
.client-selector {
    max-height: 300px;
    overflow-y: auto;
}

/* Google profile section styles */
.google-profile-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.google-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.google-profile-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.google-profile-title {
    margin: 0;
    font-weight: 600;
}

.google-task-list {
    list-style: none;
    padding: 0;
}

.google-task-item {
    background-color: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-task-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.google-task-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.google-task-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Review link generator styles */
.review-link-generator {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.review-link-result {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #ced4da;
}

/* PWA install prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1030;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-install-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.pwa-install-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}
