/* =========================================================
   ASIA JOB PLACEMENT - MODERN ADMIN DASHBOARD STYLES
   Exact replica of reference design with complete responsive UI
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a56db;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --success: #10b981;
    --success-bg: #dcfce7;
    --success-text: #15803d;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #b45309;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #b91c1c;
    
    --info: #0284c7;
    --info-bg: #e0f2fe;
    --info-text: #0369a1;
    
    --purple: #9333ea;
    --purple-bg: #f3e8ff;
    --purple-text: #7e22ce;
    
    --dark: #0f172a;
    --dark-muted: #475569;
    --light-muted: #64748b;
    --subtle-text: #94a3b8;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 76px;
    --header-height: 68px;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-dropdown: 0 12px 28px rgba(15, 23, 42, 0.12);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

body.admin-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

input, select, textarea {
    font-family: inherit;
    outline: none;
}

/* =========================================================
   HEADER / TOP BAR
   ========================================================= */
.admin-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-shadow: var(--shadow-xs);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

/* Header Left: Brand & Toggle */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 216px;
}

.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-muted);
    font-size: 18px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-toggle-btn:hover {
    background: var(--border-subtle);
    color: var(--primary);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.admin-brand-logo-img {
    height: 38px;
    width: auto;
    max-height: 42px;
    object-fit: contain;
    display: block;
}

.admin-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a56db 0%, #0284c7 100%);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(26, 86, 219, 0.25);
    flex-shrink: 0;
}

.admin-logo-text {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.admin-logo-highlight {
    color: var(--primary);
}

/* Header Center: Search Input */
.header-center {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.header-search-box {
    position: relative;
    width: 100%;
}

.header-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-muted);
    font-size: 14px;
    pointer-events: none;
}

.header-search-input {
    width: 100%;
    height: 42px;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 16px 0 40px;
    font-size: 13.5px;
    color: var(--dark);
    transition: all 0.2s ease;
}

.header-search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.header-search-input::placeholder {
    color: #94a3b8;
}

/* Header Right: Actions & Profile */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-muted);
    font-size: 17px;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.header-icon-btn:hover {
    background: var(--border-subtle);
    color: var(--primary);
}

.header-badge-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.header-profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    border-radius: 30px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.header-profile-pill:hover {
    background: var(--border-subtle);
}

.profile-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.profile-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.profile-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.profile-role {
    font-size: 11.5px;
    color: var(--light-muted);
    font-weight: 500;
    line-height: 1.2;
}

.profile-caret {
    font-size: 11px;
    color: var(--light-muted);
    margin-left: 2px;
}

/* =========================================================
   ADMIN LAYOUT & SIDEBAR
   ========================================================= */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    position: relative;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    z-index: 90;
}

.sidebar-nav-container {
    padding: 16px 12px;
}

.sidebar-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
}

.sidebar-link-icon {
    width: 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-link-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link-chevron {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.2s;
    margin-left: auto;
}

.sidebar-link.active .sidebar-link-chevron {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-link.expanded .sidebar-link-chevron {
    transform: rotate(180deg);
}

.sidebar-counter-pill {
    margin-left: auto;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.2;
}

.sidebar-counter-pill.pill-blue {
    background: var(--primary-light);
    color: var(--primary);
}

/* Sidebar Submenus */
.sidebar-submenu {
    list-style: none;
    padding: 4px 0 4px 34px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item.open .sidebar-submenu {
    display: flex;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    font-size: 13px;
    color: #64748b;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: var(--primary);
    background: #f1f5f9;
    font-weight: 600;
}

/* Sidebar Bottom Footer */
.sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid var(--border-color);
}

.sidebar-site-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border-radius: var(--radius);
    background: var(--border-subtle);
    color: var(--dark-muted);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-site-preview-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Collapsed Sidebar State */
.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.admin-sidebar.collapsed .sidebar-link-text,
.admin-sidebar.collapsed .sidebar-link-chevron,
.admin-sidebar.collapsed .sidebar-counter-pill,
.admin-sidebar.collapsed .sidebar-submenu,
.admin-sidebar.collapsed .sidebar-site-preview-btn span {
    display: none !important;
}

.admin-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px;
}

/* =========================================================
   MAIN CONTENT AREA
   ========================================================= */
.admin-main {
    flex: 1;
    padding: 28px 32px 60px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
}

.admin-tab {
    display: none;
    animation: fadeInTab 0.25s ease-out;
}

.admin-tab.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   DASHBOARD TAB (EXACT REPLICA OF SCREENSHOT)
   ========================================================= */

/* Top Welcome Banner */
.dash-welcome-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.dash-welcome-text h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.dash-welcome-text p {
    font-size: 14.5px;
    color: var(--light-muted);
    font-weight: 400;
}

.dash-date-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s;
    cursor: pointer;
}

