body {
    background-color: #f3f4f6;
    font-family: 'Rajdhani', sans-serif;
}

.logo-link:hover {
    opacity: 0.8;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container .form-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem 0 0 0.5rem;
}

.search-container .btn-search {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
}

.search-container .btn-search:hover {
    background-color: #1d4ed8;
}

.search-container .btn-search i {
    font-size: 0.875rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    padding-right: 2.5rem;
    padding-left: 48px !important;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

.search-btn {
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
    border-left: none;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-btn i {
    font-size: 1rem;
}

.search-button-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    justify-content: center;
}

.search-button-group .btn-primary {
    height: 2.5rem;
    min-width: 3.75rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.search-button {
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: #1d4ed8;
}

.search-button i {
    font-size: 1rem;
}

.btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0 2px;
    color: white;
    transition: all 0.2s;
}

.btn-table i {
    pointer-events: none;
    font-size: 14px;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary i {
    font-size: 0.75rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #111827;
    border-bottom-color: #d1d5db;
}

.nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.logout-btn {
    color: #dc2626;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    color: #991b1b;
    background-color: #fef2f2;
}

.main-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #4b5563;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 0 1.5rem 0rem 1.5rem;
}

.metric-content {
    display: flex;
    align-items: center;
}

.metric-icon {
    flex-shrink: 0;
}

.metric-icon-bg {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon-bg.red {
    background-color: #ef4444;
}

.metric-icon-bg.orange {
    background-color: #f97316;
}

.metric-icon-bg.blue {
    background-color: #3b82f6;
}

.metric-icon-bg.green {
    background-color: #10b981;
}

.metric-icon-bg i {
    color: white;
    font-size: 0.875rem;
}

.metric-text {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.content-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.content-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.content-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.content-card-body {
    padding: 1.5rem;
}

.filter-container {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.filter-btn.active {
    background-color: #dbeafe;
    color: #1e40af;
}

.filter-btn:not(.active) {
    background-color: #f3f4f6;
    color: #1f2937;
}

.filter-btn:hover:not(.active) {
    background-color: #e5e7eb;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    font-size: 0.875rem;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.table-header {
    background-color: #f9fafb;
}

.table-header th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.table-body {
    background-color: white;
}

.table-row {
    border-bottom: 1px solid #e5e7eb;
}

.table-row:hover {
    background-color: #f9fafb;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-badge.low {
    background-color: #f0fdf4;
    color: #16a34a;
}
.priority-badge.normal {
    background-color: #f0f9ff;
    color: #0284c7;
}
.priority-badge.medium {
    background-color: #fef3c7;
    color: #b45309;
}
.priority-badge.high {
    background-color: #fef2f2;
    color: #dc2626;
}
.priority-badge.urgent {
    background-color: #fff7ed;
    color: #ea580c;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.open {
    background-color: #fef3c7;
    color: #d97706;
}

.status-badge.waiting_customer {
    background-color: #f3e8ff;
    color: #9333ea;
}

.status-badge.resolved {
    background-color: #d1fae5;
    color: #059669;
}

.status-badge.closed {
    background-color: #e5e7eb;
    color: #4b5563;
}

.status-badge.scheduled {
    background-color: #dbeafe;
    color: #2563eb;
}

.status-badge.in_progress {
    background-color: #e0e7ff;
    color: #4338ca;
}

.status-badge.completed {
    background-color: #d1fae5;
    color: #059669;
}

.status-badge.cancelled {
    background-color: #e5e7eb;
    color: #4b5563;
}

.status-badge.overdue {
    background-color: #fef2f2;
    color: #dc2626;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.action-btn.primary {
    background-color: #3b82f6;
    color: white;
}

.action-btn.primary:hover {
    background-color: #2563eb;
}

.action-btn.secondary {
    background-color: #6b7280;
    color: white;
}

.action-btn.secondary:hover {
    background-color: #4b5563;
}

.action-btn.success {
    background-color: #10b981;
    color: white;
}

.action-btn.success:hover {
    background-color: #059669;
}

.btn-wide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}


.btn-wide.orange {
    background-color: #ea580c;
    color: white;
}

.btn-wide.orange:hover {
    background-color: #c2410c;
}

.btn-wide.blue {
    background-color: #2563eb;
    color: white;
}

.btn-wide.blue:hover {
    background-color: #1d4ed8;
}

.btn-wide.red {
    background-color: #dc2626;
    color: white;
}

.btn-wide.red:hover {
    background-color: #b91c1c;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-label i {
    color: #6b7280;
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

.form-select {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: #1f2937;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    border-color: #3b82f6;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 0;
}

.quick-actions .btn-wide {
    justify-content: center;
    width: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.schedule-item {
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.schedule-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.schedule-customer {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.schedule-service {
    font-size: 0.875rem;
    color: #6b7280;
}

.control-btn {
    color: #4b5563;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: color 0.2s;
}

.control-btn:hover {
    color: #1f2937;
    background-color: #f3f4f6;
}

.control-btn i {
    margin-right: 0.25rem;
}

.metric-icon-bg.yellow {
    background-color: #eab308;
}

.page-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-green {
    background-color: #16a34a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-green:hover {
    background-color: #15803d;
}

.btn-orange {
    background-color: #ea580c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-orange:hover {
    background-color: #c2410c;
}

.btn-red {
    background-color: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-red:hover {
    background-color: #b91c1c;
}

.btn-yellow {
    background-color: #d97706;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-yellow:hover {
    background-color: #b45309;
}

.btn-blue {
    background-color: #200bd8;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-blue:hover {
    background-color: #15088a;
}

.btn-gray {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-gray:hover {
    background-color: #d1d5db;
}

.search-filter-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-filter-section .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;

}

search-filter-section .search-group {
    display: flex;
    gap: 0.5rem;
}

.search-filter-section .search-input {
    box-sizing: border-box;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem 0 0 0.5rem;
    border: 1px solid #d1d5db;
    flex: 1;
}

.search-filter-section .search-btn {
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.search-filter-section .search-btn:hover {
    background-color: #1d4ed8;
}

.search-filter-section .btn-gray {
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    top: -0.35rem;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-grid .form-group {
    flex: 1;
    min-width: 200px;
}

@media (min-width: 768px) {
    .customer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .customer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.customer-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
    transition: all 0.2s;
    cursor: pointer;
}

.customer-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.customer-card.has-issues {
    border-left-color: #ef4444;
}

.customer-card.overdue {
    border-left-color: #f97316;
}

.customer-card.inactive {
    border-left-color: #6b7280;
    opacity: 0.7;
}

.back-btn {
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #1d4ed8;
}

.customer-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.customer-detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    color: #111827;
    font-size: 1rem;
    text-align: right;
    font-weight: 600;
    line-height: 1.4;
}

.case-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #fafafa;
}

.case-item.open {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.case-item.closed {
    border-left: 4px solid #10b981;
    background-color: #f0fdf4;
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.case-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 1.5rem;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    margin-left: 0;
}

.timeline-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.hidden {
    display: none !important;
}

.card-header-with-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .navbar-container {
        padding: 0 1.5rem;
    }

    .main-container {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .navbar-container {
        padding: 0 2rem;
    }

    .main-container {
        padding: 2rem 2rem;
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.modal-container {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 600px;
    animation: slideIn 0.2s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 0px 0 0;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 12px 12px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.modal-center {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 10000;
}

.modal-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(1);
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 10001;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content {
    position: relative;
    z-index: 1002;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    line-height: 1;
}

.icon-button:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.stack { margin-bottom: 24px; }
.row { display: flex; gap: 8px; }
.row > .grow { flex: 1 1 auto; }

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-input {
    width: 100%;
    background-color: #fff;
    color: #1f2937;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #fff;
    font-size: 0.875rem;
    color: #1f2937;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    min-height: 80px;
}

.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-buttons-vertical .btn-table {
    border-radius: 0;
    width: 2.75rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    justify-content: center;
}

.action-buttons-vertical .btn-table:last-child {
    border-bottom: none;
}

.btn-content-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-filter-section .form-select,
.search-filter-section .btn-gray {
    height: 2.5rem;
    box-sizing: border-box;
}

.contact-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.contact-card {
    flex: 1 1 300px;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.customer-card-item {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.customer-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.07);
}

.card-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-badge-container {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.card-item-subtitle {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0.25rem 0 0 0;
}

.card-item-body {
    padding: 1rem 1.25rem;
    flex-grow: 1;
}

.card-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.card-item-info i {
    color: #9ca3af;
    width: 1rem;
    text-align: center;
}

.card-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    font-size: 0.875rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

.card-item-details-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.card-item-details-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 0.75rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f3f4f6;
}

.search-result-item strong {
    font-weight: 600;
    color: #111827;
    display: block;
}

.search-result-item small {
    font-size: 0.8rem;
    color: #6b7280;
}

.dashboard-list-box {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#new-call-form .stack {
    padding-left: 1rem;
    padding-right: 1rem;
}

#new-call-modal .modal-content {
    background-color: #f9fafb;
}

.case-item-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.case-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 1rem;
}

.case-item-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.case-item-title-group h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.case-item-title-group i {
    color: #6b7280;
}

.case-item-body {
    padding: 0 1rem;
}

.case-item-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    font-size: 0.8rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.case-item-details-grid .detail-label {
    color: #6b7280;
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.case-item-notes {
    font-size: 0.875rem;
    padding: 0.75rem 0;
}
.case-item-notes p {
    margin: 0.25rem 0 0 0;
    color: #374151;
}

.case-item-footer {
    padding: 0.75rem 1rem;
    text-align: right;
}

.case-item-footer .details-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.case-item-footer .details-link:hover {
    text-decoration: underline;
}

.action-item, .activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.action-item:last-child, .activity-item:last-child {
    border-bottom: none;
}

.action-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.action-item-dot.urgent { background-color: #ea580c; }
.action-item-dot.high { background-color: #dc2626; }

.action-item-content {
    flex-grow: 1;
}

.action-item-customer {
    display: block;
    font-weight: 600;
}

.action-item-title {
    color: #6b7280;
    font-size: 0.875rem;
}

.action-item-handle {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    flex-shrink: 0;
}

.action-item-handle:hover { text-decoration: underline; }

.activity-item-icon {
    color: #9ca3af;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.activity-item-content {
    flex-grow: 1;
}

.activity-item-customer {
    display: block;
    font-weight: 600;
}

.activity-item-details {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
}

.activity-item-time {
    color: #9ca3af;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.is-today {
    background-color: #eff6ff !important;
    font-weight: 700;
}

.data-table .btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0 2px;
    border: none;
    cursor: pointer;
}

.data-table .btn-table:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.data-table .btn-table.btn-blue {
    background-color: #3b82f6;
}

.data-table .btn-table.btn-yellow {
    background-color: #eab308;
}

.data-table .btn-table.btn-red {
    background-color: #ef4444;
}

.data-table .btn-table i {
    color: white;
    font-size: 16px;
}

.data-table td:last-child {
    text-align: left;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.header-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.case-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
    font-size: 1.125rem;
}

.customer-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.status-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.status-value, .priority-value, .assigned-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.status-value.open { color: #f59e0b; }
.status-value.in_progress { color: #3b82f6; }
.status-value.waiting_customer { color: #8b5cf6; }
.status-value.resolved { color: #10b981; }
.status-value.closed { color: #6b7280; }

.priority-value.low { color: #10b981; }
.priority-value.medium { color: #f59e0b; }
.priority-value.high { color: #ef4444; }
.priority-value.urgent { color: #dc2626; }

.status-icon, .priority-icon {
    font-size: 1rem;
}

.case-description-card .description-content {
    line-height: 1.6;
    color: #374151;
    font-size: 1rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px;
}

.timeline-marker.created {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}
.timeline-marker.updated {
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}
.timeline-marker.closed {
    background: #6b7280;
    box-shadow: 0 0 0 2px #6b7280;
}

.timeline-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.info-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    color: white;
    font-size: 1rem;
}

.info-content {
    flex: 1;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.empty-state p {
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .case-header {
        flex-direction: column;
        gap: 1rem;
    }

    .case-title {
        font-size: 1.5rem;
    }

    .customer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media print {
    .back-btn, .header-actions, .actions-card {
        display: none !important;
    }
}

.modal-case-detail {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
}

.modal-case-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-case-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.modal-case-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: white;
    line-height: 1.3;
}

.modal-customer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.modal-customer-name {
    font-weight: 500;
    color: white;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.modal-customer-name:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.modal-customer-phone {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.modal-status-item {
    text-align: center;
}

.modal-status-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-status-value,
.modal-priority-value,
.modal-assigned-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.modal-status-value.open { color: #f59e0b; }
.modal-status-value.in_progress { color: #3b82f6; }
.modal-status-value.waiting_customer { color: #8b5cf6; }
.modal-status-value.resolved { color: #10b981; }
.modal-status-value.closed { color: #6b7280; }

.modal-priority-value.low { color: #10b981; }
.modal-priority-value.medium { color: #f59e0b; }
.modal-priority-value.high { color: #ef4444; }
.modal-priority-value.urgent { color: #dc2626; }

.modal-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.modal-section:last-child {
    border-bottom: none;
}

.modal-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-section-header i {
    color: #6b7280;
    font-size: 1rem;
    width: 16px;
}

.modal-section-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-section-content {
    color: #374151;
    line-height: 1.5;
    font-size: 0.875rem;
}

.modal-empty-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-style: italic;
}

.modal-empty-state i {
    font-size: 0.875rem;
}

.modal-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.modal-timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.modal-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.modal-timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px;
}

.modal-timeline-marker.created {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}
.modal-timeline-marker.updated {
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}
.modal-timeline-marker.closed {
    background: #6b7280;
    box-shadow: 0 0 0 2px #6b7280;
}

.modal-timeline-content {
    margin-left: 0;
}

.modal-timeline-title {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.modal-timeline-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.modal-info-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

@media (max-width: 640px) {
    .modal-status-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }

    .modal-case-header {
        padding: 1rem;
    }

    .modal-section {
        padding: 1rem 1.25rem;
    }
}

.modal-case-detail::-webkit-scrollbar {
    width: 6px;
}

.modal-case-detail::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-case-detail::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-case-detail::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.modal-form-container {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
}

.modal-case-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1.5rem;
    color: white;
    border-radius: 8px 0px 0 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
}

.modal-form-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-form-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    flex: 1;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
}

.modal-form-column {
    padding: 1.5rem;
}

.modal-form-column:first-child {
    border-right: 1px solid #e5e7eb;
}

.form-field-group {
    margin-bottom: 1.25rem;
}

.form-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-field-label i {
    color: #6b7280;
    font-size: 0.875rem;
    width: 16px;
}

.modal-case-form select,
.modal-case-form input,
.modal-case-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s ease;
}

.modal-case-form select:focus,
.modal-case-form input:focus,
.modal-case-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-case-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.modal-case-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.modal-case-form textarea[name="description"] {
    min-height: 150px;
}

.modal-case-form textarea[name="resolution_notes"] {
    min-height: 100px;
}

.form-field-errors {
    color: #dc2626;
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: #fef2f2;
    border-radius: 4px;
    border-left: 3px solid #dc2626;
    font-size: 0.8rem;
}

.form-field-errors ul {
    margin: 0;
    padding-left: 1rem;
}

.form-field-errors li {
    margin: 0.25rem 0;
}

.field-help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

.modal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.modal-form-actions .btn-gray,
.modal-form-actions .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 767px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-form-column:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .form-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-form-header,
    .modal-form-column,
    .modal-form-actions {
        padding: 1rem;
    }
}

.modal-form-container::-webkit-scrollbar {
    width: 6px;
}

.modal-form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-form-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-form-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.modal-case-form select option {
    padding: 0.5rem;
}

#id_customer {
    font-weight: 500;
}

#id_status option[value="open"] { color: #f59e0b; }
#id_status option[value="in_progress"] { color: #3b82f6; }
#id_status option[value="waiting_customer"] { color: #8b5cf6; }
#id_status option[value="resolved"] { color: #10b981; }
#id_status option[value="closed"] { color: #6b7280; }

#id_priority option[value="low"] { color: #10b981; }
#id_priority option[value="medium"] { color: #f59e0b; }
#id_priority option[value="high"] { color: #ef4444; }
#id_priority option[value="urgent"] { color: #dc2626; }

.modal-confirm {
    max-width: 480px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-confirm-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-bottom: 1px solid #fecaca;
}

.modal-confirm-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-confirm-icon i {
    color: #dc2626;
    font-size: 1.25rem;
}

.modal-confirm-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-confirm-body {
    padding: 1.5rem;
    background: white;
}

.modal-confirm-text {
    color: #374151;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.case-to-delete {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.case-to-delete-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.case-to-delete-title {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.4;
}

.modal-confirm-warning {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    background: #fffbeb;
    border-radius: 6px;
    margin-top: 1rem;
    gap: 0.5rem;
    border: 1px solid #fef3c7;
    color: #92400e;
    font-size: 0.875rem;
}

.modal-confirm-warning i {
    color: #d97706;
    margin-top: 0.125rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.modal-confirm-warning span {
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.4;
}

.modal-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.modal-confirm-footer .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-confirm-footer .btn-gray {
    background: #6b7280;
    color: white;
}

.modal-confirm-footer .btn-gray:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.modal-confirm-footer .btn-red {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.modal-confirm-footer .btn-red:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 640px) {
    .modal-confirm {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .modal-confirm-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1.25rem 1rem 1rem 1rem;
    }

    .modal-confirm-body {
        padding: 1.25rem 1rem;
    }

    .modal-confirm-footer {
        flex-direction: column-reverse;
        padding: 1rem 1rem 1.25rem 1rem;
    }

    .modal-confirm-footer .btn {
        justify-content: center;
        width: 100%;
    }
}

.sortable {
    cursor: pointer;
    position: relative;
}

.sort-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.sort-link:hover {
    color: #2563eb;
    background-color: #f8fafc;
}

.sort-link i {
    font-size: 0.75rem;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.sort-link:hover i {
    color: #2563eb;
}

.sort-link.active i {
    color: #2563eb;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.pagination .current {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 0.375rem;
}

.table-header th:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.modal-service-detail {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
}

.modal-service-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-service-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.modal-service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: white;
    line-height: 1.3;
}

.modal-status-value.scheduled { color: #3b82f6; }
.modal-status-value.in_progress { color: #f59e0b; }
.modal-status-value.completed { color: #10b981; }
.modal-status-value.cancelled { color: #6b7280; }
.modal-status-value.overdue { color: #dc2626; }

.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.modal-detail-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

.modal-service-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-form-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-service-form select,
.modal-service-form input,
.modal-service-form textarea,
.modal-service-form .form-input,
.modal-service-form .form-textarea,
.modal-service-form .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-service-form select:focus,
.modal-service-form input:focus,
.modal-service-form textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-service-form .form-input:focus,
.modal-service-form .form-textarea:focus,
.modal-service-form .form-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.modal-service-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.modal-timeline-marker.started {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #f59e0b;
}
.modal-timeline-marker.completed {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}

@media (max-width: 768px) {
    .modal-details-grid {
        grid-template-columns: 1fr;
    }

    .modal-service-header,
    .modal-form-content {
        padding: 1rem;
    }

    .modal-service-title {
        font-size: 1.125rem;
    }
}

.modal-service-form .form-field-group {
    margin-bottom: 1.5rem;
}

.modal-service-form .form-field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.modal-service-form .form-field-label i {
    color: #6b7280;
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

.modal-service-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.modal-service-form textarea[name="description"] {
    min-height: 120px;
}

.modal-service-form textarea[name="parts_used"],
.modal-service-form textarea[name="notes"] {
    min-height: 80px;
}

.modal-service-form input[type="number"] {
    text-align: right;
}

.modal-service-form input[type="datetime-local"],
.modal-service-form input[type="date"],
.modal-service-form input[type="time"] {
    font-family: inherit;
}

.modal-service-form .form-field-errors {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: #fef2f2;
    border-radius: 4px;
    border-left: 3px solid #dc2626;
}

.modal-service-form .form-field-errors ul {
    margin: 0;
    padding-left: 1rem;
}

.modal-service-form .form-field-errors li {
    margin: 0.25rem 0;
}

.modal-service-form .error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.modal-service-form .error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#serviceModalContent {
    max-height: none;
    overflow: visible;
}

.company-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.info-item:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .company-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .info-item {
        padding: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .company-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-grid,
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.status-item,
.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.status-icon,
.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon i,
.stat-icon i {
    color: white;
    font-size: 1.25rem;
}

.status-content,
.stat-content {
    flex: 1;
}

.status-label,
.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.status-value {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
    line-height: 1;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1.5rem 1rem;
    }

    .stat-icon {
        width: 4rem;
        height: 4rem;
    }

    .stat-icon i {
        font-size: 1.5rem;
    }
}

.form-section {
    margin-bottom: 2rem;
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-form-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.contact-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.contact-form-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.form-field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.form-field-checkbox input[type="checkbox"] {
    width: auto;
}

.field-errors {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.modal-service-form .form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.status-item-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.status-item-compact:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-icon-compact {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon-compact i {
    color: white;
    font-size: 1rem;
}

.status-content-compact {
    flex: 1;
}

.status-label-compact {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.status-value-compact {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.2;
}

.status-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
    margin: 0 0.5rem;
}

@media (max-width: 768px) {
    .status-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .status-divider {
        display: none;
    }

    .status-item-compact {
        width: 100%;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.form-icon i {
    font-size: 1.5rem;
    color: white;
}

.form-header h3 {
    color: #1f2937;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.form-header p {
    color: #6b7280;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-size: 16px;
}

.section-icon.personal {
    background: linear-gradient(135deg, #10b981, #059669);
}

.section-icon.contact {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.section-icon.employment {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.section-icon.additional {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.section-icon i {
    color: white;
    font-size: 0.9rem;
}

.section-header h4 {
    color: #374151;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #10b981;
}

.field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error-tooltip {
    display: none;
    background: #dc2626;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    position: relative;
}

.field-error-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 1rem;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #dc2626;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.navbar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    margin-top: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

@media (max-width: 768px) {
    .navbar-search-results {
        position: fixed;
        top: 3.5rem;
        left: 1rem;
        right: 1rem;
        max-height: 50vh;
    }

    .search-result-item {
        padding: 1rem;
    }
}

.search-result-item:hover,
.search-result-item:focus {
    background-color: #f8fafc;
    outline: none;
}

.search-result-item.loading,
.search-result-item.no-results,
.search-result-item.error {
    color: #6b7280;
    font-style: italic;
    cursor: default;
    justify-content: flex-start;
}

.search-result-item.error {
    color: #dc2626;
}

.search-result-item.loading i,
.search-result-item.no-results i,
.search-result-item.error i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-details {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-details .contact-name {
    font-weight: 500;
}

.search-result-details .phone {
    color: #059669;
}

.search-result-arrow {
    color: #9ca3af;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.search-result-item:hover .search-result-arrow {
    opacity: 1;
}

.navbar-search-results::-webkit-scrollbar {
    width: 6px;
}

.navbar-search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.navbar-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.navbar-search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.form-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
}

.form-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.card-header i {
  color: #6366f1;
  font-size: 20px;
}

.required-badge {
  background: #ef4444;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.search-section {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #475569;
}

.section-badge {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.search-container i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.input-group.full-width {
  grid-column: 1 / -1;
}

.modern-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
  margin-left: 10;
}

.required-star {
  color: #ef4444;
}

.modern-input, .modern-select, .modern-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.modern-input:focus, .modern-select:focus, .modern-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.equipment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
}

.equipment-item:hover {
  background: #f8faff;
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.equipment-item input[type="checkbox"] {
  margin: 0;
}

.service-job-toggle {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  width: 50px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 13px;
  position: relative;
  transition: all 0.3s;
  margin-left: 10;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: all 0.3s;
}

.toggle-input:checked + .toggle-slider {
  background: #10b981;
}

.toggle-input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-text {
  font-weight: 600;
  color: #374151;
}

.date-time-input {
  position: relative;
}

.date-time-input i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.date-time-input input {
  padding-left: 48px !important;
}

.priority-select option[value="low"] { color: #10b981; }
.priority-select option[value="medium"] { color: #f59e0b; }
.priority-select option[value="high"] { color: #f97316; }
.priority-select option[value="urgent"] { color: #ef4444; }

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: #6b7280;
  border: 2px solid #e2e8f0;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.icon-phone::before { content: "📞"; }
.icon-close::before { content: "✕"; }
.icon-search::before { content: "🔍"; }
.icon-business::before { content: "🏢"; }
.icon-person::before { content: "👤"; }
.icon-problem::before { content: "⚠️"; }
.icon-schedule::before { content: "📅"; }
.icon-calendar::before { content: "📅"; }
.icon-register::before { content: "✅"; }

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-header, .modal-footer {
    padding: 20px;
  }

  .form-grid-3,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 8px;
  }

  .modal-center {
    padding: 10px;
  }

  .footer-actions {
    flex-direction: column;
    width: 100%;
  }

  .footer-actions button {
    width: 100%;
  }
}

.modern-modal.hidden {
  display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.25rem;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
}

.modern-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modern-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modern-modal:not(.hidden) .modal-backdrop {
    opacity: 1;
}

.modern-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

.modern-modal:not(.hidden) .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modern-modal.closing .modal-backdrop {
    opacity: 0;
}

.modern-modal.closing .modal-content {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
    font-weight: 500;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop:not(.hidden) .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-backdrop.closing .modal-card {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    margin-right: 0.5rem;
}

.form-checkbox-label {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

.modal-overlay.hidden .modal-card {
    transform: scale(0.8);
    opacity: 0;
}

.modal-overlay,
.modal-backdrop {
    z-index: 10000 !important;
}

.footer-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 32px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon i {
    font-size: 24px;
    color: white;
}

.header-subtitle {
    margin: 4px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.modern-form {
    padding: 0;
}

.form-section-card {
    animation: slideUp 0.4s ease-out;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 16px 32px;
    transition: all 0.3s ease;
}

.form-section-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.modern-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-label.required::after {
    content: "*";
    color: #ef4444;
    margin-left: 4px;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.form-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-checkbox:checked::before {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-grid-3, .form-grid-2 {
    gap: 20px;
}

.modern-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 24px 32px;
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.form-options-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .modal-header-gradient {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
    }

    .header-content {
        width: 100%;
    }

    .form-section-card {
        margin: 12px 16px;
        padding: 20px;
    }

    .form-grid-3, .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modern-footer {
        padding: 20px;
    }

    .footer-actions {
        flex-direction: column;
    }

    .footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#generatePdfBtn:not(.btn-loading) i,
#sendReportBtn:not(:disabled) i {
    animation: none;
}

.send-email-checkbox-required {
    border: 2px solid #f59e0b;
    border-radius: 4px;
    padding: 8px;
    background-color: #fffbeb;
    transition: all 0.3s ease;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pulse-warning {
    animation: pulse-warning 1.5s infinite;
}

.readonly-field {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: #ddd !important;
}

.readonly-field:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #ddd !important;
}

.modern-input[readonly] {
    background-color: #f5f5f5 !important;
    color: #666 !important;
}

.btn-report {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-report:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-report:active {
    transform: translateY(0);
}

.navbar {
    position: fixed;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
    width: 100%;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 2rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 1rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.language-switcher {
    margin: 0;
}

.language-select-container {
    margin-top: 15;
    position: relative;
    min-width: 140px;
}

.language-select {
    appearance: none;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    font-weight: 500;
}

.language-select:hover {
    border-color: #9ca3af;
}

.language-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 0.75rem;
}

main {
    padding-top: 1rem;
}

@media (max-width: 1024px) {
    .navbar-content {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 0;
        gap: 1rem;
    }

    .search-button-group {
        order: 3;
        flex: 1 0 100%;
        max-width: none;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-right {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    .language-select-container {
        min-width: 120px;
    }

    .search-wrapper {
        max-width: 300px;
    }

    .btn-primary {
        padding: 0.625rem 1rem;
    }
}

@media (max-width: 640px) {
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
        height: auto;
    }

    .navbar-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .search-button-group {
        order: 2;
        margin-top: 0;
    }

    .navbar-left {
        order: 1;
    }

    .language-select-container {
        min-width: 100px;
    }
}

.nav-link-form {
    display: inline;
}

.nav-link-form .nav-link {
    display: inline;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font: inherit;
    padding: 0;
    margin: 0;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-form-container.compact {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
}

.modal-form-content.compact-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field-row.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.customer-info-display {
    padding: 0.75rem;
    background-color: #f3f4f6;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    color: #374151;
    font-size: 0.9rem;
}

.customer-detail {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.modal-form-actions.compact {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.form-field-group input,
.form-field-group select,
.form-field-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-field-group input:focus,
.form-field-group select:focus,
.form-field-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.btn-gray, .btn-primary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-cell.unavailable {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    cursor: pointer;
}

.calendar-cell.unavailable:hover {
    background-color: #fde68a;
}

.calendar-cell.free {
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-cell.free:hover {
    background-color: #f3f4f6;
}

.calendar-cell.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.calendar-cell.unavailable.is-today {
    box-shadow: inset 0 0 0 2px #f59e0b;
}



.toast-notification.success {
    background-color: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
}

.toast-notification.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.toast-notification.warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.toast-notification.info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.status-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.status-option:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.status-option:active:not(:disabled) {
    background-color: #f3f4f6;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.status-option span {
    font-weight: 500;
    color: #374151;
}

.time-slot-container {
    min-height: 400px;
    position: relative;
}

.calendar-section {
    padding: 1rem 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-header h4 {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
    font-size: 1.2rem;
}

.weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.5rem;
}

.month-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 1rem;
}

.calendar-day {
    position: relative;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

.calendar-day.empty {
    background-color: #f8fafc;
    border-color: #f3f4f6;
    cursor: default;
}

.calendar-day.selectable {
    cursor: pointer;
}

.calendar-day.selectable:hover {
    background: darkblue;
    border-color: #3b82f6;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-day.today {
    border-color: #3b82f6;
    border: 2px solid #3b82f6;
    background-color: #eff6ff;
}

.calendar-day.weekend {
    background: #f8fafc;
}

.calendar-day.free .status-indicator {
    background-color: #10b981;
}

.calendar-day.busy .status-indicator {
    background-color: #ef4444;
}

.calendar-day.unavailable .status-indicator {
    background-color: #f59e0b;
}

.status-indicator-calendar {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 auto;
}

.status-indicator-calendar.free {
background-color: #10b981;
}

.status-indicator-calendar.busy {
    background-color: #ef4444;
}

.time-slots-section {
    padding: 1rem 0;
}

.time-slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.time-slots-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.time-slots-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.time-slot {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.time-slot.free {
    border-color: #d1fae5;
    background-color: #ecfdf5;
}

.time-slot.booked {
    border-color: #fee2e2;
    background-color: #fef2f2;
    opacity: 0.7;
}

.time-slot.unavailable {
    border-color: #fef3c7;
    background-color: #fffbeb;
    opacity: 0.7;
}

.time-slot.selectable {
    cursor: pointer;
}

.time-slot.selectable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.slot-time {
    font-weight: 600;
    min-width: 120px;
    font-size: 0.9rem;
}

.slot-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.status-icon {
    font-size: 0.875rem;
}

.status-text {
    font-weight: 600;
    font-size: 0.875rem;
}

.time-slot.free .status-text {
    color: #065f46;
}

.time-slot.booked .status-text {
    color: #991b1b;
}

.time-slot.unavailable .status-text {
    color: #92400e;
}

.slot-details {
    flex: 1;
    margin: 0 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.slot-action {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.875rem;
}

.selected-slot-info {
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    margin: 0 1rem;
    border: 1px solid #e5e7eb;
}

.selected-slot-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.selected-slot-label i {
    color: #10b981;
}

.selected-slot-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.input-with-action {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.input-with-action .form-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0.75rem;
    font-size: 0.9rem;
    border-radius: 0;
}

.input-action-btn {
    background-color: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 0 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.input-action-btn:hover {
    background-color: #2563eb;
}

.input-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-left: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #6b7280;
    margin: 0;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .time-slot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .slot-time, .slot-status, .slot-details, .slot-action {
        min-width: auto;
        margin: 0;
    }

    .calendar-day {
        min-height: 50px;
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }

    .time-slots-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

.input-action-btn {
    background-color: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 0 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.input-action-btn:hover {
    background-color: #2563eb;
}

.input-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.input-with-action .input-action-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px 0 0 6px;
  padding: 0 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-action .input-action-btn:hover {
    background-color: #2563eb;
}

.input-with-action .form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

.data-table td,
.data-table th {
    padding: 0.5rem 0.75rem;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 15%;
    max-width: 200px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 20%;
    max-width: 250px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 8%;
    min-width: 80px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 10%;
    min-width: 90px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 12%;
    min-width: 120px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
    width: 15%;
    max-width: 180px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
    width: 10%;
    min-width: 120px;
    text-align: center;
}

.data-table td:nth-child(1) a,
.data-table td:nth-child(2) {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 1200px) {
    .data-table {
        font-size: 0.8rem;
    }

    .data-table td,
    .data-table th {
        padding: 0.375rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .data-table th:nth-child(5),
    .data-table td:nth-child(5),
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        display: none;
    }

    .data-table th:nth-child(1),
    .data-table td:nth-child(1) {
        width: 25%;
    }

    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        width: 35%;
    }
}

.equipment-section {
    transition: all 0.3s ease;
}

.equipment-section.support-mode {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.equipment-section.service-mode {
    border-left: 4px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.equipment-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.equipment-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin: 0 !important;
    cursor: pointer;
    border-radius: 6px;
    gap: 0.75rem;
}

.equipment-checkbox:hover {
    background-color: #f8fafc;
}

.equipment-checkbox input[type="checkbox"]:checked ~ .equipment-info {
    color: #1f2937;
}

.equipment-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.equipment-info {
    flex: 1;
    margin-left: 12px;
}

.equipment-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.no-equipment {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

.no-equipment i {
    font-size: 18px;
    margin-bottom: 8px;
    display: block;
    color: #9ca3af;
}

.selection-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selection-hint i {
    color: #3b82f6;
}

.service-mode .selection-hint {
    border-left-color: #10b981;
}

.service-mode .selection-hint i {
    color: #10b981;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkmark {
    position: relative;
    top: 2px;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.equipment-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.equipment-checkboxes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.equipment-checkboxes::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.equipment-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipment-list-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.equipment-checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    min-height: 100px;
    transition: all 0.3s ease;
}

.equipment-checkbox-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 1rem;
}

.equipment-checkbox-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.equipment-checkbox-item input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-checkbox-item input[type="checkbox"]:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.equipment-checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    flex: 1;
}

.no-equipment-message {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    grid-column: 1 / -1;
    font-style: italic;
}

@media (max-width: 768px) {
    .equipment-checkbox-container {
        grid-template-columns: 1fr;
        max-height: 400px;
    }
}

.equipment-selected-counter {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.loading-equipment {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
    grid-column: 1 / -1;
}

.equipment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.equipment-table th {
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.equipment-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.equipment-table tr:hover {
    background-color: #f9fafb;
}

.equipment-table td:nth-child(3) {
    max-width: 300px;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .equipment-table {
        font-size: 0.8rem;
    }

    .equipment-table th,
    .equipment-table td {
        padding: 0.5rem 0.75rem;
    }

    .equipment-table td:nth-child(3) {
        max-width: 200px;
    }
}

.equipment-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
}

.equipment-details {
    font-size: 0.875rem;
    color: #6b7280;
}

.equipment-details div {
    margin-bottom: 0.25rem;
}

.equipment-details strong {
    color: #374151;
    font-weight: 500;
}

#addEquipmentModal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.loading-equipment-models {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

.loading-equipment-models i {
    margin-right: 0.5rem;
}

.status-badge.planned {
    background-color: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.search-group {
    position: relative;
    display: flex;
    align-items: center;
}

.clear-input-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.clear-input-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}


.date-selection-options {
    display: none !important;
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-selection-options .radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.multiple-dates-calendar {
    width: 100%;
    padding: 1rem;
    min-height: 400px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}
.selected-dates-list {
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.date-range-summary {
    margin-top: 1rem;
    padding: 12px;
    background-color: #f0f9ff;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    font-size: 0.875rem;
}

.multi-date-picker {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
}

.nav-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-weekdays div {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    padding: 1px;
}

.calendar-day.selected {
    background: #3b82f6;
    color: white;
}

.calendar-day.selected .day-number {
    font-weight: bold;
}

.calendar-day.unavailable {
    background: #fef2f2;
    color: #ef4444;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day.unavailable.selectable:hover {
    background: #fef2f2;
    transform: none;
    box-shadow: none;
}

.calendar-day.available {
    background: #f0fdf4;
}

.calendar-day.weekend.selected {
    background: #3b82f6;
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
}

.day-status {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-top: 2px;
}

.calendar-day.selected .day-status {
    background: white;
}

.calendar-day.available .day-status {
    background: #22c55e;
}

.calendar-day.unavailable .day-status {
    background: #dc2626;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.available {
    background: #10b981;
}

.legend-color.selected {
    background: #3b82f6;
}

.legend-color.unavailable {
    background: #ef4444;
}

.quick-selection-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.quick-selection-btn {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
}

.quick-selection-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

.selected-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin: 4px 0;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
}

.remove-date-btn {
    background: #ef4444;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.remove-date-btn:hover {
    background: #dc2626;
    color: white;
}

.scheduled-dates-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.scheduled-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.scheduled-date-item:last-child {
    border-bottom: none;
}

.scheduled-date-item:hover {
    background-color: #f9fafb;
}

.scheduled-date-item.today {
    background-color: #f0f9ff;
    border-left: 4px solid #3b82f6;
}

.date-info {
    flex: 1;
}

.time-range {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.date-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.date-selection-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.date-selection-tab {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    font-size: 14px;
}

.date-selection-tab:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

.date-selection-tab.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.date-selection-panel {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: white;
    margin-top: 10px;
    width: 94%;
}

.calendar-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

.multiple-dates-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.quick-selection-btn.btn-clear:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #ef4444;
}

.selected-dates-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    width: 93%;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 16px;
}

.dates-count {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
}

.no-dates {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 20px;
}

.date-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.range-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0369a1;
    font-weight: 500;
}

.calendar-day:hover {
    background: #f8fafc;
}

.calendar-day.available:not(.selected):hover {
    background: #eff6ff;
}

@media (max-width: 768px) {
    .date-selection-tabs {
        flex-direction: column;
    }

    .date-selection-tab {
        min-width: auto;
    }

    .multiple-dates-header {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-selection-buttons {
        justify-content: stretch;
    }

    .quick-selection-btn {
        flex: 1;
        justify-content: center;
    }

    .date-range-inputs {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays div {
        padding: 8px 4px;
        font-size: 10px;
    }

    .calendar-day {
        min-height: 35px;
        font-size: 12px;
    }
}

.form-field-group:has(#id_location) {
    margin-top: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .quick-selection-buttons {
        justify-content: stretch;
    }

    .quick-selection-btn {
        flex: 1;
        justify-content: center;
        font-size: 11px;
        padding: 6px 8px;
    }
}

.date-range-summary .range-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.date-range-summary .range-info i {
    color: #6c757d;
    margin-right: 0.5rem;
}

.date-range-summary .range-info strong {
    color: #495057;
    font-size: 1.1em;
}

.date-range-summary .range-info small {
    color: #6c757d;
    font-size: 0.9em;
}

.service-report-hub {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 -1.5rem 2rem -1.5rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.hub-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hub-header-right .icon-button {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.hub-header-right .icon-button:hover {
    color: #1f2937;
}

.hub-title-section .hub-title {
    margin: 0 0 0.25rem 0;
}

.hub-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 4px;
}

.last-sent {
    font-size: 0.75rem;
    color: #6b7280;
}

.hub-title-section .hub-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.hub-title-section .hub-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.hub-title-section .hub-subtitle small {
    display: block;
    color: #9ca3af;
    font-size: 0.75rem;
}

.hub-status .status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.draft {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.final {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.sent {
    background-color: #dbeafe;
    color: #1e40af;
}

.hub-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .hub-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hub-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #374151;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 90px;
}

.hub-btn:hover:not(.disabled) {
    border-color: #3b82f6;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.hub-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hub-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.hub-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.hub-btn small {
    font-size: 0.75rem;
    color: #6b7280;
}

.view-btn { border-left: 4px solid #10b981; }
.create-btn { border-left: 4px solid #3b82f6; }
.edit-btn { border-left: 4px solid #f59e0b; }
.delete-btn { border-left: 4px solid #ef4444; }

.hub-info-section {
    margin-bottom: 2rem;
}

.report-info,
.no-report-message {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.report-info h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.no-report-message {
    text-align: center;
    color: #6b7280;
}

.no-report-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.no-report-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.info-grid-report {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item-report {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-direction: column;
}
.info-item label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.info-item span {
    font-weight: 500;
}

.email-settings-panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: white;
}

.email-settings-panel h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.email-history {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.email-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.service-report-form {
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444;
}

.metric-list-container {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    overflow: hidden;
}

.metric-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.metric-table th {
    padding: 1rem;
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.metric-table td {
    padding: 1rem;
    vertical-align: middle;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.metric-table tbody tr:hover td {
    background-color: #f9fafb;
}

.col-subject-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.col-customer {
    font-weight: 500;
    color: #111827;
}

.status-badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.status-badge-modern.open,
.status-badge-modern.overdue,
.status-badge-modern.waiting_customer {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.status-badge-modern.planned,
.status-badge-modern.scheduled {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.status-badge-modern.in_progress {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.btn-view-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-view-modern:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.btn-view-modern i {
    font-size: 0.875rem;
    color: #6b7280;
}
.btn-view-modern:hover i {
    color: #4b5563;
}

.modal-header-colored {
    padding: 1.5rem 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    margin: -1px -1px 0;
}

.header-theme-support {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.header-theme-service {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.header-content-colored h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.header-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.icon-button-white {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.icon-button-white:hover {
    background: rgba(255, 255, 255, 0.3);
}
