/* =========================
   ACCESSIBILITY ASSISTIVE TOUCH
========================= */

.access {
    width: 58px;
    height: 58px;

    padding: 0;

    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 1000;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #2873ed,
            #1559d5
        );

    color: #ffffff;

    box-shadow:
        0 10px 28px rgba(21, 89, 213, .32),
        0 0 0 5px rgba(21, 89, 213, .08);

    font-size: 24px;

    cursor: grab;

    touch-action: none;
    user-select: none;

    transition:
        background .2s,
        box-shadow .2s,
        transform .2s,
        left .25s ease,
        right .25s ease;
}

.access:hover {
    background:
        linear-gradient(
            145deg,
            #1e65dc,
            #0f3e9c
        );

    box-shadow:
        0 13px 32px rgba(21, 89, 213, .38),
        0 0 0 7px rgba(21, 89, 213, .10);

    transform: scale(1.05);
}

.access:active,
.access.dragging {
    cursor: grabbing;

    transform: scale(.95);
}


/* =========================
   ACCESSIBILITY PANEL
========================= */

.access-panel {
    width: 310px;

    padding: 20px;

    position: fixed;

    right: 90px;
    bottom: 20px;

    z-index: 999;

    background: rgba(255, 255, 255, .97);

    border: 1px solid var(--line);
    border-radius: 18px;

    box-shadow:
        0 20px 55px rgba(16, 38, 76, .22);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.access-panel[hidden] {
    display: none;
}


/* =========================
   PANEL HEADER
========================= */

.access-panel-header {
    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.access-panel-header small {
    color: var(--blue);

    font-size: 10px;

    letter-spacing: .14em;
}

.access-panel-header h2 {
    margin: 3px 0 0;

    color: var(--navy);

    font-size: 22px;
}

.access-panel .access-close {
    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: var(--muted);

    font-size: 24px;

    cursor: pointer;
}

.access-panel .access-close:hover {
    background: #eef4ff;
    color: var(--blue);
}


/* =========================
   ACCESSIBILITY OPTION ROW
========================= */

.access-option {
    min-height: 55px;

    padding: 10px 4px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-bottom: 1px solid var(--line);
}

/* =========================
   ACCESSIBILITY LANGUAGE
========================= */

.access-language {
  min-height:60px;
  padding:11px 4px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;

  border-bottom:1px solid var(--line);
}

.access-language-buttons {
  display:flex;
  align-items:center;
  gap:6px;

  color:var(--line);
}

.access-language-buttons button {
  width:auto;
  min-width:38px;
  height:32px;

  padding:0 5px;

  border:0;
  border-radius:7px;

  background:transparent;
  color:var(--muted);

  font-size:12px;
  font-weight:800;

  cursor:pointer;
  transition:.2s;
}

.access-language-buttons button:hover {
  background:#eef4ff;
  color:var(--blue);
}

.access-language-buttons button.active {
  background:#e8f1ff;
  color:var(--blue);
}

body.dark .access-language-buttons button {
  color:var(--muted);
}

body.dark .access-language-buttons button:hover,
body.dark .access-language-buttons button.active {
  background:#243a5d;
  color:#8eb7ff;
}

.access-option-text {
    display: flex;
    align-items: center;
    gap: 11px;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;
}

.access-option-icon {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: #eef4ff;
    color: var(--blue);

    font-size: 13px;
    font-weight: 800;
}


/* =========================
   IOS STYLE TOGGLE
========================= */

.toggle-switch {
    width: 46px;
    height: 26px;

    padding: 3px;

    position: relative;

    flex: 0 0 auto;

    border: 0;
    border-radius: 30px;

    background: #cbd5e1;

    cursor: pointer;

    transition: .25s;
}

.toggle-switch span {
    width: 20px;
    height: 20px;

    display: block;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgba(15, 35, 63, .22);

    transform: translateX(0);

    transition: .25s;
}

.toggle-switch.active {
    background: var(--blue);
}

.toggle-switch.active span {
    transform: translateX(20px);
}


/* =========================
   FONT SIZE
========================= */

.font-size-section {
    padding: 16px 4px 8px;
}

.font-size-heading {
    margin-bottom: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.font-size-heading small {
    color: var(--blue);

    font-size: 11px;

    letter-spacing: 0;
}

.font-size-controls {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 10px;
}

.font-size-controls button {
    width: 42px;
    height: 36px;

    padding: 0;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: #f5f8fc;
    color: var(--navy);

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.font-size-controls button:hover {
    border-color: var(--blue);

    background: #eef4ff;
    color: var(--blue);
}

.font-size-bar {
    height: 6px;

    overflow: hidden;

    border-radius: 20px;

    background: #dfe7f1;
}

.font-size-bar span {
    width: 40%;
    height: 100%;

    display: block;

    border-radius: 20px;

    background: var(--blue);

    transition: .25s;
}


/* =========================
   RESET
========================= */

.access-reset {
    width: 100%;

    margin-top: 16px;
    padding: 11px 14px;

    border: 1px solid #dfe7f1;
    border-radius: 9px;

    background: #f5f8fc;
    color: var(--muted);

    font-weight: 700;

    cursor: pointer;

    transition: .2s;
}

.access-reset:hover {
    border-color: #efbebe;

    background: #fff1f1;
    color: #b83232;
}


/* =========================
   OPENDYSLEXIC MODE
========================= */

body.dyslexia,
body.dyslexia button,
body.dyslexia input,
body.dyslexia select,
body.dyslexia textarea {
    font-family:
        "OpenDyslexic",
        Arial,
        sans-serif;
}

body.dyslexia {
    letter-spacing: .035em;
    word-spacing: .08em;
    line-height: 1.8;
}

body.dyslexia p,
body.dyslexia li,
body.dyslexia label,
body.dyslexia span,
body.dyslexia a {
    line-height: 1.8;
}

body.dyslexia h1,
body.dyslexia h2,
body.dyslexia h3 {
    line-height: 1.4;

    letter-spacing: .02em;
}


/* =========================
   OTHER ACCESSIBILITY INPUT
========================= */

.accessibility-other {
    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--line);
}

.accessibility-other label {
    margin: 0 0 8px;

    color: var(--navy);

    font-weight: 700;
}

.accessibility-other input {
    width: 100%;

    margin: 0;

    background: var(--card);
}

.accessibility-other small {
    display: block;

    margin-top: 7px;

    color: var(--muted);

    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}


/* =========================
   DARK MODE
========================= */

body.dark {
    --bg: #0d1728;
    --card: #16233a;
    --text: #eef3fb;
    --muted: #b8c4d6;
    --navy: #ffffff;
    --line: #314159;

    background: var(--bg);
    color: var(--text);
}

body.dark .site-header,
body.dark footer {
    background: var(--card);

    border-color: var(--line);
}

body.dark .hero,
body.dark .jobs-hero,
body.dark .about-hero,
body.dark .formpage {
    background:
        linear-gradient(
            120deg,
            #101d32,
            #0d1728
        );
}

body.dark .about-section,
body.dark .benefits-section,
body.dark .steps-section {
    background: var(--bg);
}

body.dark :is(
    .panel,
    .steps article,
    .benefit-grid article,
    .about-highlight,
    .about-value,
    .team-member,
    .about-quote,
    .job-list article,
    .no-job-results,
    .conversation-panel,
    .conversation-item,
    .chat-page,
    .chat-form,
    .message-bubble,
    .applicant-profile-card,
    .profile-info-grid div,
    .job-details-header,
    .job-detail-section,
    .job-details-sidebar section,
    .dashboard-stat-card,
    .dashboard-message-card,
    .employer-job-card,
    .employer-nav,
    .formpage form,
    .invalid-reset-card
) {
    background: var(--card);
    color: var(--text);

    border-color: var(--line);
}

body.dark :is(
    h1,
    h2,
    h3,
    h4,
    strong,
    b,
    label,
    legend
) {
    color: var(--navy);
}

body.dark :is(
    p,
    li,
    time,
    .salary,
    .conversation-preview,
    .job-overview-item span
) {
    color: var(--muted);
}

body.dark input,
body.dark select,
body.dark textarea {
    background: #101d32;
    color: var(--text);

    border-color: var(--line);
}

body.dark input::placeholder,
body.dark textarea::placeholder {
    color: #8493a8;
}

body.dark .btn.light,
body.dark .outline {
    background: #1c2b45;
    color: #8cb7ff;

    border-color: #45658f;
}

body.dark mark,
body.dark .job-required-skills span,
body.dark .skill-list span,
body.dark .profile-status {
    background: #243653;
    color: #9fc1ff;
}

body.dark .steps b {
    color: var(--blue);
}

body.dark .access-panel {
    background: rgba(22, 35, 58, .98);
    color: var(--text);

    border-color: var(--line);
}

body.dark .access-option-icon {
    background: #243653;
}

body.dark .font-size-controls button,
body.dark .access-reset {
    background: #1c2b45;
    color: var(--text);

    border-color: var(--line);
}

body.dark .font-size-bar {
    background: #314159;
}

body.dark .access-option,
body.dark .font-size-section {
    border-color: var(--line);
}

body.dark .chat-messages {
    background: #0f1b2e;
}

body.dark .chat-application-info {
    background: #101d32;
}

body.dark .conversation-item:hover {
    background: #1c2b45;
}

body.dark .conversation-item.has-unread {
    background: #20314e;
}

body.dark .search-box {
    background: var(--card);

    border-color: var(--line);
}

body.dark .search-box input,
body.dark .search-box select {
    background: transparent;
}

body.dark .about-story p {
    color: var(--muted);
}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {


.hero {
        padding-top: 55px;

        grid-template-columns: 1fr;

        gap: 40px;
    }

    .hero-copy {
        margin: 0 auto;

        text-align: center;
    }

    .hero-buttons,
    .hero-points {
        justify-content: center;
    }

    .hero-image {
        max-width: 720px;
        height: 340px;

        margin: 0 auto;
    }

    .benefit-grid,
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-box {
        max-width: 760px;
    }

    .job-details-header {
        grid-template-columns: auto 1fr;
    }

    .job-details-action {
        grid-column: 1 / -1;

        width: 100%;
    }

    .job-details-layout {
        grid-template-columns: 1fr;
    }

    .employer-job-card {
        grid-template-columns: 1fr;
    }

    .employer-job-actions {
        justify-content: flex-start;
    }
}


/* =========================
   PHONE
========================= */

@media (max-width: 650px) {

    body {
        overflow-x: hidden;
    }


/* HERO */

    .hero {
        min-height: auto;

        padding: 48px 20px 70px;

        gap: 32px;
    }

    .hero h1 {
        font-size: clamp(38px, 12vw, 44px);

        line-height: 1.08;
    }

    .hero-copy > p {
        font-size: 16px;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;

        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-points {
        flex-direction: column;

        gap: 5px;
    }

    .hero-image {
        width: 100%;
        height: 235px;

        border-radius: 16px;
    }


    /* SECTIONS */

    .benefits-section,
    .steps-section {
        padding: 65px 20px;
    }

    .section-title h2 {
        font-size: 29px;
    }

    .benefit-grid,
    .steps,
    .three,
    .stats,
    .about-values,
    .team-grid {
        grid-template-columns: 1fr;
    }


    /* ABOUT */

    .about-hero {
        padding: 55px 20px;
    }

    .about-hero h1 {
        font-size: 38px;
    }

    .about-section {
        padding: 60px 20px;
    }

    .about-highlight {
        padding: 30px 22px;
    }

    .about-highlight h2 {
        font-size: 28px;
    }

    .team-photo {
        width: 130px;
        height: 130px;
    }

    .team-member h3 {
        min-height: auto;
    }


    /* CTA */

    .cta {
        margin: 0 20px 45px;
        padding: 32px 25px;

        display: block;
    }

    .cta .btn {
        width: 100%;

        margin-top: 15px;
    }


    /* JOBS */

    .jobs-hero {
        padding: 50px 20px 40px;
    }

    .jobs-hero h1 {
        font-size: 36px;

        line-height: 1.15;
    }

    .search-box {
        padding: 12px;

        flex-wrap: wrap;

        gap: 10px;
    }

    .search-box > span {
        display: none;
    }

    .search-box input,
    .search-box select {
        width: 100%;
        min-width: 100%;

        flex: 1 1 100%;

        padding: 13px;

        border: 1px solid var(--line);
        border-radius: 8px;

        background: #ffffff;
    }

    .search-box input:focus,
    .search-box select:focus {
        border: 1px solid var(--blue);

        box-shadow:
            0 0 0 3px rgba(21, 89, 213, .12);
    }

    .search-box .btn {
        width: 100%;
        min-width: 100%;
    }

    .jobs-layout {
        padding: 40px 20px 65px;
    }

    .result-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .job-list article {
        grid-template-columns: 1fr;

        align-items: stretch;
    }

    .job-list article > form,
    .job-list article > .btn {
        width: 100%;

        grid-column: 1 / -1;
    }

    .job-list form .btn,
    .job-list article > .btn {
        width: 100%;
    }


    /* FORM */

    .formpage {
        padding: 40px 16px;
    }

    .formpage form {
        padding: 28px 22px;
    }

    .formpage h1 {
        font-size: 30px;
    }


    /* DASHBOARD */

    .dashboard {
        padding: 35px 18px 60px;
    }

    .welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-actions {
        width: 100%;

        flex-wrap: wrap;
    }

    .table > div,
    .jobrow {
        grid-template-columns: 1fr;
    }

    #jobForm {
        grid-template-columns: 1fr;
    }

    #jobForm .full {
        grid-column: 1;
    }

    .company-profile-form {
        grid-template-columns: 1fr;
    }

    .company-profile-form .full {
        grid-column: 1;
    }

    .dashboard-stat-card {
        min-height: 170px;

        padding: 25px;
    }

    .stat-card-action {
        opacity: 1;

        transform: none;
    }


    /* PROFILE */

    .applicant-profile-page {
        padding: 35px 18px 60px;
    }

    .applicant-profile-card {
        padding: 24px;
    }

    .applicant-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        align-items: stretch;
        flex-direction: column;

        gap: 12px;
    }

    .action-chat {
        width: 100%;
        min-width: 0;
    }

    .decision-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .decision-buttons form,
    .decision-buttons .btn {
        width: 100%;
        min-width: 0;
    }


    /* MESSAGES */

    .message-badge {
        top: -4px;
        right: -7px;
    }

    .messages-page {
        padding: 35px 18px 60px;
    }

    .messages-page-header,
    .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .messages-page-header .btn,
    .chat-header .btn {
        width: 100%;
    }

    .conversation-item {
        padding: 17px;

        grid-template-columns: auto 1fr;
    }

    .conversation-avatar {
        width: 48px;
        height: 48px;
    }

    .conversation-name-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 3px;
    }

    .conversation-preview {
        max-width: 190px;
    }

    .chat-messages {
        height: 400px;

        padding: 15px;
    }

    .message-bubble {
        max-width: 86%;
    }

    .chat-input-row {
        grid-template-columns: 1fr;
    }

    .chat-input-row .btn {
        width: 100%;
    }


    /* JOB DETAILS */

    .job-details-page {
        padding: 30px 18px 70px;
    }

    .job-details-header {
        padding: 24px 20px;

        grid-template-columns: 1fr;
    }

    .job-company-logo {
        width: 70px;
        height: 70px;
    }

    .job-details-heading h1 {
        font-size: 28px;
    }

    .job-details-action {
        grid-column: auto;

        width: 100%;
    }

    .job-detail-section,
    .job-details-sidebar section {
        padding: 24px 20px;
    }


    /* EMPLOYER JOBS */

    .employer-job-card {
        padding: 20px;

        grid-template-columns: 1fr;
    }

    .employer-job-actions {
        display: grid;
        grid-template-columns: 1fr;

        width: 100%;
    }

    .employer-job-actions .btn,
    .employer-job-actions form {
        width: 100%;
    }


    /* FOOTER */

    footer {
        display: block;

        text-align: center;
    }

    footer span {
        display: block;

        margin-top: 15px;
    }


    /* ACCESSIBILITY */

    .access {
        width: 54px;
        height: 54px;

        right: 16px;
        bottom: 16px;

        font-size: 22px;
    }

    .access-panel {
        width: calc(100vw - 30px);

        max-height: calc(100vh - 30px);

        left: 15px;
        right: auto;

        bottom: 15px;

        overflow-y: auto;
    }
}