.dash-date-picker-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.dash-date-picker-btn i.fa-calendar-alt {
    color: var(--light-muted);
}

.dash-date-picker-btn i.fa-chevron-down {
    font-size: 11px;
    color: #94a3b8;
}

/* 4 Summary Stat Cards */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.stat-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon-orange {
    background: #ffedd5;
    color: #ea580c;
}

.stat-icon-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label-title {
    font-size: 13.5px;
    color: var(--light-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-number-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.stat-main-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-growth-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--success-bg);
    color: var(--success-text);
}

.stat-subtext {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   SECOND ROW: CHARTS
   ========================================================= */
.dash-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-chart-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.trends-header-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.chart-legend-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--dark-muted);
}

.legend-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-blue { background: #1a56db; }
.dot-orange { background: #f97316; }

.chart-filter-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--dark-muted);
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.chart-filter-select:hover {
    border-color: #cbd5e1;
}

/* Trends Canvas Container */
.trends-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    flex: 1;
}

.trends-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Donut Chart Container */
.donut-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex: 1;
    padding: 8px 0;
}

.donut-canvas-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.donut-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.donut-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-center-number {
    font-size: 19px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
    display: block;
}

.donut-center-sub {
    font-size: 11px;
    color: var(--light-muted);
    font-weight: 500;
}

.donut-legend-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--dark-muted);
}

.donut-legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.donut-legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.donut-legend-pct {
    font-weight: 700;
    color: var(--dark);
}

/* =========================================================
   THIRD ROW: 3 COLUMNS
   ========================================================= */
.dash-three-col-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-info-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.info-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 9px;
}

.info-card-title i {
    color: var(--primary);
    font-size: 15px;
}

.info-card-view-all {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s;
    cursor: pointer;
}

.info-card-view-all:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Jobs by Location Progress Bars */
.locations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.location-name {
    width: 84px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
    flex-shrink: 0;
}

.location-progress-track {
    flex: 1;
    height: 14px;
    background: #f1f5f9;
    border-radius: 7px;
    overflow: hidden;
}

.location-progress-fill {
    height: 100%;
    border-radius: 7px;
    background: #1a56db;
    transition: width 0.6s ease;
}

.location-count {
    width: 50px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    flex-shrink: 0;
}

/* Recent Companies List */
.companies-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.company-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.company-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.company-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: var(--shadow-xs);
}

.company-item-info {
    min-width: 0;
}

.company-item-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.company-item-industry {
    font-size: 12px;
    color: var(--light-muted);
    line-height: 1.2;
}

.company-item-right {
    text-align: right;
    flex-shrink: 0;
}

.company-jobs-badge {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.company-posted-time {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
}

/* Recent Job Seekers List */
.seekers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.seeker-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.seeker-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.seeker-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.seeker-item-info {
    min-width: 0;
}

.seeker-item-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.seeker-item-degree {
    font-size: 12px;
    color: var(--light-muted);
    line-height: 1.2;
}

.seeker-item-right {
    text-align: right;
    flex-shrink: 0;
}

.seeker-applied-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-muted);
    line-height: 1.2;
}

.seeker-applied-time {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
}

/* =========================================================
   FOURTH ROW: 2 WIDE DATA TABLES
   ========================================================= */
.dash-tables-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
}

.dash-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-table-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.dash-table-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-add-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-add-mini:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Responsive Table Styling */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
}

.modern-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.modern-admin-table th {
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.modern-admin-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--dark);
    vertical-align: middle;
    white-space: nowrap;
}

