/* custom.css - Place this in your public/css directory */

/* General styling */
body {
    background-color: #f8f9fa;
    font-family: 'Roboto', sans-serif;
}

.container {
    padding-top: 20px;
    padding-bottom: 20px;
}

h2 {
    margin-bottom: 1.5rem;
    color: #343a40;
    font-weight: 500;
}

h3 {
    margin-bottom: 1.25rem;
    color: #343a40;
    font-weight: 500;
}

/* Card styling */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: none;
    margin-bottom: 20px;
}

.card-header {
    background-color: #343a40;
    color: white;
    border-radius: 8px 8px 0 0 !important;
    padding: 15px 20px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

.card-body p {
    margin-bottom: 0.75rem;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.card-body strong {
    font-weight: 500;
    color: #495057;
}

/* Color variations for card headers */
.card-header.bg-primary {
    background-color: #007bff !important;
}

.card-header.bg-success {
    background-color: #28a745 !important;
}

/* Button styling */
.btn {
    font-weight: 500;
    border-radius: 4px;
    padding: 8px 16px;
    transition: all 0.3s;
    margin-right: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn:last-child {
    margin-right: 0;
}

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

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Form controls styling */
.form-control {
    border-radius: 4px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-bottom: 15px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

/* Multi-step form styling */
.form-step {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.next-btn, .prev-btn {
    margin-top: 1rem;
}

/* Form error states */
.is-invalid {
    border-color: #dc3545;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.alert-danger ul {
    margin-bottom: 0;
    padding-left: 20px;
}

/* Table styling */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    background-color: white;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 123, 255, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.075);
}

.table thead th {
    background-color: #343a40;
    color: white;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
    vertical-align: middle;
}

.table td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Alert styling */
.alert {
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Modal styling */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
}

.modal-header {
    background-color: #343a40;
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    padding: 15px 20px;
}

/* Utility classes */
.d-flex {
    display: flex !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.m-1 {
    margin: 0.25rem !important;
}

.text-end {
    text-align: right !important;
}

.w-100 {
    width: 100% !important;
}

/* Icon styling for buttons */
.btn i {
    font-size: 0.875rem;
}

/* List group styling */
.list-group {
    border-radius: 0.25rem;
    overflow: hidden;
}

.list-group-item {
    padding: 0.75rem 1.25rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.list-group-item:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
}

/* Autocomplete suggestions styling */
.suggestions {
    position: absolute;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: calc(100% - 24px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

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

/* Form switch styling */
.form-check-input {
    width: 2.5em;
    height: 1.25em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid #ced4da;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-switch .form-check-input {
    margin-left: -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check.form-switch {
    padding-left: 2.5em;
}

.form-check-label {
    margin-bottom: 0;
    margin-left: 0.5rem;
}

/* Search box styling */
input[type="text"][name="job_no"] {
    display: inline-block !important;
    width: auto !important;
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .form-step {
        padding: 15px;
    }
    
    /* .d-flex {
        flex-direction: column;
    } */
    
    .btn {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    input[type="text"][name="job_no"] {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
}

/* Card styling */
#login-card.card {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

#login-card .card-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    font-size: 1.5rem;
    padding: 1.5rem;
    border: none;
}

#login-card .card-body {
    padding: 2.5rem;
    background: #fff;
}

/* Form controls */
#login-card .form-control {
    height: 48px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

#login-card .form-control:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.15);
}

#login-card .form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

/* Labels */
#login-card .col-form-label {
    font-weight: 500;
    color: #424242;
}

/* Remember me checkbox */
#login-card .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.2rem;
}

#login-card .form-check-label {
    color: #616161;
    padding-left: 0.5rem;
}

/* Buttons */
#login-card .btn-primary {
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 8px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    transition: all 0.3s ease;
}

#login-card .btn-primary:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

#login-card .btn-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

#login-card .btn-link:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* Error messages */
#login-card .invalid-feedback {
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #login-card .card-body {
        padding: 1.5rem;
    }
    
    #login-card .btn-primary {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    #login-card .btn-link {
        display: block;
        text-align: center;
    }
}