
/* Custom CSS for NorahUniversity ATS */
/* Keep only essential custom styles that Bootstrap doesn't handle */

/* Primary Brand Color */
:root {
    --primary-color: #1b8354;
    --primary-hover: #155f3e;
}

/* Header and Navigation */
.header {
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.navbar {
    background-color: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.nav-link:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

/* Buttons - Override Bootstrap primary color */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Cards */
.card {
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.card-header {
    border-bottom: 1px solid #e0e0e0 !important;
    background-color: white !important;
}

/* Table Improvements */
.table-hover tbody tr:hover {
    background-color: rgba(27, 131, 84, 0.05) !important;
}

/* Custom Badge Colors */
.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
}

/* Form Improvements */
.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(27, 131, 84, 0.25) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
    }

    .nav-item {
        margin: 0;
    }
}

/* Utility classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Icon Styling */
.heroicon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    vertical-align: middle;
    flex-shrink: 0;
}

.size-6 {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Responsive icon sizing */
.icon-sm {
    width: 0.875rem !important;
    height: 0.875rem !important;
    margin-right: 0.375rem !important;
}

.icon-md {
    width: 1.125rem !important;
    height: 1.125rem !important;
    margin-right: 0.625rem !important;
}

.icon-lg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    margin-right: 0.75rem !important;
}

.icon-xl {
    width: 2rem !important;
    height: 2rem !important;
    margin-right: 1rem !important;
}

/* Context-specific icon adjustments */
.btn-sm .heroicon,
.btn-sm .size-6,
.btn-sm .icon-md {
    width: 0.875rem !important;
    height: 0.875rem !important;
    margin-right: 0.375rem !important;
}

.nav-link .heroicon,
.nav-link .size-6 {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-right: 0.5rem !important;
}

.card-header .heroicon,
.card-header .size-6 {
    width: 1.375rem !important;
    height: 1.375rem !important;
    margin-right: 0.625rem !important;
}

/* Print styles */
@media print {
    .navbar,
    .header,
    .btn,
    .pagination {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Responsive adjustments for icons */
@media (max-width: 768px) {
    .nav-link .heroicon,
    .nav-link .size-6 {
        width: 1rem !important;
        height: 1rem !important;
        margin-right: 0.375rem !important;
    }

    .card-header .heroicon,
    .card-header .size-6 {
        width: 1.125rem !important;
        height: 1.125rem !important;
        margin-right: 0.5rem !important;
    }
}

/* Header and Search Enhancements */
.card-header {
    background-color: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 1.25rem 1.5rem !important;
}

.card-header h1,
.card-header h2,
.card-header h3 {
    margin-bottom: 0 !important;
    font-weight: 600 !important;
}

.card-header h1.h3,
.card-header h2.h3,
.card-header h3.h3 {
    font-size: 1.25rem !important;
}

/* Search Form Enhancements */
.search-form-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 250px;
}

.input-group-text {
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    /* border-right: none !important; */
    color: #495057 !important;
    transition: all 0.2s ease !important;
}

.input-group-text:hover {
    background-color: #e9ecef !important;
}

.input-group-text .heroicon {
    width: 1rem !important;
    height: 1rem !important;
    margin-right: 0 !important;
}


.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(27, 131, 84, 0.15) !important;
}

.form-control:focus + .input-group-text {
    border-color: var(--primary-color) !important;
    background-color: rgba(27, 131, 84, 0.05) !important;
}

/* Button Group Enhancements */
.d-flex.gap-2 .btn {
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.d-flex.gap-2 .btn:hover {
    transform: translateY(-1px) !important;
}

.d-flex.gap-2 .btn svg {
    margin-right: 0.375rem !important;
}

/* Responsive Header Adjustments */
@media (max-width: 768px) {
    .card-header {
        padding: 1rem 1.25rem !important;
    }

    .card-header h1.h3,
    .card-header h2.h3,
    .card-header h3.h3 {
        font-size: 1.125rem !important;
    }

    .input-group {
        min-width: 200px !important;
        max-width: 100% !important;
    }

    .d-flex.gap-2 {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .d-flex.gap-2 .btn {
        flex: 1 !important;
        min-width: 120px !important;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.875rem 1rem !important;
    }

    .input-group {
        min-width: 100% !important;
    }

    .d-flex.gap-2 .btn {
        font-size: 0.875rem !important;
        padding: 0.375rem 0.75rem !important;
    }
}

/* Search Input Placeholder */
.form-control::placeholder {
    color: #6c757d !important;
    opacity: 0.7 !important;
}

/* Enhanced Focus States */
.form-control:focus::placeholder {
    opacity: 1 !important;
}

/* Detail Page Enhancements */
.detail-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(27, 131, 84, 0.1) 100%);
    border-bottom: 3px solid var(--primary-color) !important;
}

.detail-page-header h1 {
    color: var(--primary-color) !important;
}