.modern-admin-table tbody tr {
    transition: background 0.15s ease;
}

.modern-admin-table tbody tr:hover {
    background: #f8fafc;
}

.modern-admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Specific Elements */
.table-job-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-company-mini-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.job-cell-title {
    font-weight: 600;
    color: var(--dark);
}

.job-type-pill {
    display: inline-block;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
}

.table-time-muted {
    font-size: 12px;
    color: #94a3b8;
}

/* Row Action Buttons */
.table-action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    transition: all 0.2s;
    background: transparent;
}

.icon-action-btn:hover {
    background: #f1f5f9;
}

.icon-action-btn.btn-view-icon:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.icon-action-btn.btn-edit-icon:hover {
    color: #d97706;
    background: #fef3c7;
}

.icon-action-btn.btn-delete-icon:hover {
    color: #dc2626;
    background: #fee2e2;
}

/* Candidate Table Cell */
.table-candidate-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-candidate-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.table-candidate-name {
    font-weight: 600;
    color: var(--dark);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-shortlisted {
    background: #dcfce7;
    color: #15803d;
}

.status-interview {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.status-new {
    background: #fef3c7;
    color: #b45309;
}

.status-reviewed {
    background: #e0e7ff;
    color: #4338ca;
}

.status-approved {
    background: #dcfce7;
    color: #15803d;
}

/* =========================================================
   INNER TABS: APPLICATIONS, POSTINGS, CUSTOM JOBS, ETC.
   ========================================================= */
.admin-page-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-page-title-group h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-page-title-group p {
    font-size: 14px;
    color: var(--light-muted);
}

.admin-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-bar-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.filter-tabs-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-pill-btn:hover {
    background: #e2e8f0;
    color: var(--dark);
}

.filter-pill-btn.active {
    background: var(--primary);
    color: #ffffff;
}

.filter-search-box {
    position: relative;
    min-width: 240px;
}

.filter-search-box input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
}

.filter-search-box input:focus {
    background: #ffffff;
    border-color: var(--primary);
}

.filter-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}

.admin-full-table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.admin-full-table-card table {
    width: 100%;
}

.admin-full-table-card th {
    background: #f8fafc;
    padding: 13px 16px;
}

.admin-full-table-card td {
    padding: 14px 16px;
}

/* Status Change Dropdown inside table */
.status-select-inline {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    color: var(--dark);
    cursor: pointer;
}

.status-select-inline:focus {
    border-color: var(--primary);
}

/* Active Toggle Badge */
.toggle-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #dcfce7;
    color: #15803d;
    cursor: pointer;
}

.toggle-inactive-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
}

/* =========================================================
   ADD / EDIT FORM STYLING
   ========================================================= */
.admin-form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-xs);
    max-width: 900px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-item.full-span {
    grid-column: span 2;
}

.form-label-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

.form-label-text .required-mark {
    color: #ef4444;
}

.form-input-field {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--dark);
    background: #ffffff;
    transition: all 0.2s;
}

.form-input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-textarea-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--dark);
    background: #ffffff;
    resize: vertical;
    transition: all 0.2s;
}

.form-textarea-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-btn-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-primary-action:hover {
    background: var(--primary-hover);
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-secondary-action:hover {
    background: #e2e8f0;
}

/* =========================================================
   DETAIL & EDIT MODALS
   ========================================================= */
.modal-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay-backdrop.active {
    display: flex;
}

.modal-window-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-dropdown);
    padding: 28px;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-cross {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
}

.modal-close-cross:hover {
    background: #e2e8f0;
    color: var(--dark);
}

