*,
*::before,
*::after {
    box-sizing: border-box;
}

.page-title {
    margin-bottom: 5px;
    font-size: 28px;
}

.page-sub-title {
    margin-top: 0;
    color: var(--gray);
}

.section-title {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.form-title {
    margin-top: 25px; 
    margin-bottom: 12px;
    font-size: 18px; 
    font-weight: bold;
}

.back-link {
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 13px;
}

/** common use **/
a {
  text-decoration: none !important;
  color: var(--primary-color);
}


/** container **/
.main-container {
    padding: 25px;
}

.job-apply-container {
    max-width: 700px;
    margin: 25px auto;
    padding: 30px;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0px 0px 10px rgba(0,0,0,0.13);
}


.job-company { 
    color: var(--secondary-color); 
    margin-bottom: 20px; 
}


/* row column */
.row {
    display: flex; 
    gap: 15px;
    margin-bottom: 15px;
}
.col {
    flex: 1;       /* take available space equally */
    min-width: 0;  /* prevent overflow */
}


/* form element css */
input, textarea {
    width: 100%; 
    padding: 10px 12px;
    border: 1px solid var(--light);
    border-radius: 5px; 
    outline: none;
    font-size: 15px;
}
input:focus, textarea:focus {
    border-color: var(--primary-color);
}

select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light);
    border-radius: 5px;
    font-size: 15px;
    outline: none;
}

select:focus {
    border-color: var(--primary-color);
}

label.required::after {
    content: " *";
    color:var(--danger);
    font-weight: bold;
}

/* File Upload */
.file-box {
    display: block; 
    padding: 15px;
    border: 2px dashed var(--light);
    background: #f9f9f9;
    border-radius: 6px;
    text-align: center;
    cursor: pointer; 
    margin-bottom: 15px;
}

.file-box input { display:none; }
.file-box:hover { 
    background: #eef6ff; 
    border-color: var(--primary-color); 
}

#removeResumeBtn {
    margin-top: 8px;
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

#removeResumeBtn:hover {
    background: var(--danger);
}


.textarea-box {
    height: 120px; 
    resize: vertical;
}


.form-footer-btns {
    margin-top: 20px;
    display: flex; 
    justify-content: flex-end;
    gap: 10px;
}

.cv-options {
    margin-bottom: 10px;
}

.cv-options input {
    width: auto;
}


/* Summary Cards */
.summary-cards {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--light);
    border-radius: 8px;
    background: var(--white);
    gap: 10px;
    /* cursor: pointer; */
    transition: 0.3s;
}

.card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 24px;
}

.card-content h3 {
    margin: 0;
    font-size: 20px;
}

.card-content p {
    margin: 0;
    font-size: 13px;
    color: var(--gray);
}


/* Applications List */
.application-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.application-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--light);
    border-radius: 8px;
    background: var(--white);
    gap: 10px;
    flex-wrap: wrap;
}

.application-item h4 {
    margin: 0 0 5px 0;
}

.application-item .company {
    margin: 0 0 3px 0;
    color: var(--secondary-color);
}

.application-item .date {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.my-application-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 15px;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--light);
    background: var(--white);
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.tab:hover {
    background: var(--light);
}

.tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}
.search-box input {
    padding: 8px 12px;
    border-radius: 25px;
    border: 1px solid var(--light);
    font-size: 14px;
    width: 300px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 2px var(--primary-color);
}

/* company jobs */
.company-layout {
    display: flex;
    gap: 24px;
}

.company-sidebar {
    width: 320px;
}

