/* GT Systems Dashboard - Global Styles */
:root {
    --primary: #96a63f;
    --primary-dark: #7a8a2f;
    --primary-light: #b8c46a;
    --dark: #121212;
    --dark-secondary: #1e1e1e;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --box-shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, var(--dark-secondary), var(--dark));
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 110px;
    height: auto;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--dark);
}

.form-group input {
    padding: 14px 16px;
    border: 1.5px solid var(--light-gray);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    background: var(--light);
    color: var(--dark);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(150, 166, 63, 0.15);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(150, 166, 63, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(150, 166, 63, 0.4);
}

.btn-block {
    width: 100%;
}

.error-message {
    background: #fdf2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    border-left: 4px solid var(--danger);
}

/* Dashboard Page Styles */
.dashboard-page {
    background: var(--light);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 220px;
    height: auto;
    margin: 20px auto;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(255,255,255,0.3));
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-light);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.nav-item.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(150, 166, 63, 0.3);
}

.nav-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px 28px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.topbar h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-weight: 500;
    font-size: 14px;
    background: var(--light);
    padding: 8px 16px;
    border-radius: 50px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 24px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(150, 166, 63, 0.1);
    color: var(--primary);
    border-radius: 16px;
}

.stat-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

/* Recent Jobs Table */
.recent-jobs {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.recent-jobs h2 {
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.table-container {
    overflow-x: auto;
}

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

thead {
    background: var(--light);
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    font-weight: 600;
    color: var(--gray);
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

td {
    font-size: 14px;
    color: var(--dark-secondary);
}

tr {
    transition: var(--transition);
}

tr:hover {
    background: rgba(150, 166, 63, 0.03);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        bottom: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional Dashboard Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1.5px solid var(--light-gray);
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--light);
    border-color: var(--gray);
}

.btn-view {
    background: rgba(150, 166, 63, 0.1);
    color: var(--primary-dark);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
}

.btn-view:hover {
    background: var(--primary);
    color: var(--white);
}

/* Settings Page Styles */
.settings-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 36px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.section-description {
    color: var(--gray);
    font-size: 14px;
    margin-top: 6px;
}

.pricing-card {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--light-gray);
}

.pricing-card h3 {
    margin-bottom: 16px;
    color: var(--dark);
    font-size: 16px;
    font-weight: 700;
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.pricing-info label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.pricing-info small {
    color: var(--gray);
    font-size: 12px;
}

.pricing-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-input input {
    width: 110px;
    padding: 10px 12px;
    border: 1.5px solid var(--light-gray);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    transition: var(--transition);
}

.pricing-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(150, 166, 63, 0.15);
}

.pricing-input .unit {
    color: var(--gray);
    font-weight: 600;
    font-size: 14px;
}

.save-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.save-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success);
}

.save-message.error {
    background: #fdf2f2;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--gray);
    font-weight: 500;
}

/* Filter Section */
.filter-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    color: var(--gray);
}

.filter-group input {
    padding: 8px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

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

.modal-card {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.job-modal {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    background: var(--dark);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.job-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-item p {
    margin: 0;
    font-size: 15px;
    color: var(--dark);
    font-weight: 500;
}

.detail-full {
    margin-top: 15px;
}

.detail-full label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.description-text {
    background: var(--light);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
    white-space: pre-line;
    color: var(--dark);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--light-gray);
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .job-details-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group input {
        min-width: 100%;
    }
}

/* Analytics Page */
.period-selector {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.period-selector label {
    font-weight: 500;
    color: var(--dark);
}

.period-selector select {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 14px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.chart-card h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--dark);
}

.chart-card canvas {
    height: 250px !important;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card.full-width canvas {
    height: 300px !important;
}

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

/* Calendar Styles */
.calendar-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 20px;
    margin: 0;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--light);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    padding: 8px;
    background: var(--dark);
    color: #ffffff;
    border-radius: 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    min-height: 90px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.calendar-day.empty {
    background: #f9f9f9;
    cursor: default;
    border: none;
}

.calendar-day.today {
    border-color: var(--primary);
    background: #f0f4e0;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: #ffffff;
}

.day-number {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.job-chip {
    font-size: 10px;
    padding: 3px 5px;
    border-radius: 3px;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more-jobs {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

.day-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.day-job-card {
    background: var(--light);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
}

.day-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cost-badge {
    background: var(--primary);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.day-job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
    }
    
    .job-chip {
        font-size: 8px;
    }
}

/* Technician Management Styles */
.technician-actions {
    margin-bottom: 20px;
}

.technicians-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.technician-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.technician-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.technician-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
}

.technician-info {
    text-align: center;
}

.technician-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--dark);
}

.tech-contact {
    font-size: 12px;
    color: var(--gray);
    margin: 2px 0;
}

.tech-specialty {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 5px;
}

.technician-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: var(--light);
    border-radius: 6px;
    padding: 10px;
}

