/* Global responsive utilities */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* Navbar fixes for notification dropdown and sticky positioning */
.navbar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
}

.navbar .navbar-links {
    position: static !important;
    align-items: center !important;
    display: flex !important;
}

/* Notification Panel Styles */
.navbar .notification-container {
    position: relative;
    display: inline-block;
    align-self: center;
}

.navbar .notification-bell {
    position: relative;
}

/* Badge styles preserved */

.navbar .notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

/* Antipolo Residency Confirmation Styles */
.antipolo-residency-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e74c3c;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    transition: all 0.3s ease;
}

.antipolo-residency-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.15);
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #e74c3c;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.checkbox-label i {
    color: #e74c3c;
    font-size: 1.2rem;
}

.required-asterisk {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 0.25rem;
}

.residency-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.residency-note i {
    color: #17a2b8;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Responsive design for Antipolo residency section */
@media (max-width: 768px) {
    .antipolo-residency-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .checkbox-label {
        font-size: 1rem;
    }

    .residency-note {
        font-size: 0.85rem;
    }
}

/* Terms and Conditions Agreement Styles */
.terms-container {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.terms-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
}

.terms-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted #3498db;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
    text-decoration: none;
}

.terms-note {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-note i {
    color: #3498db;
    font-size: 1rem;
}

/* Responsive design for terms section */
@media (max-width: 768px) {
    .terms-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .terms-note {
        font-size: 0.85rem;
    }
}

/* Job Completion & Rating System Styles */
.job-completion-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.page-header p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

.completed-job-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.completed-job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid #e74c3c;
}

.job-info {
    flex: 1;
}

.job-title {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.job-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.job-details i {
    color: #e74c3c;
}

.job-status {
    flex-shrink: 0;
}

.status-badge.completed {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.ratings-section {
    padding: 2rem;
}

.ratings-section h4 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 0.5rem;
}

.existing-ratings {
    margin-bottom: 2rem;
}

.rating-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease;
}

.rating-item:hover {
    transform: translateX(5px);
}

.rating-item.employer-rating {
    border-left-color: #e74c3c;
}

.rating-item.freelancer-rating {
    border-left-color: #27ae60;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-type {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-stars .fa-star.filled {
    color: #f39c12;
}

.rating-stars .fa-star.empty {
    color: #ddd;
}

.rating-number {
    margin-left: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.rating-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.rating-comment {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

.add-rating-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid #e9ecef;
    margin-top: 2rem;
}

.add-rating-section h5 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.star-rating-input {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.star-rating-input label {
    font-weight: 600;
    color: #2c3e50;
}

.star-input-container {
    display: flex;
    gap: 0.25rem;
}

.star-input-container input[type="radio"] {
    display: none;
}

.star-label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: all 0.2s ease;
}

.star-label:hover,
.star-label i.highlighted {
    color: #f39c12;
    transform: scale(1.1);
}

.star-label i.selected {
    color: #f39c12;
}

.comment-input-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-input-section label {
    font-weight: 600;
    color: #2c3e50;
}

.comment-input-section textarea {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-input-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.rating-submit-section {
    display: flex;
    justify-content: flex-end;
}

.submit-rating-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.submit-rating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.demo-note {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    border-left: 4px solid #e17055;
}

.demo-note h4 {
    margin: 0 0 1rem 0;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-note p {
    margin: 0 0 1rem 0;
    color: #2d3436;
    line-height: 1.6;
}

.demo-note ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #2d3436;
}

.demo-note li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .job-completion-container {
        padding: 0 0.5rem;
    }

    .page-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .job-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .job-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .rating-input-section {
        gap: 1rem;
    }

    .submit-rating-btn {
        width: 100%;
        justify-content: center;
    }

    .star-input-container {
        justify-content: center;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e1e8ed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-header i {
    color: #ffd700;
}

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

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f3f6;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.notification-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.notification-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.notification-item.unread {
    background: linear-gradient(90deg, #e3f2fd 0%, #ffffff 100%);
    border-left: 4px solid #2196f3;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #2196f3;
    border-radius: 50%;
    animation: glow 2s infinite;
}

@keyframes glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    margin-top: 2px;
}

.notification-icon.job-offer {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.notification-icon.status-update {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.notification-icon.message {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.notification-icon.reminder {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.3;
}

.notification-message {
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-time {
    color: #95a5a6;
    font-size: 0.75rem;
    font-style: italic;
}

.notification-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
    transform: scale(1);
}

.notification-dismiss:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.notification-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #95a5a6;
    font-style: italic;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.clear-all-btn {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border: none;
    border-top: 1px solid #e1e8ed;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0 0 12px 12px;
    width: 100%;
}

.clear-all-btn:hover {
    background: #e74c3c;
    color: white;
}

.clear-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.clear-all-btn:disabled:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

/* Custom scrollbar for notification dropdown */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

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

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

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive design */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }

    .notification-item {
        padding: 0.75rem 1rem;
    }

    .notification-content {
        gap: 0.5rem;
    }

    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Android phones and similar (720px width) */
@media (max-width: 720px) {
    .notification-dropdown {
        width: calc(100vw - 40px);
        max-width: 320px;
        right: -60px;
    }

    .notification-bell {
        padding: 8px 10px;
        font-size: 1rem;
        min-width: 44px;
        min-height: 44px;
    }

    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: 5px;
        right: 5px;
    }

    .notification-item {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 280px;
        right: -80px;
    }

    .notification-bell {
        padding: 8px 12px;
    }

    .notification-badge {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: 4px;
        right: 6px;
    }
}