.company-card {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.company-jobs-list {
    flex: 1;
}


/* buttons */
.btn {
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.btn-view {
    border: 1px solid var(--primary-color);
    background: var(--white);
    color:var(--primary-color);
}

.btn-view:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-cancel {
    border:none;
    background: #f2f2f2;
    color: var(--secondary-color);
}
.btn-cancel:hover { 
    background: var(--light); 
}

.btn-submit {
    border:none;
    background: var(--primary-color);
    color: var(--white);
}
.btn-submit:hover { background: #005bb5; }

.btn-success {
  color: var(--white);
  background-color: var(--success);
  border-color: var(--success); 
}

.btn-info {
  color: var(--info);
  background-color: var(--light-blue);
  border: none; 
}

.btn-info:hover { color: var(--white); background: var(--info); }

.btn-danger {
  color: var(--white);
  background-color: var(--danger);
   border-color: var(--danger); 
}

/* table style */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.responsive-table th, 
.responsive-table td {
    border: 1px solid var(--light);
    padding: 10px;
    font-size: 14px;
}

.responsive-table th {
    background: var(--light);
    font-weight: 600;
}


/* Status Badges */
.status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: var(--white);
}

.in-review { background: var(--warning); }
.interview { background: #5bc0de; }
.applied { background: var(--secondary-color); }
.rejected { background: var(--danger); }
.offer-made { background: #ffc107; color: #212529;}
.offer-rejected {background: #d9534f; color: var(--white); }
.offer-accepted {background: var(--success); color: var(--white);  }
.hired { background: var(--primary-color); color: var(--white); }
.light { background: var(--light); color: var(--dark); }




/* Job Card */
.job-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--dark);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    background-color: var(--white);
    flex-wrap: wrap;
    margin-top: 15px;
}

.job-left {
    display: flex;
    gap: 15px;
}

.job-icon {
    background: var(--light);
    padding: 12px;
    border-radius: 10px;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-title {
    margin: 0;
    margin-bottom: 5px;
}

.job-meta,
.job-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.job-category {
    background: var(--dark);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    text-align: center;
}

.published-date {
    font-size: 12px;
    color: var(--gray);
}

.job-right {
    text-align: right;
}

.job-type {
    background: var(--gray);
    color: var(--white);
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 5px;
}

.job-location {
    display: block;
    font-size: 14px;
}

.job-id {
    font-size: 12px;
    color: #777;
}

.job-stats {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
}


.filter-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.filter-bar label {
    font-size: 13px;
    margin-bottom: 4px;
    display: block;
}

.filter-bar input {
    width: 100%;
    padding: 8px;
}

/* Status Pills */
.status-pill {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    color: var(--white);
    display: inline-block;
}

.status-pill.review { background: var(--warning); }
.status-pill.rejected { background: var(--danger); }
.status-pill.selected { background: var(--success); }


/* modal */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.4); 
    display: none; 
    justify-content: center; 
    align-items: center;
}
.modal-container {
    background: var(--white); 
    padding: 20px; 
    width: 400px; 
    border-radius: 8px;
}
.modal-header { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 10px; }
.modal-footer { 
    margin-top: 15px; 
    text-align: right; 
}

.modal-footer button { 
    padding: 6px 12px; 
    margin-left: 5px; 
}


/* search page */
.search-top-filter {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
}

.job-search-box, .company-select .work-type-select {
    padding: 10px;
    font-size: 15px;
    border: 1px solid var(--light);
    border-radius: 5px;
}

/* Content area layout */
.search-content-area {
    display: flex;
    gap: 20px;
}

/* search page sidebar */
.search-sidebar {
    width: 23%;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0px 0px 8px rgba(0,0,0,0.1);
}

.search-sidebar h3 { margin-bottom: 10px; }

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
}

.filter-item .count {
    margin-left: auto;
}

.filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-item:hover {
    background: var(--light);
    border-radius: 4px;
}


/* Arrow icon */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Default arrow (collapsed) */
.category-header .arrow::before {
    content: "▶";
    font-size: 16px;
}

/* When expanded */
.category-header.active .arrow::before {
    content: "▼";
}


/** jobs list **/
.jobs-list {
    width: 77%;
}

.job-card {
    display: inline-block;
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0px 0px 8px rgba(0,0,0,0.1);
    width: 100%;
}
.job-card-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.job-card-header h4 { margin: 0; font-size: 18px; }

.job-card .company {
    color:navy;
    font-size: 16px;
    margin: 5px 0;
}

.applied-badge {
    color: var(--success);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}


.apply-btn {
    padding: 8px 14px;
    border: none;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
}
.apply-btn:hover { background: #005bb5; }

.job-card-about{
    display: flex;
    gap: 26px;
    font-size: 14px;
    justify-content: flex-start;
    align-items: baseline;
}

.job-card-des{
    padding-top: inherit;
    color: var(--secondary-color);
}

.job-card-footer{
    margin-top: 10px;
    color: var(--dark);
    font-size: 12px;
    float: right;
}


/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ccc;
    text-decoration: none;
    border-radius: 5px;
    color: var(--gray);
}

.pagination a.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
.pagination a:hover { background: #005bb5; color: var(--white); }


/** responsive **/
@media (max-width: 600px) {
    .row {
        flex-direction: column;
    }

    /* my applications page*/
    .summary-cards {
        flex-direction: column;
    }
    .application-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .my-application-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box,
    .search-box input {
        width: 100%;
    }

    .status-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /** **/
    .filter-list {
        display: none;
        padding-top: 10px;
    }

    .filter-list.active {
        display: block;
    }

    .job-header-card { flex-direction: column; align-items: flex-start; }
    .job-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .search-top-filter { flex-direction: column; }
    .search-content-area { flex-direction: column; }
    .search-sidebar, .jobs-list { width: 100%; }
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .job-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    .company-layout {
        flex-direction: column;
    }

    .company-sidebar {
        width: 100%;
    }
}



/* For table */
@media (max-width: 768px) {
    .responsive-table, 
    .responsive-table thead, 
    .responsive-table tbody, 
    .responsive-table th, 
    .responsive-table td, 
    .responsive-table tr {
        display: block;
        width: 100%;
    }

    .responsive-table thead {
        display: none; /* hide headers */
    }

    .responsive-table tr {
        margin-bottom: 15px;
        background: var(--white);
        border: 1px solid var(--light);
        border-radius: 6px;
        padding: 10px;
    }

    .responsive-table td {
        border: none;
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        border-bottom: 1px solid var(--light);
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray);
    }
}


/* Desktop category expanded */
@media(min-width: 769px) {
    .category-header .arrow {
        display: none;
    }
    .filter-list {
        display: block !important;
    }
}