/* ============================================================
   Popcorns HireFlow - Main Stylesheet
   Colors: Purple (#8b3ffb), Sand (#fbece1), White, Dark (#2d2d3a)
   Fonts: Manrope (body), Roboto Serif (headings)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Roboto+Serif:wght@400;500;600;700&display=swap');

:root {
    --hf-purple: #8b3ffb;
    --hf-purple-dark: #6a2fc7;
    --hf-purple-light: #b07aff;
    --hf-purple-bg: #f3eeff;
    --hf-sand: #fbece1;
    --hf-sand-dark: #f0d9c8;
    --hf-gold: #ffc107;
    --hf-dark: #2d2d3a;
    --hf-gray: #6b7280;
    --hf-gray-light: #f0f0f5;
    --hf-white: #ffffff;
    --hf-success: #2A9D8F;
    --hf-danger: #E76F51;
    --hf-warning: #ffa726;
    --hf-border: #e5e5ec;
    --hf-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --hf-shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --hf-radius: 12px;
    --hf-radius-sm: 8px;
    --hf-radius-lg: 20px;
    --hf-sidebar-width: 250px;
    --hf-header-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 14px; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--hf-sand);
    color: var(--hf-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
    font-family: 'Roboto Serif', Georgia, serif;
    font-weight: 700;
    color: var(--hf-dark);
    line-height: 1.3;
}

h1 { font-size: 1.85rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
h4 { font-size: 1rem; }

a { color: var(--hf-purple); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--hf-purple-dark); }

/* ============================================================
   LAYOUT - Sidebar + Main
   ============================================================ */

.hf-layout {
    display: flex;
    min-height: 100vh;
}

.hf-sidebar {
    width: var(--hf-sidebar-width);
    background: var(--hf-dark);
    color: var(--hf-white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.hf-sidebar-logo {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hf-sidebar-logo .logo-icon {
    width: 34px;
    height: 34px;
    background: var(--hf-purple);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--hf-white);
}

.hf-sidebar-logo .logo-text {
    font-family: 'Roboto Serif', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--hf-white);
}

.hf-sidebar-logo .logo-text small {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

.hf-sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.hf-nav-section {
    padding: 0 16px;
    margin-bottom: 8px;
}

.hf-nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 8px 12px 6px;
}

.hf-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--hf-radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.hf-nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--hf-white);
}

.hf-nav-link.active {
    background: var(--hf-purple);
    color: var(--hf-white);
}

.hf-nav-link .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.8;
}

.hf-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.hf-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hf-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hf-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--hf-white);
}

.hf-user-info { flex: 1; min-width: 0; }

.hf-user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--hf-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hf-user-info .role {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
}

/* Main content area */
.hf-main {
    flex: 1;
    margin-left: var(--hf-sidebar-width);
    min-height: 100vh;
}