/* =========================
   EXTRA SMALL PHONE
========================= */

@media (max-width: 420px) {
.hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-image {
        height: 210px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .benefit-grid article {
        padding: 24px;
    }

    .decision-buttons {
        grid-template-columns: 1fr;
    }

    .conversation-item {
        grid-template-columns: 1fr;
    }

    .conversation-avatar {
        margin-bottom: 5px;
    }

    .conversation-preview {
        max-width: 100%;
    }

    .message-bubble {
        max-width: 92%;
    }
}

/* =========================================================
   RESPONSIVE HEADER
========================================================= */

@media (max-width: 1150px) {

    .header-container {
        grid-template-columns:
            1fr auto;

        min-height: auto;

        padding: 14px 24px;

        gap: 15px;
    }

    .main-nav {
        grid-column: 1 / -1;

        grid-row: 2;

        width: 100%;
        height: 50px;

        border-top: 1px solid var(--line);

        gap: 30px;
    }

    .main-nav a {
        height: 50px;

        font-size: 14px;
    }

    .header-right {
        gap: 10px;
    }

    .language-switcher {
        height: 44px;
        padding: 7px 10px;
    }

    .header-login,
    .header-register {
        min-width: auto;
        height: 44px;

        padding: 0 15px;
    }

}


@media (max-width: 720px) {

    .header-container {
        display: flex;
        flex-wrap: wrap;

        padding: 12px 16px;

        gap: 12px;
    }


    /* LOGO */

    .logo {
        flex: 1;

        font-size: 17px;
    }

    .logo img {
        width: 42px;
        height: 42px;
    }


    /* RIGHT */

    .header-right {
        display: flex;

        gap: 8px;
    }


    /* LANGUAGE */

    .language-switcher {
        min-width: auto;
        height: 42px;
        padding: 7px 9px;
        font-size: 11px;
    }

	.account-links {
	  display:flex;
	  align-items:center;
	  gap:7px;
	}

	.header-login,
	.header-register {
	  min-width:auto;
	  height:40px;
	  padding:0 12px;

	  font-size:12px;
	  border-radius:9px;
	}

    /* NAV */

    .main-nav {
        width: 100%;
        height: 46px;

        order: 3;

        overflow-x: auto;

        justify-content: center;

        gap: 24px;

        border-top: 1px solid var(--line);

        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        height: 46px;

        flex: 0 0 auto;

        font-size: 13px;
    }

    /* Akaun login mempunyai lebih banyak menu. Kekalkan titik mula
       di sebelah kiri supaya semua pautan boleh dicapai dengan scroll. */
    body:has(.message-nav-link) .main-nav {
        justify-content: flex-start;
    }

}


@media (max-width: 420px) {

    .logo span {
        font-size: 14px;
    }

    .logo img {
        width: 38px;
        height: 38px;
    }

    .language-switcher {
        padding: 6px 8px;
        font-size: 10px;
    }

}

/* PHONE HEADER ACCOUNT BUTTONS */

@media(max-width:520px) {

  .header-container {
    padding:10px 12px;
  }

  .logo {
    flex:0 0 auto;
    gap:7px;
    margin-right:auto;
  }

  .logo img {
    width:36px;
    height:36px;
  }

  .logo span {
    display:inline-block;
    font-size:12px;
    line-height:1;
    white-space:nowrap;
  }

  .account-links {
    display:flex;
    flex:0 0 auto;
    margin-left:auto;
  }

  .main-nav {
    flex:0 0 100%;
  }

  .header-login,
  .header-register {
    height:36px;
    padding:0 9px;
    font-size:10px;
  }

}

@media(max-width:360px) {

  .logo img {
    width:32px;
    height:32px;
  }

  .logo span {
    font-size:10px;
  }

  .header-login,
  .header-register {
    padding:0 7px;
    font-size:9px;
  }

}
