/* ── Variables ─────────────────────────────────────────────── */
:root {
    --sidebar-width: 250px;
    --primary: #1a56db;
    --primary-dark: #0f3a8e;
    --primary-light: #e8f0fe;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #1a56db;
    --top-bar-height: 60px;
}

/* ── Global ───────────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background-color: #f1f5f9;
    margin: 0;
    padding: 0;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand i {
    font-size: 28px;
    color: #60a5fa;
}

.sidebar-brand span {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

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

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: 8px;
    margin-bottom: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #94a3b8;
    font-size: 14px;
}

.user-info i {
    font-size: 20px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #64748b !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 4px;
    transition: all 0.2s;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-bar {
    height: var(--top-bar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title h4 {
    font-weight: 600;
    color: #1e293b;
}

.content-area {
    padding: 28px;
}

.flash-messages {
    padding: 16px 28px 0;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.stat-card-blue .stat-icon {
    background: #dbeafe;
    color: #1a56db;
}

.stat-card-green .stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.stat-card-orange .stat-icon {
    background: #fed7aa;
    color: #ea580c;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5, .card-header h6 {
    font-weight: 600;
    color: #1e293b;
}

/* ── Company Cards ────────────────────────────────────────── */
.company-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.company-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.company-name a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
}

.company-name a:hover {
    color: var(--primary);
}

.company-desc {
    color: #64748b;
    line-height: 1.6;
}

/* ── Tables ───────────────────────────────────────────────── */
.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 16px;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #f8fafc !important;
}

.position-title {
    color: #1e293b;
}

.salary-cell {
    color: #64748b;
    font-size: 13px;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-closed {
    background: #fee2e2;
    color: #dc2626;
}

.status-filled {
    background: #dbeafe;
    color: #2563eb;
}

.priority-high {
    background: #fef3c7;
    color: #d97706;
}

.priority-medium {
    background: #e0e7ff;
    color: #4f46e5;
}

.priority-low {
    background: #f1f5f9;
    color: #64748b;
}

/* ── Detail Page ──────────────────────────────────────────── */
.detail-item {
    padding: 8px 0;
}

.detail-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.detail-value a {
    color: var(--primary);
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.detail-section h6 {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.detail-text-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Company Info List ────────────────────────────────────── */
.company-info-list dt {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 12px;
}

.company-info-list dt:first-child {
    margin-top: 0;
}

.company-info-list dd {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 0;
    margin-left: 0;
}

/* ── Login Page ───────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary);
    display: block;
    margin-bottom: 16px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.btn-login {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* ── Input Styles ─────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .content-area {
        padding: 16px;
    }
}

/* ── Misc ─────────────────────────────────────────────────── */
a {
    transition: color 0.2s;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-sm {
    border-radius: 6px;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
}

.alert {
    border-radius: 8px;
    font-size: 14px;
}