.hf-header {
    height: var(--hf-header-height);
    background: var(--hf-white);
    border-bottom: 1px solid var(--hf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.hf-header-title {
    font-family: 'Roboto Serif', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hf-dark);
}

.hf-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hf-content {
    padding: 28px 32px;
    max-width: 1400px;
}

/* ============================================================
   CARDS
   ============================================================ */

.hf-card {
    background: var(--hf-white);
    border-radius: var(--hf-radius);
    box-shadow: var(--hf-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.hf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hf-border);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.hf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--hf-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.hf-btn-primary {
    background: var(--hf-purple);
    color: var(--hf-white);
}
.hf-btn-primary:hover { background: var(--hf-purple-dark); color: var(--hf-white); }

.hf-btn-secondary {
    background: var(--hf-gold);
    color: var(--hf-dark);
}
.hf-btn-secondary:hover { background: #e6ac00; color: var(--hf-dark); }

.hf-btn-outline {
    background: transparent;
    color: var(--hf-purple);
    border: 1.5px solid var(--hf-purple);
}
.hf-btn-outline:hover { background: var(--hf-purple-bg); }

.hf-btn-ghost {
    background: transparent;
    color: var(--hf-gray);
    border: 1.5px solid var(--hf-border);
}
.hf-btn-ghost:hover { background: var(--hf-gray-light); color: var(--hf-dark); }

.hf-btn-sm { padding: 6px 14px; font-size: 12px; }
.hf-btn-lg { padding: 12px 28px; font-size: 14px; }

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

/* ============================================================
   FORMS
   ============================================================ */

.hf-form-group {
    margin-bottom: 16px;
}

.hf-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--hf-dark);
    margin-bottom: 5px;
}

.hf-input,
.hf-select,
.hf-textarea {
    width: 100%;
    padding: 9px 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: var(--hf-dark);
    background: var(--hf-white);
    border: 1.5px solid var(--hf-border);
    border-radius: var(--hf-radius-sm);
    transition: all 0.2s;
    outline: none;
}

.hf-input:focus, .hf-select:focus, .hf-textarea:focus {
    border-color: var(--hf-purple);
    box-shadow: 0 0 0 3px rgba(139, 63, 251, 0.1);
}

.hf-input:disabled, .hf-select:disabled, .hf-textarea:disabled {
    background: var(--hf-gray-light);
    color: #999;
    cursor: not-allowed;
}

.hf-textarea { resize: vertical; min-height: 80px; }

.hf-select { height: auto; }

/* ============================================================
   TABLES
   ============================================================ */

.hf-table {
    width: 100%;
    border-collapse: collapse;
}

.hf-table thead th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hf-gray);
    padding: 10px 14px;
    border-bottom: 2px solid var(--hf-border);
    text-align: left;
}

.hf-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hf-border);
    font-size: 13px;
    vertical-align: middle;
}

.hf-table tbody tr:hover {
    background: rgba(139, 63, 251, 0.02);
}

.hf-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   STATS / DASHBOARD CARDS
   ============================================================ */

.hf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.hf-stat-card {
    background: var(--hf-white);
    border-radius: var(--hf-radius);
    padding: 22px;
    box-shadow: var(--hf-shadow);
}

.hf-stat-card .stat-value {
    font-family: 'Roboto Serif', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--hf-dark);
    line-height: 1.1;
}

.hf-stat-card .stat-label {
    font-size: 12px;
    color: var(--hf-gray);
    margin-top: 4px;
}

.hf-stat-card .stat-icon {
    float: right;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ============================================================
   JOB OFFER FORM (preserved structure, modernized styling)
   ============================================================ */

.hf-offer-form .section-title {
    font-family: 'Roboto Serif', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hf-purple);
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hf-purple-bg);
}

.hf-offer-form .form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.hf-offer-form .form-table td {
    padding: 5px 6px;
    vertical-align: middle;
    font-size: 12px;
}

.hf-offer-form .form-table td:first-child {
    white-space: nowrap;
    padding-right: 12px;
    color: var(--hf-gray);
    font-weight: 500;
    width: 160px;
}

.hf-offer-form .form-table td:nth-child(2) { width: 30%; }
.hf-offer-form .form-table td:last-child { width: auto; }

.hf-offer-form .form-table input,
.hf-offer-form .form-table select,
.hf-offer-form .form-table textarea {
    width: 100%;
    padding: 7px 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 12.5px;
    color: var(--hf-dark);
    background: var(--hf-white);
    border: 1.5px solid var(--hf-border);
    border-radius: 6px;
    transition: all 0.2s;
    outline: none;
}

.hf-offer-form .form-table input:focus,
.hf-offer-form .form-table textarea:focus {
    border-color: var(--hf-purple);
    box-shadow: 0 0 0 2px rgba(139, 63, 251, 0.08);
}

.hf-offer-form .form-table input:disabled,
.hf-offer-form .form-table textarea:disabled,
.hf-offer-form .form-table select:disabled {
    background: #f5f5f8;
    color: #bbb;
    border-color: #e8e8ec;
}

.hf-offer-form .disabled-row {
    background: #fafafa;
}