.tech-stat {
    text-align: center;
}

.tech-stat label {
    display: block;
    font-size: 10px;
    color: var(--gray);
    text-transform: uppercase;
}

.tech-stat span {
    font-size: 14px;
    font-weight: bold;
    color: var(--dark);
}

.technician-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #c82333;
}

.technician-modal {
    max-width: 400px;
}

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

/* Map Styles */
.map-controls {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.quick-date-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.map-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.map-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.map-stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.map-stat-card label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.map-stat-card span {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark);
}

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

/* Improved Client Cards */
.clients-section {
    margin-top: 20px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.client-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.client-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.client-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7a8a2f);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.client-title h3 {
    margin: 0;
    font-size: 16px;
    color: var(--dark);
}

.contact-name {
    font-size: 12px;
    color: var(--gray);
}

.client-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 15px 0;
}

.client-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.info-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.client-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.client-stat {
    text-align: center;
    background: var(--light);
    border-radius: 8px;
    padding: 10px;
}

.client-stat label {
    display: block;
    font-size: 10px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.client-stat span {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark);
}

.client-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.client-detail-info {
    background: var(--light);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.client-detail-info p {
    margin: 5px 0;
    font-size: 14px;
}

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

.client-job-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--light-gray);
    font-size: 13px;
}

.client-job-item:hover {
    background: var(--light);
}

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

/* Email Logs Styles */
.email-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-customer {
    background: #e8f0d0;
    color: #5a6b1f;
}

.badge-boss {
    background: #d0e0f0;
    color: #1f4b6b;
}

.badge-support {
    background: #f0d0e0;
    color: #6b1f4b;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

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

/* Professional Icon Styles */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--light);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
}

/* Modern Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 40%, #3a3a1a 70%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(150, 166, 63, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(150, 166, 63, 0.05) 0%, transparent 50%);
    animation: slowPulse 8s ease-in-out infinite;
}

@keyframes slowPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card-modern {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.login-logo-area {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo-modern {
    width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
    margin: 0 auto;
}

.login-title {
    font-size: 24px;
    color: #ffffff;
    text-align: center;
    margin: 0 0 8px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: #8b949e;
    text-align: center;
    margin: 0 0 30px 0;
}

.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    font-size: 12px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #8b949e;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: #484f58;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #96a63f;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(150, 166, 63, 0.15);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #8b949e;
}

.checkbox-modern input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #96a63f;
    cursor: pointer;
}

.btn-login-modern {
    width: 100%;
    padding: 14px;
    background: #96a63f;
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-login-modern:hover {
    background: #a9bc44;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(150, 166, 63, 0.4);
}

.btn-login-modern:active {
    transform: translateY(0);
}

.btn-login-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message-modern {
    margin-top: 15px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #f85149;
    font-size: 13px;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
}

.login-footer p {
    font-size: 11px;
    color: #484f58;
    margin: 0;
}

@media (max-width: 480px) {
    .login-card-modern {
        padding: 25px;
    }
    
    .login-logo-modern {
        width: 140px;
    }
}

/* Improved Remember Me Checkbox */
.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #8b949e;
    user-select: none;
}

.checkbox-modern input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #96a63f;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-modern:hover {
    color: #ffffff;
}

.checkbox-modern span {
    transition: color 0.2s ease;
}

.checkbox-modern:hover span {
    color: #ffffff;
}

/* Live Tracking Styles */
.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
    animation: blink 1s infinite;
    display: inline-block;
    margin-right: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-tracking-container {
    position: relative;
}

.live-status {
    margin-top: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.live-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #27ae60;
    animation: blink 1.5s infinite;
}

.technician-marker {
    animation: pulse 2s infinite;
}

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

/* Edit Button */
.btn-edit {
    background: #3498db;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    transition: var(--transition);
}

.btn-edit:hover {
    background: #2980b9;
}

/* Edit Modal */
.edit-job-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.edit-field {
    margin-bottom: 15px;
}

.edit-field label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.edit-field input,
.edit-field textarea,
.edit-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.edit-field input:focus,
.edit-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(150, 166, 63, 0.15);
}

/* Manual Entry Modal */
.manual-entry-modal {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Professional KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.kpi-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 3px solid #96a63f;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.kpi-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.kpi-trend {
    font-size: 12px;
    margin-top: 5px;
}

/* Drag & Drop Handle */
.drag-handle {
    display: inline-block;
    cursor: grab;
    color: #999;
    margin-right: 8px;
    font-size: 16px;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

#jobsTableBody tr[draggable="true"] {
    transition: opacity 0.2s;
}

#jobsTableBody tr[draggable="true"]:hover {
    background: #f9faf7;
}

#jobsTableBody tr.dragging {
    opacity: 0.4;
}
