/* CRM System - Main Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f6f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 2px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--secondary-color);
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 20px;
}

.dashboard-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.dashboard-header h1 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 2.5rem;
}

.welcome-text {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    margin-right: 15px;
    font-size: 2rem;
    color: #007bff;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.widget-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.widget-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.widget-content {
    padding: 20px;
}

.no-data {
    color: #666;
    text-align: center;
    font-style: italic;
    margin: 0;
}

.quick-actions {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quick-actions h3 {
    margin: 0 0 20px 0;
    color: #333;
}

/* Partners carousel */
.partners-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    animation: partners-scroll 26s linear infinite;
}

.partners-carousel:hover .partners-track {
    animation-play-state: paused;
}

.partners-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

.partners-item img {
    max-height: 60px;
    width: auto;
    display: block;
}

@keyframes partners-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .partners-track { gap: 1.5rem; animation-duration: 22s; }
    .partners-item img { max-height: 48px; }
}

@media (max-width: 576px) {
    .partners-track { gap: 1rem; animation-duration: 18s; }
    .partners-item img { max-height: 40px; }
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Center error pages content when using layouts/main with bodyClass */
.min-vh-100.d-flex.align-items-center.justify-content-center .container,
.min-vh-100.d-flex.align-items-center.justify-content-center .error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Footer link hover: change color on mouse over */
footer a {
    color: #f8f9fa; /* ensure footer links are light by default */
    transition: color 0.18s ease, opacity 0.18s ease;
}
footer a:hover, footer a:focus {
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.95;
}