.modal-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.modal-detail-subtitle {
    font-size: 14px;
    color: var(--light-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modal-detail-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-detail-cell.span-full {
    grid-column: span 2;
}

.modal-cell-label {
    font-size: 11.5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #64748b;
}

.modal-cell-val {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.modal-cell-val.text-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    line-height: 1.5;
    font-size: 13.5px;
}

.modal-resume-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    margin-top: 6px;
    transition: background 0.2s;
}

.modal-resume-download-btn:hover {
    background: var(--primary-hover);
}

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-dropdown);
    z-index: 2000;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.admin-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.admin-toast.toast-success i { color: #34d399; }
.admin-toast.toast-error i { color: #f87171; }

/* Empty Table State */
.table-empty-row {
    text-align: center;
    padding: 40px !important;
    color: #94a3b8;
    font-style: italic;
}

/* =========================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================= */
@media (max-width: 1280px) {
    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dash-charts-row {
        grid-template-columns: 1fr;
    }
    
    .dash-three-col-row {
        grid-template-columns: 1fr;
    }
    
    .dash-tables-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    
    .admin-sidebar.mobile-open {
        left: 0;
    }
    
    .header-center {
        display: none;
    }
    
    .admin-main {
        padding: 20px 16px 40px;
    }
}

@media (max-width: 600px) {
    .dash-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group-item.full-span {
        grid-column: span 1;
    }
    
    .profile-info {
        display: none;
    }
}


/* =========================================================
   SECURE ADMIN LOGIN SCREEN
   ========================================================= */
.login-overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0f172a 100%);
    backdrop-filter: blur(16px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-secure-card {
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(26, 86, 219, 0.2);
    width: 100%;
    max-width: 440px;
    padding: 36px 32px;
    color: #f8fafc;
    position: relative;
    backdrop-filter: blur(12px);
    animation: loginFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-img {
    height: 44px;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 14px;
}

.login-security-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 86, 219, 0.18);
    border: 1px solid rgba(26, 86, 219, 0.4);
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.login-brand-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.login-brand-header p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

.login-error-alert {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shakeError 0.3s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-form-group {
    margin-bottom: 18px;
}

.login-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 7px;
}

.login-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .login-input {
    padding-right: 42px;
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.btn-toggle-pwd:hover {
    color: #ffffff;
}

.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 12px;
    color: #94a3b8;
}

.login-remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ssl-shield-badge {
    color: #34d399;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-login-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.2s;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.login-footer-security {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

/* Header Logout Button */
.header-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.header-logout-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* Mobile Sidebar Overlay */
.admin-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Edit Modals */
.edit-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.edit-modal-grid .full-span {
    grid-column: span 2;
}

.edit-modal-grid label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

.edit-modal-grid input,
.edit-modal-grid select,
.edit-modal-grid textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--dark);
    background: #ffffff;
}

.edit-modal-grid input:focus,
.edit-modal-grid select:focus,
.edit-modal-grid textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

/* =========================================================
   AI FLYER TO JOBS STYLES
   ========================================================= */
.sidebar-ai-highlight {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.14) 0%, rgba(234, 88, 12, 0.05) 100%) !important;
    border-left: 3px solid #f59e0b !important;
}

.sidebar-pill-new {
    margin-left: auto;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

.btn-ai-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--radius);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-ai-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(245, 158, 11, 0.45);
    color: #ffffff;
}

.ai-banner-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-banner-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ai-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ai-banner-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffffff;
}

.ai-banner-desc {
    color: #cbd5e1;
    font-size: 13.5px;
    max-width: 780px;
    line-height: 1.6;
}

.ai-key-toggle-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    flex-wrap: wrap;
}

.ai-key-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
}

.ai-key-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 12px;
    width: 240px;
}

.ai-key-input::placeholder {
    color: #94a3b8;
}

.ai-key-save-btn {
    background: #f59e0b;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Dropzone */
.ai-dropzone-box {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 42px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 24px;
    position: relative;
}

.ai-dropzone-box:hover,
.ai-dropzone-box.drag-over {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.12);
}

.ai-drop-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ea580c;
}

.ai-drop-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.ai-drop-desc {
    color: var(--light-muted);
    font-size: 13.5px;
    margin-bottom: 18px;
}