.hf-offer-form .disabled-row td { color: #bbb; }

.hf-offer-form textarea { resize: vertical; min-height: 90px; }

/* ============================================================
   NOTIFICATIONS / TOAST
   ============================================================ */

.hf-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 14px 22px;
    border-radius: var(--hf-radius-sm);
    color: var(--hf-white);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--hf-shadow-lg);
    animation: hf-slideIn 0.3s ease;
    max-width: 400px;
}

.hf-toast-success { background: var(--hf-success); }
.hf-toast-error { background: var(--hf-danger); }
.hf-toast-info { background: var(--hf-purple); }

@keyframes hf-slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.hf-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hf-sand) 0%, var(--hf-purple-bg) 100%);
}

.hf-login-box {
    width: 100%;
    max-width: 400px;
    background: var(--hf-white);
    border-radius: var(--hf-radius-lg);
    box-shadow: var(--hf-shadow-lg);
    padding: 44px 36px;
    text-align: center;
}

.hf-login-box .login-logo {
    margin-bottom: 28px;
}

.hf-login-box .login-logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--hf-purple);
    border-radius: 16px;
    font-size: 24px;
    font-weight: 800;
    color: var(--hf-white);
    margin-bottom: 12px;
}

.hf-login-box .login-logo h1 {
    font-family: 'Roboto Serif', serif;
    font-size: 1.4rem;
    color: var(--hf-dark);
}

.hf-login-box .login-logo p {
    font-size: 12px;
    color: var(--hf-gray);
    margin-top: 4px;
}

.hf-login-box .login-error {
    background: #fef2f2;
    color: var(--hf-danger);
    padding: 10px 14px;
    border-radius: var(--hf-radius-sm);
    font-size: 12px;
    margin-bottom: 16px;
    border: 1px solid #fee2e2;
}

.hf-login-box .hf-form-group { text-align: left; }

.hf-login-box .hf-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
    margin-top: 8px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.hf-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--hf-gray);
}

.hf-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.hf-empty p { font-size: 14px; margin-bottom: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .hf-sidebar { display: none; }
    .hf-main { margin-left: 0; }
    .hf-content { padding: 16px; }
    .hf-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hf-offer-form .form-table td:first-child { display: none; }
    .hf-offer-form .form-table td:nth-child(2) { width: 35%; }
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-purple { color: var(--hf-purple); }
.text-gray { color: var(--hf-gray); }
.text-success { color: var(--hf-success); }
.text-danger { color: var(--hf-danger); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* v1.71 Tab sections for Create Offer */
.hf-tabs-nav { display:flex; gap:2px; background:#f5f5f8; border-radius:12px 12px 0 0; padding:4px 4px 0; overflow-x:auto; position:sticky; top:0; z-index:50; }
.hf-tab-btn { padding:10px 16px; border:none; background:transparent; cursor:pointer; font-family:inherit; font-size:12px; font-weight:600; color:var(--hf-gray); border-radius:8px 8px 0 0; transition:all 0.2s; white-space:nowrap; display:flex; align-items:center; gap:6px; }
.hf-tab-btn:hover { background:rgba(255,255,255,0.7); color:var(--hf-dark); }
.hf-tab-btn.active { background:#fff; color:var(--hf-purple); box-shadow:0 -2px 0 var(--hf-purple) inset; }
.hf-tab-btn .tab-icon { font-size:14px; }
.hf-tab-panel { display:none; padding:24px; background:#fff; border-radius:0 0 12px 12px; border:1px solid var(--hf-border); border-top:none; }
.hf-tab-panel.active { display:block; }
.hf-tab-next { display:flex; justify-content:flex-end; margin-top:16px; padding-top:12px; border-top:1px solid var(--hf-border); }
/* Searchable select wrapper */
.hf-search-select { position:relative; }
.hf-search-select input[type="text"] { width:100%; padding:8px 12px; border:1px solid var(--hf-border); border-radius:8px; font-size:13px; }
.hf-search-select select { position:absolute; top:100%; left:0; right:0; z-index:10; max-height:200px; display:none; }
.hf-search-select.open select { display:block; }