/* Information Cards Enhancement */
.info-card {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-card .info-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-card .info-value {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
}

/* Action Cards Enhancement */
.action-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

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

/* Resume File Display */
.resume-file {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.resume-file:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.resume-file .file-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.resume-file .file-info {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Parsed Data Grid Enhancement */
.parsed-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.parsed-data-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.parsed-data-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(27, 131, 84, 0.1);
}

.parsed-data-item .data-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.parsed-data-item .data-value {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.4;
}

/* Status Badge Enhancement */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.status-badge .heroicon {
    width: 1rem !important;
    height: 1rem !important;
}

/* Contact Information Enhancement */
.contact-info-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.contact-info-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(27, 131, 84, 0.1);
}

.contact-info-item .contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-info-item .contact-value {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
    margin-top: 0.125rem;
}

/* Responsive Detail Page Adjustments */
@media (max-width: 768px) {
    .detail-page-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, rgba(27, 131, 84, 0.05) 100%);
        border-bottom: 2px solid var(--primary-color);
    }

    .detail-page-header h1 {
        font-size: 1.5rem !important;
    }

    .info-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .parsed-data-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-item {
        padding: 0.5rem 0.75rem;
    }

    .action-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .detail-page-header h1 {
        font-size: 1.25rem !important;
    }

    .info-card .info-label {
        font-size: 0.75rem;
    }

    .info-card .info-value {
        font-size: 0.875rem;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Loading Animation for Detail Pages */
.detail-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Print Styles for Detail Pages */
@media print {
    .detail-page-header {
        background: white !important;
        border: 2px solid #dee2e6 !important;
    }

    .detail-page-header h1 {
        color: #212529 !important;
    }

    .contact-info-item,
    .info-card,
    .parsed-data-item {
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }

    .btn,
    .action-card {
        display: none !important;
    }
}

/* Form and Update Page Enhancements */
.form-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(27, 131, 84, 0.1) 100%);
    border-bottom: 3px solid var(--primary-color) !important;
}

.form-page-header h1 {
    color: var(--primary-color) !important;
}

.form-page-header p {
    color: rgba(27, 131, 84, 0.8) !important;
}

/* Form Section Enhancement */
.form-section {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-section h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section .section-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* Form Field Enhancement */
.form-field-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-field-wrapper label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-field-wrapper .required-indicator {
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: bold;
}

.form-field-wrapper .field-icon {
    position: absolute;
    right: 1rem;
    top: 2.5rem;
    color: #6c757d;
    pointer-events: none;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(27, 131, 84, 0.15);
    color: #212529;
    background-color: #fff;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: 2.5rem;
    background-image: none;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #28a745;
    padding-right: 2.5rem;
    background-image: none;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.invalid-feedback,
.valid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: #dc3545;
    display: block;
}

.valid-feedback {
    color: #28a745;
    display: block;
}

/* Form Enhancement for Special Fields */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-weight: 500;
    color: #495057;
}

/* Action Buttons Enhancement */
.form-action-buttons {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-action-buttons .btn {
    min-width: 120px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Form Adjustments */
@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .form-section h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .form-control,
    .form-select {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }

    .form-field-wrapper label {
        font-size: 0.875rem;
    }

    .form-text,
    .invalid-feedback,
    .valid-feedback {
        font-size: 0.75rem;
    }

    .form-action-buttons {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .form-action-buttons .btn {
        min-width: 100px;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .form-section h5 {
        font-size: 1rem;
    }

    .form-control,
    .form-select {
        font-size: 0.813rem;
        padding: 0.5rem 0.625rem;
    }

    .form-field-wrapper {
        margin-bottom: 1rem;
    }

    .form-action-buttons {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .form-action-buttons .btn {
        min-width: auto;
        width: 100%;
    }
}

/* Loading State for Forms */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.form-loading .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Print Styles for Forms */
@media print {
    .form-page-header,
    .form-section,
    .form-action-buttons {
        border: 1px solid #dee2e6 !important;
        background: white !important;
        box-shadow: none !important;
    }

    .form-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .btn {
        display: none !important;
    }

    .form-control,
    .form-select {
        border: 1px solid #000 !important;
        background: white !important;
    }
}

/* File Upload Enhancement */
.form-control[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.form-control[type="file"]:hover {
    border-color: var(--primary-color);
    background: #f0f8f4;
}

.form-control[type="file"]:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(27, 131, 84, 0.15);
}

/* Checkbox and Radio Enhancement */
.form-check-input:checked ~ .form-check-label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus ~ .form-check-label::before {
    box-shadow: 0 0 0 0.2rem rgba(27, 131, 84, 0.25);
}

/* Help Text Enhancement */
.help-text {
    font-size: 0.813rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.help-text .help-icon {
    width: 1rem !important;
    height: 1rem !important;
    color: #6c757d;
}

/* Error State Enhancement */
.field-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-error:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Success State Enhancement */
.field-success {
    border-color: #28a745 !important;
    background-color: #f8fff9 !important;
}

.field-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}