.ai-drop-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-browse-file {
    padding: 9px 20px;
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-browse-file:hover {
    background: var(--primary-hover);
}

.btn-try-sample {
    padding: 9px 20px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-try-sample:hover {
    background: #fde68a;
}

/* Scanning Overlay / State */
.ai-scanning-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: none;
}

.ai-scanning-card.active {
    display: block;
}

.laser-scanner-line {
    width: 100%;
    max-width: 440px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #f59e0b, #ea580c, transparent);
    margin: 20px auto;
    border-radius: 2px;
    animation: laserScan 1.6s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

@keyframes laserScan {
    0% { transform: scaleX(0.2); opacity: 0.3; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(0.2); opacity: 0.3; }
}

.ai-scanning-steps {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.ai-step-pill {
    font-size: 12.5px;
    color: var(--light-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-step-pill.done {
    color: #15803d;
    font-weight: 600;
}

/* Review Workspace (2 columns) */
.ai-review-workspace {
    display: none;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.ai-review-workspace.active {
    display: grid;
}

@media (max-width: 1100px) {
    .ai-review-workspace {
        grid-template-columns: 1fr;
    }
}

.ai-flyer-preview-col {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.ai-preview-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.ai-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.ai-preview-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-preview-img-wrap {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-preview-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
}

.ai-preview-img-wrap:hover .ai-preview-img {
    transform: scale(1.02);
}

.ai-rescan-btn {
    margin-top: 12px;
    width: 100%;
    padding: 9px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: var(--dark);
    font-weight: 600;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.ai-rescan-btn:hover {
    background: #e2e8f0;
}

/* Form Review Column */
.ai-form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.ai-form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.ai-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .ai-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ai-form-grid-2 .full {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .ai-form-grid-2 .full {
        grid-column: span 1;
    }
}

.ai-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-muted);
    margin-bottom: 5px;
    display: block;
}

.ai-input-text, .ai-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--dark);
    background: #ffffff;
    transition: border-color 0.15s;
}

.ai-input-text:focus, .ai-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* Trades List / Table */
.ai-trades-box {
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.ai-trades-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ai-trades-badge {
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.btn-add-trade {
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-trade:hover {
    background: #e2e8f0;
}

.ai-trade-row-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1.5fr 36px;
    gap: 10px;
    align-items: center;
}

@media (max-width: 800px) {
    .ai-trade-row-card {
        grid-template-columns: 1fr;
    }
}

.btn-remove-trade {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    background: #fee2e2;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove-trade:hover {
    background: #fca5a5;
    color: #991b1b;
}

/* Publish Bar */
.ai-publish-bar {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 2px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-publish-all {
    padding: 12px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-publish-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-discard-flyer {
    padding: 10px 18px;
    background: #f1f5f9;
    color: var(--dark-muted);
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Success Card */
.ai-success-card {
    background: #ffffff;
    border: 2px solid #86efac;
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
    display: none;
    margin-bottom: 24px;
}

.ai-success-card.active {
    display: block;
}

.ai-success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* =========================================================
   30-SECOND UNIVERSAL UNDO / RESTORE SYSTEM
   ========================================================= */
.admin-undo-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 480px;
    pointer-events: none;
}

.admin-undo-toast {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 16px 12px 16px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.admin-undo-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.undo-toast-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.undo-toast-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.undo-toast-trash-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.undo-toast-texts {
    min-width: 0;
}

.undo-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.undo-toast-meta {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.undo-countdown-badge {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 11px;
}

.undo-toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-undo-restore {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.btn-undo-restore:hover {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.55);
}

.btn-undo-restore:active {
    transform: translateY(0);
}

.btn-undo-dismiss {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-undo-dismiss:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.undo-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.undo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ea580c, #f59e0b, #10b981);
    width: 100%;
    transition: width 0.1s linear;
}

@media (max-width: 640px) {
    .admin-undo-container {
        left: 12px;
        right: 12px;
        bottom: 16px;
        max-width: none;
    }
    .undo-toast-title {
        max-width: 130px;
    }
}



/* =========================================================
   APPLICANT COUNT TRACKING BADGES
   ========================================================= */
.badge-applicant-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.badge-applicant-count:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.badge-applicant-count:hover i {
    color: #ffffff !important;
}

.badge-applicant-count.company-app-count {
    background: rgba(16, 185, 129, 0.09);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.24);
}

.badge-applicant-count.company-app-count:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.badge-applicant-count.zero-count {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.badge-applicant-count.zero-count:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
    box-shadow: none;
}
