/* Custom styles for PM Proposal Generator */

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    text-align: left;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 20px;
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 4px 0;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.card-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive design for dashboard grid */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 16px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .card-icon i {
        font-size: 18px;
    }
    
    /* Mobile-specific improvements */
    .max-w-7xl {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Improve table scrolling on mobile */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    /* Better modal sizing for mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Improve form inputs on mobile */
    input[type="text"], 
    input[type="email"], 
    input[type="number"], 
    input[type="tel"], 
    select, 
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    /* Better button sizing for mobile */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px; /* Better touch target */
    }
    
    .btn-sm {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 36px;
    }
    
    /* Improve navigation on mobile */
    nav .flex {
        padding: 0 16px;
    }
    
    /* Better spacing for mobile cards */
    .dashboard-card {
        margin-bottom: 12px;
    }
    
    /* Improve table readability on mobile */
    table {
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    /* Better modal scrolling */
    .modal-scrollable {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve proposal form on mobile */
    .proposal-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Better customer cards on mobile */
    .customer-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    /* Improve task cards on mobile */
    .task-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    /* Better section buttons on mobile */
    .section-button {
        padding: 16px;
        margin-bottom: 8px;
    }
    
    /* Improve status badges on mobile */
    .status-badge {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better action buttons on mobile */
    .icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    /* Improve search inputs on mobile */
    .search-input-container input {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    /* Better filter controls on mobile */
    .filter-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-select {
        width: 100%;
        font-size: 16px;
        padding: 12px 16px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Task card styling */
.task-card {
    transition: all 0.2s ease-in-out;
}

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

.task-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Section button styling */
.section-button {
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    margin-bottom: 4px;
}

.section-button:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.section-button.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.section-button.active:hover {
    background-color: #2563eb;
}

.section-button.active .text-gray-500 {
    color: #bfdbfe !important;
}

.section-button.active .text-gray-400 {
    color: #bfdbfe !important;
}

.section-button.active .hover\:text-gray-600:hover {
    color: #bfdbfe !important;
}

/* Selected task styling */
.selected-task {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.selected-task-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 8px;
}

.selected-task-title {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.remove-task-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-task-btn:hover {
    background-color: #fee2e2;
}

/* Form styling */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}

.form-group label {
    width: 130px;
    margin-right: 10px;
    text-align: left;
    font-weight: 500;
}

.form-group i {
    margin-right: 10px;
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 260px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

/* Button styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: #06b6d4;
    color: white;
    border: 1px solid #06b6d4;
}

.btn-info:hover {
    background-color: #0891b2;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal styling */
.modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .flex-wrap {
        flex-direction: column;
    }
    
    .flex-wrap > * {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Extra small screen improvements */
    .max-w-7xl {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Smaller cards for very small screens */
    .dashboard-card {
        padding: 16px;
    }
    
    .card-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .card-icon i {
        font-size: 16px;
    }
    
    .card-value {
        font-size: 20px;
    }
    
    .card-label {
        font-size: 12px;
    }
    
    /* Better table handling for very small screens */
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 6px 8px;
    }
    
    /* Improve modal for very small screens */
    .modal-content {
        width: 98%;
        max-width: 98%;
        margin: 10px auto;
        max-height: 95vh;
    }
    
    /* Better buttons for very small screens */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
    }
    
    /* Improve navigation for very small screens */
    nav .flex {
        padding: 0 12px;
    }
    
    /* Better form inputs for very small screens */
    input[type="text"], 
    input[type="email"], 
    input[type="number"], 
    input[type="tel"], 
    select, 
    textarea {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    /* Improve status badges for very small screens */
    .status-badge {
        padding: 4px 8px;
        font-size: 11px;
        min-height: 28px;
    }
    
    /* Better action buttons for very small screens */
    .icon-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    /* Improve search inputs for very small screens */
    .search-input-container input {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    /* Better filter controls for very small screens */
    .filter-select {
        width: 100%;
        font-size: 16px;
        padding: 10px 12px;
    }
    
    /* Improve customer cards for very small screens */
    .customer-card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    /* Improve task cards for very small screens */
    .task-card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    /* Better section buttons for very small screens */
    .section-button {
        padding: 12px;
        margin-bottom: 6px;
    }
    
    /* Mobile header improvements */
    header {
        padding: 12px 16px;
    }
    
    header h1 {
        font-size: 20px;
        line-height: 1.2;
    }
    
    header .flex {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    header .flex > * {
        width: 100%;
    }
    
    /* Mobile table scrolling improvements */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        max-width: 100vw;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    /* Ensure table has enough width for status column */
    table {
        min-width: 800px; /* Ensure table is wide enough for all columns */
        width: 100%;
    }
    
    /* Better table cell spacing for mobile */
    table th,
    table td {
        padding: 8px 12px;
        white-space: nowrap;
        min-width: 100px; /* Ensure minimum width for readability */
    }
    
    /* Status column specific width */
    table th:last-child,
    table td:last-child {
        min-width: 120px; /* Extra width for status column */
    }
    
    /* Mobile modal improvements for proposal creation */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better form layout for mobile proposal creation */
    .proposal-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .proposal-form-grid > div {
        width: 100%;
    }
    
    /* Mobile button improvements */
    .btn {
        width: 100%;
        margin-bottom: 8px;
        text-align: center;
    }
    
    /* Mobile form input improvements */
    input[type="text"], 
    input[type="email"], 
    input[type="number"], 
    input[type="tel"], 
    select, 
    textarea {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Additional mobile improvements for very small screens */
    .max-w-7xl {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Better table scrolling for very small screens */
    .overflow-x-auto {
        margin: 0 -8px; /* Negative margin to allow full width scrolling */
        padding: 0 8px; /* Add padding back to content */
    }
    
    /* Ensure status badges fit properly */
    .status-badge {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 60px;
        text-align: center;
    }
    
    /* Mobile navigation improvements */
    nav {
        padding: 8px 12px;
    }
    
    nav .flex {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile container improvements */
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-white {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Custom utility classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Task details styling */
.task-details {
    background-color: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 0.875rem;
}

.task-details h4 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.task-details ul {
    list-style-type: disc;
    margin-left: 16px;
    color: #6b7280;
}

.task-details li {
    margin-bottom: 2px;
}

/* Proposal card styling */
.proposal-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease-in-out;
}

.proposal-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.proposal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
}

.proposal-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.125rem;
}

.proposal-salesperson {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

.proposal-meta {
    display: flex;
    gap: 16px;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.proposal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Customer card styling */
.customer-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease-in-out;
}

.customer-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.customer-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.customer-contact {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.customer-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Search input styling */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 2.5em;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-input-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-input-container input:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    display: none;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.clear-search-btn.visible {
    display: block;
}

/* Enhanced filter controls styling */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

/* Make search bar and clear filters button the same width */
.search-input-container {
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 600px;
}

.clear-filters-btn {
    flex-shrink: 0;
    width: 140px;
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-select:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-date {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-date:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-date:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-filters-btn {
    padding: 10px 16px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.clear-filters-btn:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.clear-filters-btn i {
    font-size: 12px;
}

/* Section search specific styling */
#section-search,
#edit-section-search {
    transition: all 0.2s;
    width: 8rem;
}

#section-search:focus,
#edit-section-search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    width: 10rem;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.empty-state p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Modal scrolling and layout fixes */
.modal-content {
    max-height: 90vh;
    overflow: hidden;
}

.modal-scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

/* Simple scrollbar styling for all modals */
.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f7fafc;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Proposal modal specific scrollable areas */
#proposal-modal .modal-scrollable {
    height: 100%;
    max-height: 100%;
}

/* Task management modal specific scrollable areas */
#task-modal .modal-scrollable {
    height: 100%;
    max-height: 100%;
}

/* Fixed panel styles */
.fixed-panel {
    position: relative;
    display: flex;
    flex-direction: column;
}

.fixed-panel-header {
    flex-shrink: 0;
}

.fixed-panel-content {
    flex: 1;
    overflow-y: auto;
}

.fixed-panel-footer {
    flex-shrink: 0;
}

/* Ensure proper height calculations */
.modal-body {
    height: calc(90vh - 88px);
}

/* Task item styles for better visibility */
.task-item {
    transition: all 0.2s ease;
}

.task-item:hover {
    background-color: #f8fafc;
}

.selected-task-item {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

/* Section header styles */
.section-header {
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-header:hover {
    background-color: #f1f5f9;
}

.section-header.active {
    background-color: #dbeafe;
    border-left: 3px solid #3b82f6;
}

/* Ensure modals don't overflow viewport */
@media (max-height: 800px) {
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        height: calc(95vh - 88px);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 95vw;
    }
}

/* Modal centering and proposal form styling */
.modal-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.proposal-form-section {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.proposal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.proposal-form-grid label {
    display: block;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.proposal-form-grid select,
.proposal-form-grid input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background: white;
}

.proposal-form-grid select:focus,
.proposal-form-grid input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.proposal-form-grid select:hover,
.proposal-form-grid input:hover {
    border-color: #9ca3af;
}

/* Ensure modal content is properly sized */
.modal-content-large {
    width: 100%;
    max-width: 90vw;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Proposal modal specific styles */
#proposal-modal .modal-content-large {
    display: flex;
    flex-direction: column;
}

#proposal-modal .modal-content-large > div:first-child {
    flex-shrink: 0; /* Header */
}

#proposal-modal .modal-content-large > div:nth-child(2) {
    flex-shrink: 0; /* Form section */
}

#proposal-modal .modal-content-large > div:last-child {
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* Responsive adjustments for proposal modal */
@media (max-width: 1024px) {
    .proposal-form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content-large {
        max-width: 95vw;
        height: 95vh;
    }
}

@media (max-width: 768px) {
    .modal-content-large {
        max-width: 98vw;
        height: 98vh;
    }
    
    .proposal-form-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Professional Customer Form Styling - Compact Version */
.customer-form-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.customer-form-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.customer-form-header h2 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.customer-form-header p {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0.125rem 0 0 0;
}

.customer-form-body {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.form-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section-title i {
    margin-right: 0.5rem;
    color: #6b7280;
    width: 14px;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.8rem;
}

.form-input {
    position: relative;
}

.form-input input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background: white;
}

.form-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input input:hover {
    border-color: #9ca3af;
}

.form-input i {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.btn-cancel {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-save {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-save:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .customer-form-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .customer-form-body {
        padding: 1rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
        justify-content: center;
    }
}

/* Extra compact for smaller screens */
@media (max-height: 600px) {
    .customer-form-modal {
        max-height: 80vh;
    }
    
    .customer-form-body {
        padding: 1rem;
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.5rem;
    }
    
    .form-section-title {
        margin-bottom: 0.5rem;
    }
}

/* Animation for form appearance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.customer-form-enhanced {
    animation: slideInUp 0.4s ease-out;
}

/* Enhanced input focus states */
.form-input input:focus + i {
    color: #3b82f6;
}

/* Section hover effects */
.form-section:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Customer modal and proposal view modal scrollable areas */
#customer-modal .overflow-y-auto,
#proposal-view-modal .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

#customer-modal .overflow-y-auto::-webkit-scrollbar,
#proposal-view-modal .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#customer-modal .overflow-y-auto::-webkit-scrollbar-track,
#proposal-view-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: #f7fafc;
}

#customer-modal .overflow-y-auto::-webkit-scrollbar-thumb,
#proposal-view-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#customer-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#proposal-view-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.form-row {
    display: flex;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    margin-top: 2px; /* Reduce space between label and input row */
}

.form-row i {
    margin-right: 10px;
    font-size: 1.1em;
    align-self: center;
}

.form-group label {
    margin-bottom: 2px;
    display: block;
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 1. Make the search input larger */
#customer-search {
  height: 40px;
  font-size: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* 2. Add space below the search bar/button row */
#customer-modal .p-6 > .flex {
  margin-bottom: 1.5rem;
}

/* 3. Ensure clear button is vertically centered and not overlapping text */
#clear-customer-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #888;
  cursor: pointer;
  padding: 0 0.25rem;
  display: none;
  z-index: 2;
}

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

#customer-search {
  width: 250px;
  box-sizing: border-box;
}

/* Fixed height for customer list to prevent modal size changes */
#customers-list {
  height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Smooth scrolling for the customer list */
#customers-list::-webkit-scrollbar {
  width: 6px;
}

#customers-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#customers-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

#customers-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Customer modal - narrower and taller */
#customer-modal .bg-white {
  max-width: 800px !important;
}

/* Compact icon-only action buttons for tasks (smaller, more like screenshot) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s, border 0.15s;
  font-size: 1.05rem;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.icon-btn:focus {
  outline: 2px solid #2563eb;
}
.icon-btn-edit {
  color: #1976d2;
  background: #f5faff;
  border-color: #90caf9;
}
.icon-btn-edit:hover {
  background: #e3f2fd;
  color: #0d47a1;
  border-color: #42a5f5;
}
.icon-btn-delete {
  color: #d32f2f;
  background: #fff5f5;
  border-color: #ef9a9a;
}
.icon-btn-delete:hover {
  background: #ffebee;
  color: #b71c1c;
  border-color: #e57373;
}
.icon-btn i {
  font-size: 1.1rem;
  line-height: 1;
}

/* Italic text styling */
.italic {
  font-style: italic;
}

.dashboard-container {
    padding-top: 40px !important;
}

.view-card {
    cursor: default !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: none;
}

.view-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: none;
}

.action-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.action-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Status badge styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid;
    position: relative;
    user-select: none;
    min-width: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-badge:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add a subtle indicator that it's clickable */
.status-badge::after {
    content: '↻';
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
    font-weight: bold;
}

.status-badge:hover::after {
    opacity: 1;
}

/* Status-specific colors */
.status-badge.status-draft {
    background-color: #6b7280 !important;
    color: #ffffff !important;
    border-color: #4b5563;
}

.status-badge.status-draft:hover {
    background-color: #4b5563 !important;
    border-color: #374151;
}

.status-badge.status-submitted {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706;
}

.status-badge.status-submitted:hover {
    background-color: #d97706 !important;
    border-color: #b45309;
}

.status-badge.status-accepted {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669;
}

.status-badge.status-accepted:hover {
    background-color: #059669 !important;
    border-color: #047857;
}

.status-badge.status-cancelled {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626;
}

.status-badge.status-cancelled:hover {
    background-color: #dc2626 !important;
    border-color: #b91c1c;
} 