/* Pharmacists.ae - green theme inspired by thepharmacist.co.uk */
:root {
    --green: #1b7a4b;
    --green-dark: #145c39;
    --green-darker: #0f4a2e;
    --green-light: #e8f3ed;
    --ink: #1f2937;
    --muted: #6b7280;
    --border: #e3e8e5;
    --radius: 6px;
    --shadow: 0 2px 10px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { height: 100%; overflow-x: hidden; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #f7f9f8;
    line-height: 1.6;
    /* Sticky-footer layout: pushes the footer to the bottom on short pages */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.topbar, .site-header, .main-nav, .site-footer { flex: none; width: 100%; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: #f0f3f1; border-bottom: 1px solid var(--border); }
.topbar .container { text-align: center; font-size: 13px; color: var(--muted); padding: 6px 16px; }

/* Header */
.site-header { background: var(--green); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px; flex-wrap: wrap; gap: 10px; }
.logo { color: #fff; font-weight: 800; font-size: 24px; letter-spacing: .5px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { font-weight: 400; font-size: 16px; opacity: .85; vertical-align: super; }
.logo-ae { color: #cdeede; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.hi { color: #d9f0e4; font-size: 14px; }

.btn { display: inline-block; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; transition: background .15s ease, color .15s ease, transform .1s ease; }
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--green-dark); }
.btn-solid { background: var(--green-darker); color: #fff; }
.btn-solid:hover { background: #0a3a23; color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-lg { padding: 12px 26px; font-size: 14px; }

/* Nav */
.main-nav { background: var(--green-dark); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.nav-list { list-style: none; display: flex; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { color: #fff; display: block; padding: 14px 14px; font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.nav-list a:hover { background: var(--green-darker); text-decoration: none; }
.nav-search { display: flex; align-items: center; }
.nav-search input { border: none; padding: 7px 10px; border-radius: var(--radius) 0 0 var(--radius); font-size: 13px; }
.nav-search button { border: none; background: var(--green-darker); color: #fff; padding: 7px 12px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; padding: 10px; }

/* Page */
.page { padding: 28px 16px 48px; flex: 1 0 auto; width: 100%; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* Hero + grid */
.section-title { font-size: 20px; border-bottom: 3px solid var(--green); padding-bottom: 6px; margin: 28px 0 16px; }
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 10px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.card .thumb { transition: transform .3s ease; }
.card:hover .thumb { transform: scale(1.03); }
.card .thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: 14px 16px; }
.card .cat { color: var(--green); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.card h3 { margin: 6px 0; font-size: 17px; line-height: 1.3; }
.card h3 a { color: var(--ink); }
.card .meta { color: var(--muted); font-size: 12px; }
.card p { color: #444; font-size: 14px; margin: 8px 0 0; }
.hero .feature h2 { font-size: 26px; margin: 8px 0; }
.hero .feature h2 a { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.side-list { display: flex; flex-direction: column; gap: 14px; }
.side-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; transition: box-shadow .15s ease; }
.side-item:hover { box-shadow: var(--shadow); }
.side-item .cat { color: var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.side-item h4 { margin: 4px 0; font-size: 15px; }
.side-item h4 a { color: var(--ink); }

.content-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 30px; }

/* Single post */
.post-full { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); }
.post-full h1 { font-size: 30px; margin: 6px 0 10px; }
.post-full .post-meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.post-full .post-thumb { border-radius: var(--radius); margin: 16px 0; }
.post-full .post-body { font-size: 16px; line-height: 1.8; }
.post-full .post-body p { margin: 0 0 16px; }

/* Comments */
.comments { margin-top: 30px; }
.comment { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.comment .who { font-weight: 700; font-size: 14px; }
.comment .when { color: var(--muted); font-size: 12px; }
.login-prompt { background: var(--green-light); border: 1px solid #cfe6da; padding: 16px; border-radius: var(--radius); }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto; }
.form-card.wide { max-width: 920px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.req { color: #c0392b; font-style: italic; font-weight: 400; font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #c9d2cc; border-radius: var(--radius); font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-light); border-color: var(--green); }
textarea { min-height: 160px; resize: vertical; }
.help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.checks label, .radios label { font-weight: 400; display: flex; align-items: center; gap: 8px; }
.radios { display: flex; flex-direction: column; gap: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Progress (register) */
.progress { background: #e2e7e4; border-radius: 20px; height: 22px; margin: 8px 0 22px; overflow: hidden; }
.progress-bar { background: var(--green); height: 100%; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: width .3s; }
.step-label { font-size: 13px; color: var(--muted); }
.reg-step { display: none; }
.reg-step.active { display: block; }
.strength { height: 30px; background: #eef2f0; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }

/* Alerts */
.alert { padding: 16px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.alert-info.empty-state { text-align: center; padding: 48px 24px; font-size: 15px; }
.alert-error { background: #fdecea; color: #b03a2e; border: 1px solid #f5c6c0; }
.alert-success { background: #e8f6ee; color: #1b7a4b; border: 1px solid #bfe6cf; }
.alert-info { background: #eef3f7; color: #2c5777; border: 1px solid #cfe0ec; }

/* Footer */
.site-footer { background: var(--green-darker); color: #d8e8df; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 36px 16px; }
.footer-logo { font-size: 20px; color: #fff; margin-bottom: 10px; }
.footer-col h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #bfe0ce; font-size: 14px; }
.footer-bottom { background: #0a3a23; }
.footer-bottom .container { padding: 14px 16px; font-size: 13px; color: #9cc6ad; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.admin-sidebar { background: var(--green-dark); border-radius: var(--radius); padding: 14px; }
.admin-sidebar a { display: block; color: #d9f0e4; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--green-darker); color: #fff; text-decoration: none; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--green); }
.stat-card .lbl { color: var(--muted); font-size: 13px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
table.tbl th { background: var(--green-light); color: var(--green-darker); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #fef3cd; color: #8a6d1b; }
.badge-approved { background: #d8f1e2; color: #1b7a4b; }
.badge-rejected { background: #fde0dd; color: #b03a2e; }
.inline-form { display: inline; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }

/* CV Submission Page */
.cv-hero-banner { text-align: center; padding: 24px 0 8px; }
.cv-hero-icon { font-size: 48px; margin-bottom: 8px; }
.cv-hero-banner h1 { margin: 0 0 6px; font-size: 28px; }
.cv-hero-banner p { color: var(--muted); font-size: 15px; margin: 0; }
.cv-section-heading { font-size: 16px; color: var(--green-dark); border-left: 4px solid var(--green); padding-left: 12px; margin: 24px 0 12px; }
.cv-upload-zone {
    border: 2px dashed #c9d2cc; border-radius: var(--radius); padding: 36px 20px; text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s; position: relative; background: #fafcfb;
}
.cv-upload-zone:hover, .cv-upload-zone.dragover { border-color: var(--green); background: var(--green-light); }
.cv-upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cv-upload-icon { font-size: 36px; margin-bottom: 6px; }
.cv-upload-zone p { margin: 4px 0; font-size: 14px; color: var(--muted); }
.cv-file-name { font-size: 13px; color: var(--green-dark); font-weight: 700; margin-top: 8px; }

/* Admin CV Management */
.cv-filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.cv-filter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cv-filter-form input, .cv-filter-form select { font-size: 13px; padding: 8px 10px; border: 1px solid #c9d2cc; border-radius: var(--radius); }
.cv-search-input { flex: 1; min-width: 180px; }
.cv-bulk-bar { background: var(--green-light); border: 1px solid #bfe6cf; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.cv-bulk-bar select { font-size: 13px; padding: 6px 8px; border: 1px solid #c9d2cc; border-radius: var(--radius); }
.cv-table td { font-size: 13px; }
.cv-actions { white-space: nowrap; display: flex; gap: 6px; }
.cv-detail-card { background: #fafcfb; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.cv-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cv-detail-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--green-dark); }
.cv-detail-card p { margin: 4px 0; font-size: 13px; }
.cv-cover-letter { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 13px; line-height: 1.6; max-height: 160px; overflow-y: auto; }
.cv-detail-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge-cv-new { background: #dbeafe; color: #1e40af; }
.badge-cv-reviewed { background: #fef3cd; color: #8a6d1b; }
.badge-cv-shortlisted { background: #d8f1e2; color: #1b7a4b; }
.badge-cv-rejected { background: #fde0dd; color: #b03a2e; }

/* Jobs */
.jobs-hero { background: var(--green-light); border: 1px solid #cfe6da; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; text-align: center; }
.jobs-hero h1 { margin: 0 0 6px; font-size: 26px; color: var(--green-darker); }
.jobs-hero p { margin: 0; color: var(--muted); }
.jobs-list { display: flex; flex-direction: column; gap: 16px; }
.job-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; transition: box-shadow .15s ease, transform .15s ease; }
.job-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.10); transform: translateY(-2px); }
.job-card-main { flex: 1; min-width: 0; }
.job-card h2 { margin: 0 0 8px; font-size: 19px; }
.job-card h2 a { color: var(--ink); }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.job-chip { display: inline-block; background: var(--green-light); color: var(--green-darker); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.job-excerpt { color: #444; font-size: 14px; margin: 10px 0 6px; }
.job-posted { color: var(--muted); font-size: 12px; margin: 0; }
.job-card-side { flex: none; }
.badge-job-open { background: #d8f1e2; color: #1b7a4b; }
.badge-job-closed { background: #fde0dd; color: #b03a2e; }
.badge-job-draft { background: #e5e7eb; color: #4b5563; }
.badge-app-new { background: #dbeafe; color: #1e40af; }
.badge-app-reviewed { background: #fef3cd; color: #8a6d1b; }
.badge-app-shortlisted { background: #d8f1e2; color: #1b7a4b; }
.badge-app-rejected { background: #fde0dd; color: #b03a2e; }
.badge-app-hired { background: #cffafe; color: #0e7490; }

@media (max-width: 880px) {
    .hero, .grid, .content-grid, .form-row, .footer-inner, .stat-cards, .admin-layout, .checks { grid-template-columns: 1fr; }
    .nav-list { display: none; flex-direction: column; width: 100%; }
    .nav-list.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-inner { flex-wrap: wrap; }
    .nav-search { margin: 8px 0; width: 100%; flex: 1 0 100%; }
    .nav-search form { width: 100%; }
    .nav-search input { flex: 1; min-width: 0; }
    .logo { font-size: 20px; }
    .header-inner { padding: 12px; }
    .btn { font-size: 12px; padding: 7px 12px; }
    .page { padding: 18px 12px 36px; }
    .container { padding: 0 12px; }
    .form-card, .form-card.wide { padding: 18px 14px; margin: 0 -4px; border-radius: 0; border-left: none; border-right: none; }
    .form-actions { flex-wrap: wrap; }
    .hero .feature h2 { font-size: 22px; }
    .post-full { padding: 18px 14px; }
    .post-full h1 { font-size: 24px; }
    .checks { grid-template-columns: 1fr; }
    .side-item { word-break: break-word; }
    .cv-detail-grid { grid-template-columns: 1fr; }
    .cv-filter-form { flex-direction: column; }
    .cv-search-input { min-width: 100%; }
    .cv-actions { flex-wrap: wrap; }
    .cv-table { font-size: 12px; }
    .cv-bulk-bar { flex-wrap: wrap; }
    .job-card { flex-direction: column; align-items: stretch; }
    .job-card-side .btn { width: 100%; text-align: center; }
}

@media (max-width: 400px) {
    .header-inner { justify-content: center; }
    .header-actions { width: 100%; justify-content: center; }
    .logo { font-size: 18px; }
}
