/* ============================================================
   Shared UI - Dark / Yellow theme (public + dashboard)
   ============================================================ */

body.dash-app,
body.landing-page {
    overflow-x: hidden;
}

:root {
    --theme-dark: #111111;
    --theme-dark-2: #242424;
    --theme-yellow: #f5b700;
    --theme-yellow-2: #facc15;
    --theme-soft-yellow: #fff7d6;
    --theme-white: #ffffff;
    --theme-off-white: #fafafa;
    --theme-text: #111827;
    --theme-muted: #6b7280;
    --theme-border: #e5e7eb;
    --theme-success: #16a34a;
    --theme-warning: #f59e0b;
    --theme-danger: #dc2626;
    --theme-info: #374151;
    --theme-radius: 22px;
    --theme-radius-sm: 14px;
    --theme-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Container alias */
.lp-container,
.theme-container,
.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

/* Flash / Alerts */
.flash-container {
    position: fixed;
    top: 16px;
    right: 16px;
    left: 16px;
    z-index: 3000;
    max-width: 420px;
    margin-left: auto;
    pointer-events: none;
}

.flash-container .alert {
    pointer-events: auto;
}

.alert {
    padding: 14px 16px 14px 18px;
    border-radius: var(--theme-radius-sm);
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
    border: 1px solid transparent;
    border-left-width: 4px;
    box-shadow: var(--theme-shadow);
}

.alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.alert-success {
    background: #ecfdf5;
    border-color: #86efac;
    border-left-color: var(--theme-success);
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    border-left-color: var(--theme-danger);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    border-left-color: var(--theme-warning);
    color: #92400e;
}

.alert-info {
    background: #f9fafb;
    border-color: var(--theme-border);
    border-left-color: var(--theme-info);
    color: var(--theme-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 22px;
    font-size: 1rem;
}

.btn-dark,
.btn-primary-dark,
.dash-app .btn-primary,
.landing-page .btn-primary:not(.lp-btn-primary) {
    background: var(--theme-dark);
    color: var(--theme-yellow);
}

.btn-yellow,
.btn-warning {
    background: var(--theme-yellow);
    color: var(--theme-dark);
}

.btn-outline {
    background: transparent;
    color: var(--theme-dark);
    border: 1px solid var(--theme-border);
}

.btn-success {
    background: var(--theme-success);
    color: var(--theme-white);
}

.btn-danger {
    background: var(--theme-danger);
    color: var(--theme-white);
}

.btn-muted {
    background: #e5e7eb;
    color: var(--theme-text);
}

.btn-block {
    width: 100%;
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.data-table td:last-child .action-group,
.table td:last-child .action-group {
    justify-content: flex-end;
    min-width: 140px;
}

.data-table td .action-group .inline-form,
.table td .action-group .inline-form {
    margin: 0;
}

/* Table action columns (simple link/button rows only) */
.th-actions,
.td-actions {
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}

.td-actions .action-group {
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-pending, .badge-job-pending, .badge-app-pending { background: #fef9c3; color: #854d0e; }
.badge-approved, .badge-job-approved, .badge-app-accepted, .badge-active, .badge-status-active { background: #dcfce7; color: #166534; }
.badge-rejected, .badge-job-rejected, .badge-app-rejected, .badge-status-blocked, .badge-suspended, .badge-blocked { background: #fee2e2; color: #991b1b; }
.badge-closed, .badge-job-closed { background: #e5e7eb; color: #374151; }
.badge-reviewed, .badge-app-reviewed { background: var(--theme-soft-yellow); color: #854d0e; }
.badge-accepted { background: #dcfce7; color: #166534; }
.badge-admin, .badge-role-admin { background: var(--theme-dark); color: var(--theme-white); }
.badge-employer, .badge-role-employer { background: var(--theme-dark-2); color: var(--theme-yellow); }
.badge-seeker, .badge-role-seeker { background: var(--theme-soft-yellow); color: var(--theme-dark); }
.badge-type { background: var(--theme-dark); color: var(--theme-yellow); }
.badge-category, .badge-salary { background: var(--theme-soft-yellow); color: var(--theme-dark); }

/* Cards */
.panel-card,
.section-card,
.form-card,
.table-card,
.info-card,
.summary-card {
    background: var(--theme-white);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow);
    margin-bottom: 24px;
}

.panel-card,
.section-card,
.form-card {
    padding: 24px;
}

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* Tables */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--theme-border);
}

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-dark);
    margin: 0;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.table-responsive::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.data-table,
.table {
    min-width: 900px;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td,
.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--theme-border);
    vertical-align: middle;
}

.data-table th,
.table th {
    background: var(--theme-off-white);
    font-weight: 600;
    color: var(--theme-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover,
.table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:last-child td,
.table tbody tr:last-child td {
    border-bottom: none;
}

.cell-main {
    font-weight: 600;
    color: var(--theme-text);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--theme-muted);
    margin-top: 2px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--theme-muted);
}

.empty-state h3 {
    color: var(--theme-dark);
    margin-bottom: 8px;
}

/* Forms */
.form-card.filter-form-card {
    padding: 20px 24px;
}

.form-grid,
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-grid .form-group-full,
.form-grid-2 .form-group-full {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 18px;
}

.form-label,
.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--theme-text);
}

.form-control,
.form-select,
.form-textarea,
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select,
.form-group textarea,
.filter-row input,
.filter-row select,
.filter-grid input,
.filter-grid select,
.inline-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--theme-white);
    color: var(--theme-text);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--theme-yellow);
    box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.25);
}

/* Login/register inputs with left icon (avoid text overlapping icon) */
.field-icon-wrap {
    position: relative;
}

.field-icon-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    pointer-events: none;
    color: var(--theme-muted);
}

.field-icon-wrap .field-icon .icon-svg {
    width: 20px;
    height: 20px;
}

.field-icon-wrap > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    padding-left: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.field-icon-wrap.password-wrap-public > input[type="password"] {
    padding-right: 3.5rem;
    padding-left: 3rem;
}

.form-help {
    font-size: 0.82rem;
    color: var(--theme-muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.file-upload-box,
.upload-box {
    border: 2px dashed var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 28px 20px;
    text-align: center;
    background: var(--theme-off-white);
    transition: border-color 0.2s, background 0.2s;
}

.file-upload-box:hover,
.upload-box:hover {
    border-color: var(--theme-yellow);
    background: var(--theme-soft-yellow);
}

.file-upload-box input[type="file"],
.upload-box input[type="file"] {
    width: 100%;
    margin-top: 12px;
    font-size: 0.88rem;
}

.file-upload-box p,
.upload-box p {
    color: var(--theme-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.upload-note,
.file-upload-box .form-help {
    margin-top: 10px;
}

.filter-row,
.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-row .form-control,
.filter-row input,
.filter-row select {
    width: auto;
    min-width: 160px;
}

.inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.dash-page-desc {
    color: var(--theme-muted);
    font-size: 0.95rem;
    margin: -8px 0 20px;
}

.text-muted {
    color: var(--theme-muted);
}

@media (max-width: 768px) {
    .form-grid,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .filter-row input,
    .filter-row select,
    .filter-row .form-control {
        width: 100%;
        min-width: 0;
    }
}
