* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #0f172a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #0f172a;
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(250, 204, 21, 0.5); }
.btn-outline { background: transparent; border: 2px solid #facc15; color: #facc15; }
.btn-outline:hover { background: #facc15; color: #0f172a; }
.btn-dark { background: #0f172a; color: #fff; }
.btn-dark:hover { background: #1e293b; transform: translateY(-3px); }
.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 0; position: relative; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; }
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
    background: transparent;   /* ← no more yellow square */
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .title { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.3px; }
.brand-text .domain { font-size: 0.7rem; color: #94a3b8; font-weight: 400; letter-spacing: 0.5px; }
.main-nav { display: flex; align-items: center; gap: 1.8rem; }
.main-nav a { color: #e2e8f0; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.main-nav a:hover, .main-nav a.active { color: #facc15; }
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.nav-dropdown .dropdown-menu {
    position: absolute; top: 130%; right: 0;
    background: #fff; min-width: 230px; border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    padding: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.7rem 1rem; border-radius: 8px;
    color: #0f172a !important; font-size: 0.9rem;
}
.dropdown-menu a:hover { background: #fef3c7; }
.dropdown-menu a i { color: #f59e0b; width: 18px; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* PAGE HERO (used on inner pages) */
.page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -15%;
    width: 70%; height: 160%;
    background: radial-gradient(circle, rgba(250,204,21,0.1) 0%, transparent 65%);
}
.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}
.page-hero p { color: #cbd5e1; font-size: 1rem; position: relative; z-index: 2; }

/* CARDS */
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.8rem;
    transition: all 0.3s;
}
.card:hover { border-color: #facc15; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    border-bottom: 2px solid #facc15;
    padding-bottom: 0.5rem;
}

/* FORM STYLES */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 0.3rem;
}
.form-group label .required { color: #ef4444; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #facc15; outline: none; }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group .help-text { font-size: 0.75rem; color: #94a3b8; margin-top: 0.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* BADGES */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ALERTS */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* FOOTER */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-brand p { font-size: 0.85rem; color: #64748b; margin: 1rem 0; max-width: 300px; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; transition: 0.3s;
}
.footer-social a:hover { background: #facc15; color: #0f172a; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.85rem; color: #94a3b8; transition: 0.3s; }
.footer-col ul li a:hover { color: #facc15; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; font-size: 0.85rem;
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: #94a3b8; }
.footer-legal a:hover { color: #facc15; }

/* STATS */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.2rem;
    text-align: center;
}
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: #0f172a; }
.stat-box .lbl { font-size: 0.8rem; color: #64748b; }
.stat-box.highlight { border-color: #facc15; background: #fffbeb; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: #0f172a; flex-direction: column;
        padding: 1rem 1.5rem; gap: 1rem; align-items: flex-start;
        border-top: 1px solid rgba(255,255,255,0.05);
        display: none;
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown .dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; background: rgba(255,255,255,0.05);
        padding: 0.3rem; margin-top: 0.3rem; display: none;
    }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin: 1rem auto; }
    .footer-social { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .page-hero h1 { font-size: 1.7rem; }
}


/* ============================================================
   DASHBOARD — FLUID RESPONSIVE SYSTEM
   Scales smoothly from 4K to 320px
   ============================================================ */

/* ---- Universal container ---- */
.dashboard-container,
.dashboard-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 2rem) clamp(12px, 2vw, 24px) clamp(2rem, 4vw, 3rem);
}

/* ---- Dashboard grid: fluid 2-col → 1-col ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(1rem, 2vw, 2rem);
    align-items: start;
}

/* ---- Cards: fluid padding ---- */
.profile-card,
.dashboard-container .card,
.dashboard-wrapper .card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: clamp(12px, 1.5vw, 18px);
    padding: clamp(1rem, 1.8vw, 1.6rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
}

/* ---- Stat rows (seeker: 3) ---- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.5rem, 1vw, 0.9rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: clamp(10px, 1vw, 14px);
    padding: clamp(0.7rem, 1.2vw, 1rem) clamp(0.4rem, 1vw, 0.8rem);
    text-align: center;
    min-width: 0;
}
.stat-box .num,
.stat-box .number {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    word-break: break-word;
}
.stat-box .lbl,
.stat-box .label {
    font-size: clamp(0.68rem, 1vw, 0.8rem);
    color: #64748b;
    margin-top: 0.15rem;
}

/* ---- Stats grid (admin/employer: 4 cards) ---- */
.stats-row,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(0.7rem, 1.5vw, 1.2rem);
    margin-bottom: clamp(1.2rem, 2vw, 2rem);
}

/* ---- Stat card (admin) ---- */
.stat-card {
    background: #fff;
    padding: clamp(0.9rem, 1.5vw, 1.4rem);
    border-radius: clamp(12px, 1.2vw, 18px);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 1vw, 1rem);
    min-width: 0;
}
.stat-card .stat-icon {
    width: clamp(40px, 4vw, 52px);
    height: clamp(40px, 4vw, 52px);
    border-radius: clamp(10px, 1vw, 14px);
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    flex-shrink: 0;
}
.stat-card .stat-info { min-width: 0; flex: 1; }
.stat-card .stat-info h3 {
    font-size: clamp(1.1rem, 1.8vw, 1.7rem);
    font-weight: 800;
    line-height: 1.1;
}
.stat-card .stat-info p {
    font-size: clamp(0.72rem, 0.9vw, 0.8rem);
    color: #64748b;
}
.stat-card .stat-info small {
    font-size: clamp(0.65rem, 0.85vw, 0.72rem);
    color: #94a3b8;
}

/* ---- Package grid: fluid auto-fill ---- */
.packages-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: clamp(0.6rem, 1vw, 1rem);
}
.package-card-small {
    padding: clamp(0.7rem, 1.2vw, 1rem);
    min-width: 0;
}
.package-card-small h4 { font-size: clamp(0.85rem, 1vw, 1rem); }
.package-card-small .price { font-size: clamp(0.9rem, 1.2vw, 1.1rem); }

/* ---- Job items (employer) — keep row on desktop, wrap gracefully ---- */
.job-item,
.job-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: clamp(0.8rem, 1.2vw, 1.1rem);
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.job-item:last-child,
.job-list-item:last-child { border-bottom: none; }
.job-item > div:first-child { min-width: 0; flex: 1 1 240px; }
.job-item .job-title { font-weight: 700; font-size: clamp(0.9rem, 1.1vw, 1rem); }
.job-item .job-meta {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    font-size: clamp(0.72rem, 0.9vw, 0.82rem);
    color: #64748b;
    margin-top: 0.3rem;
}
.job-item .action-buttons,
.job-item > div:last-child {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ============================================================
   TABLES — Fluid & responsive without breaking layout
   ============================================================ */
.table-scroll,
.table-container {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: clamp(12px, 1.5vw, 18px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-scroll table,
.table-container table {
    width: 100%;
    border-collapse: collapse;
    /* No min-width by default — table flows naturally */
}

.table-scroll th,
.table-scroll td,
.table-container th,
.table-container td {
    padding: clamp(0.6rem, 1vw, 0.95rem) clamp(0.7rem, 1vw, 1.2rem);
    font-size: clamp(0.78rem, 0.9vw, 0.88rem);
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.table-scroll th,
.table-container th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    white-space: nowrap;
}
.table-scroll tr:last-child td,
.table-container tr:last-child td { border-bottom: none; }
.table-scroll tr:hover td,
.table-container tr:hover td { background: #f8fafc; }

/* Table cells that should allow wrapping */
.table-scroll td.wrap,
.table-container td.wrap {
    white-space: normal;
    min-width: 180px;
}
.table-scroll td.nowrap,
.table-container td.nowrap {
    white-space: nowrap;
}

/* Action buttons inside tables */
.table-scroll .actions,
.table-container .actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* When tables get tight (< 900px), enable horizontal scroll */
@media (max-width: 900px) {
    .table-scroll table,
    .table-container table {
        min-width: 700px;
    }
}

/* ============================================================
   BUTTONS — Never overflow
   ============================================================ */
.btn { max-width: 100%; }

.btn-group,
.action-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ---- Profile detail rows (label + value) ---- */
.profile-detail {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    min-width: 0;
}
.profile-detail .label {
    font-size: clamp(0.78rem, 0.95vw, 0.88rem);
    color: #64748b;
    flex-shrink: 0;
}
.profile-detail .value {
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

/* ---- Attachments ---- */
.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: clamp(0.78rem, 0.9vw, 0.85rem);
    flex-wrap: wrap;
}

/* ---- Guarantor grid ---- */
.guarantor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(0.8rem, 1.5vw, 1.2rem);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: clamp(0.8rem, 1.5vw, 1.2rem);
}
.pagination a,
.pagination span {
    padding: clamp(0.3rem, 0.5vw, 0.4rem) clamp(0.6rem, 1vw, 0.85rem);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: clamp(0.78rem, 0.9vw, 0.85rem);
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    transition: 0.2s;
}
.pagination a:hover { background: #facc15; border-color: #facc15; }
.pagination .current { background: #facc15; font-weight: 700; border-color: #facc15; }

/* ============================================================
   BREAKPOINTS — Only stack when it truly helps
   ============================================================ */

/* ---- Below 900px: dashboard grid goes single column ---- */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    /* Keep stats at 3-wide until 640px */
    .stat-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .stats-row,
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }
    .stats-grid .stat-card {
        flex-direction: row;
    }
}

/* ---- Below 640px: Stat rows drop to 2-wide ---- */
@media (max-width: 640px) {
    .stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-row,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .stat-card .stat-info h3 { font-size: 1.2rem; }

    /* Job items: full stack */
    .job-item,
    .job-list-item {
        flex-direction: column;
        align-items: stretch;
    }
    .job-item > div:last-child,
    .job-item .action-buttons {
        width: 100%;
    }
    .job-item .action-buttons .btn,
    .job-item > div:last-child .btn {
        flex: 1 1 calc(50% - 0.4rem);
    }

    /* Buttons: pair them nicely */
    .action-buttons .btn { flex: 1 1 auto; }

    /* Tables: horizontal scroll kicks in */
    .table-scroll table,
    .table-container table { min-width: 640px; }
}

/* ---- Below 480px: Single column everywhere ---- */
@media (max-width: 480px) {
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-row,
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card .stat-info h3 { font-size: 1.05rem; }
    .stat-card .stat-info small { font-size: 0.62rem; }

    /* Buttons full width when alone */
    .action-buttons .btn,
    .dashboard-container .btn:only-child,
    .btn-block { width: 100%; }

    /* Job item buttons stack fully */
    .job-item .action-buttons .btn { flex: 1 1 100%; }

    /* Tables: still scrollable, slightly larger min-width */
    .table-scroll table,
    .table-container table { min-width: 600px; }
}

/* ============================================================
   SELECTS / INPUTS inside dashboards
   ============================================================ */
.dashboard-container select,
.dashboard-container input[type="text"],
.dashboard-container input[type="search"],
.dashboard-wrapper select,
.dashboard-wrapper input {
    max-width: 100%;
    font-size: 16px; /* Prevents iOS zoom on focus */
}