/* SMM CRM Frontend Styles */

.smm-crm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Client Dashboard */
.smm-client-dashboard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.smm-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.smm-dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 300;
}

.smm-dashboard-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.smm-dashboard-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0;
}

.smm-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.smm-dashboard-nav li {
    margin: 0;
}

.smm-dashboard-nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #495057;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.smm-dashboard-nav a:hover,
.smm-dashboard-nav a.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.smm-dashboard-content {
    padding: 30px;
}

/* Stats Overview */
.smm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.smm-stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.smm-stat-number {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.smm-stat-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-stat-card.projects .smm-stat-number { color: #3498db; }
.smm-stat-card.invoices .smm-stat-number { color: #e74c3c; }
.smm-stat-card.payments .smm-stat-number { color: #27ae60; }
.smm-stat-card.contracts .smm-stat-number { color: #9b59b6; }

/* Tables */
.smm-table-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.smm-table-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.smm-table-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.smm-table {
    width: 100%;
    border-collapse: collapse;
}

.smm-table th,
.smm-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
}

.smm-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-table tbody tr {
    transition: background-color 0.2s ease;
}

.smm-table tbody tr:hover {
    background: #f8f9fa;
}

.smm-table td {
    color: #495057;
}

/* Status badges */
.smm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-badge.active { background: #d4edda; color: #155724; }
.smm-badge.pending { background: #fff3cd; color: #856404; }
.smm-badge.completed { background: #d1ecf1; color: #0c5460; }
.smm-badge.overdue { background: #f8d7da; color: #721c24; }
.smm-badge.paid { background: #d4edda; color: #155724; }
.smm-badge.draft { background: #e2e3e5; color: #6c757d; }

/* Buttons */
.smm-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.smm-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.smm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.smm-btn-secondary {
    background: #6c757d;
    color: white;
}

.smm-btn-secondary:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

.smm-btn-success {
    background: #28a745;
    color: white;
}

.smm-btn-success:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.smm-btn-danger {
    background: #dc3545;
    color: white;
}

.smm-btn-danger:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.smm-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.smm-btn-outline:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* Cards */
.smm-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.smm-card-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.smm-card-title {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.smm-card-body {
    padding: 20px;
}

.smm-card-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
}

/* Project timeline */
.smm-timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.smm-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.smm-timeline-item {
    position: relative;
    margin-bottom: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

.smm-timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #e9ecef;
}

.smm-timeline-item.completed::before {
    background: #28a745;
}

.smm-timeline-item.pending::before {
    background: #ffc107;
}

.smm-timeline-item.overdue::before {
    background: #dc3545;
}

.smm-timeline-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-timeline-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.smm-timeline-description {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Progress bars */
.smm-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.smm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.smm-progress-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Invoice/Quotation view */
.smm-document {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.smm-document-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.smm-document-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 300;
}

.smm-document-header .document-number {
    font-size: 18px;
    opacity: 0.9;
}

.smm-document-body {
    padding: 40px;
}

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

.smm-company-info h3,
.smm-client-info h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-company-info p,
.smm-client-info p {
    margin: 0 0 5px 0;
    color: #6c757d;
    line-height: 1.6;
}

.smm-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.smm-items-table th,
.smm-items-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.smm-items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.smm-items-table .text-right {
    text-align: right;
}

.smm-totals {
    margin-left: auto;
    width: 300px;
}

.smm-totals table {
    width: 100%;
    border-collapse: collapse;
}

.smm-totals td {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.smm-totals .total-row {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
}

.smm-totals .total-row td {
    border-bottom: 2px solid #2c3e50;
    padding-top: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .smm-crm-container {
        padding: 10px;
    }
    
    .smm-dashboard-nav ul {
        flex-direction: column;
    }
    
    .smm-dashboard-content {
        padding: 20px;
    }
    
    .smm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .smm-document-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .smm-document-body {
        padding: 20px;
    }
    
    .smm-document-header {
        padding: 20px;
    }
    
    .smm-table-container {
        overflow-x: auto;
    }
    
    .smm-timeline {
        padding-left: 30px;
    }
    
    .smm-timeline-item::before {
        left: -22px;
    }
}

/* Loading states */
.smm-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.smm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: smm-spin 1s linear infinite;
}

@keyframes smm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty states */
.smm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.smm-empty-state img {
    max-width: 200px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.smm-empty-state h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

.smm-empty-state p {
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Notifications */
.smm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    max-width: 400px;
    z-index: 1000;
    border-left: 4px solid #28a745;
}

.smm-notification.error {
    border-left-color: #dc3545;
}

.smm-notification.warning {
    border-left-color: #ffc107;
}

.smm-notification.info {
    border-left-color: #17a2b8;
}

/* Print styles */
@media print {
    .smm-dashboard-nav,
    .smm-btn,
    .smm-card-footer {
        display: none !important;
    }
    
    .smm-document {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .smm-document-header {
        background: #000 !important;
        color: #fff !important;
    }
}