/* ============================================================
   WorkYatra Design System — workyatra-design.css
   Shared across all pages. Layered on top of existing style.css
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
    --wy-primary:      #4267D8;
    --wy-primary-dark: #3251b8;
    --wy-accent:       #6A3DE8;
    --wy-gradient:     linear-gradient(135deg, #4267D8, #6A3DE8);
    --wy-bg-page:      #F4F6FB;
    --wy-bg-card:      #FFFFFF;
    --wy-border:       #E5E7EB;
    --wy-text-dark:    #1A1A2E;
    --wy-text-body:    #374151;
    --wy-text-muted:   #6B7280;
    --wy-success-bg:   #F0FDF4;
    --wy-success-border: #86EFAC;
    --wy-success-text: #15803D;
    --wy-danger-bg:    #FFF5F5;
    --wy-danger-border:#FCA5A5;
    --wy-danger-text:  #DC2626;
    --wy-radius-card:  20px;
    --wy-radius-input: 12px;
    --wy-shadow-card:  0 4px 24px rgba(26, 26, 46, 0.08), 0 1px 6px rgba(0,0,0,0.04);
    --wy-shadow-hover: 0 8px 32px rgba(66, 103, 216, 0.16);
}

/* ── Global Base ── */
body {
    font-family: 'Inter', sans-serif !important;
    background-color: var(--wy-bg-page) !important;
    color: var(--wy-text-body);
}

/* ── Navbar Overrides ── */
.wy-navbar {
    background: #fff !important;
    box-shadow: 0 1px 0 var(--wy-border), 0 2px 12px rgba(0,0,0,0.04) !important;
    padding: 0 !important;
}

.wy-navbar .container {
    min-height: 68px;
    display: flex;
    align-items: center;
}

.wy-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    color: var(--wy-text-dark) !important;
    letter-spacing: -0.5px;
}

.wy-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--wy-gradient);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wy-brand-icon svg { width: 18px; height: 18px; fill: #fff; }

.wy-nav-link {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--wy-text-muted) !important;
    padding: 6px 14px !important;
    border-radius: 8px;
    transition: all 0.18s ease;
}

.wy-nav-link:hover,
.wy-nav-link.active {
    color: var(--wy-primary) !important;
    background: rgba(66,103,216,0.07);
}

/* ── Buttons ── */
.wy-btn-primary {
    background: var(--wy-gradient);
    border: none;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 10px 22px;
    border-radius: var(--wy-radius-input);
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 14px rgba(66,103,216,0.28);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.wy-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(66,103,216,0.38);
    color: #fff !important;
}

.wy-btn-primary:active { transform: translateY(0); }

.wy-btn-outline {
    background: transparent;
    border: 1.5px solid var(--wy-primary);
    color: var(--wy-primary) !important;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 9px 22px;
    border-radius: var(--wy-radius-input);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.wy-btn-outline:hover {
    background: var(--wy-primary);
    color: #fff !important;
    transform: translateY(-1px);
}

.wy-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--wy-border);
    color: var(--wy-text-body) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: var(--wy-radius-input);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wy-btn-ghost:hover {
    border-color: var(--wy-primary);
    color: var(--wy-primary) !important;
}

.wy-btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.wy-card {
    background: var(--wy-bg-card);
    border-radius: var(--wy-radius-card);
    box-shadow: var(--wy-shadow-card);
    border: none !important;
    position: relative;
    overflow: hidden;
}

.wy-card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--wy-gradient);
    background-size: 200% 100%;
    animation: wy-shimmer 3s infinite linear;
}

@keyframes wy-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Inputs ── */
.wy-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--wy-border);
    border-radius: var(--wy-radius-input);
    font-size: 0.925rem;
    font-family: 'Inter', sans-serif;
    color: var(--wy-text-dark);
    background: #FAFAFA;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.wy-input::placeholder { color: #B0B6C1; }

.wy-input:focus {
    border-color: var(--wy-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(66,103,216,0.10);
}

.wy-input.is-invalid {
    border-color: var(--wy-danger-text);
    background: var(--wy-danger-bg);
}

.wy-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220,38,38,0.10);
}

select.wy-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

textarea.wy-input {
    resize: vertical;
    min-height: 110px;
}

/* ── Labels ── */
.wy-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wy-text-body);
    margin-bottom: 7px;
}

.wy-label .req { color: var(--wy-danger-text); margin-left: 2px; }

/* ── Field Groups ── */
.wy-field { margin-bottom: 20px; }

.wy-invalid-msg {
    display: block;
    font-size: 0.815rem;
    color: var(--wy-danger-text);
    margin-top: 5px;
}

/* ── Alerts ── */
.wy-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.wy-alert svg { flex-shrink: 0; }

.wy-alert-success {
    background: var(--wy-success-bg);
    border: 1px solid var(--wy-success-border);
    color: var(--wy-success-text);
}

.wy-alert-error {
    background: var(--wy-danger-bg);
    border: 1px solid var(--wy-danger-border);
    color: var(--wy-danger-text);
}

/* ── Section Headers in Cards ── */
.wy-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wy-text-dark);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--wy-border);
    display: flex;
    align-items: center;
    gap: 9px;
}

.wy-section-title .wy-icon {
    width: 32px;
    height: 32px;
    background: rgba(66,103,216,0.10);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wy-section-title .wy-icon svg { width: 16px; height: 16px; stroke: var(--wy-primary); }

/* ── Sidebar ── */
.wy-sidebar .wy-card { padding: 28px 20px; }

.wy-avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
}

.wy-avatar-wrap img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--wy-primary);
}

.wy-sidebar-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wy-text-dark);
    margin-bottom: 3px;
}

.wy-sidebar-role {
    font-size: 0.835rem;
    color: var(--wy-text-muted);
    margin-bottom: 18px;
}

.wy-sidebar-nav { list-style: none; padding: 0; margin: 0; }

.wy-sidebar-nav li { margin-bottom: 4px; }

.wy-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wy-text-body);
    text-decoration: none;
    transition: all 0.18s ease;
}

.wy-sidebar-nav a:hover,
.wy-sidebar-nav a.active {
    background: rgba(66,103,216,0.08);
    color: var(--wy-primary);
}

.wy-sidebar-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Page Wrapper ── */
.wy-page { padding: 40px 0 60px; }

/* ── Breadcrumb ── */
.wy-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--wy-text-muted);
    margin-bottom: 28px;
}

.wy-breadcrumb a {
    color: var(--wy-text-muted);
    text-decoration: none;
}

.wy-breadcrumb a:hover { color: var(--wy-primary); }

.wy-breadcrumb .sep { color: #CBD5E1; }

.wy-breadcrumb .current { color: var(--wy-text-dark); font-weight: 500; }

/* ── Page Title Bar ── */
.wy-page-header {
    padding: 48px 0 40px;
    background: linear-gradient(135deg, #1A1A2E 60%, #2d2360);
    color: #fff;
}

.wy-page-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
}

.wy-page-header p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* ── Hero Section ── */
.wy-hero {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.wy-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(66,103,216,0.3) 0%, transparent 70%),
                radial-gradient(ellipse at 70% 20%, rgba(106,61,232,0.25) 0%, transparent 60%);
}

.wy-hero-content { position: relative; z-index: 1; }

.wy-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.wy-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.72);
    margin-bottom: 32px;
}

/* ── Search Bar ── */
.wy-search-bar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    padding: 20px 24px;
}

/* ── Category Cards ── */
.wy-cat-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: var(--wy-shadow-card);
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    display: block;
    margin-bottom: 24px;
}

.wy-cat-card:hover {
    border-color: var(--wy-primary);
    box-shadow: var(--wy-shadow-hover);
    transform: translateY(-4px);
}

.wy-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(66,103,216,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.wy-cat-icon svg { width: 22px; height: 22px; stroke: var(--wy-primary); }

.wy-cat-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--wy-text-dark);
    margin-bottom: 4px;
}

.wy-cat-card p {
    font-size: 0.82rem;
    color: var(--wy-text-muted);
    margin: 0;
}

/* ── Job Cards ── */
.wy-job-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--wy-shadow-card);
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wy-job-card:hover {
    border-color: rgba(66,103,216,0.2);
    box-shadow: var(--wy-shadow-hover);
    transform: translateY(-3px);
}

.wy-job-card-header { display: flex; align-items: flex-start; gap: 14px; }

.wy-job-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--wy-primary);
}

.wy-job-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wy-text-dark);
    margin: 0 0 3px;
}

.wy-job-company {
    font-size: 0.835rem;
    color: var(--wy-text-muted);
    margin: 0;
}

.wy-job-tags { display: flex; flex-wrap: wrap; gap: 7px; }

.wy-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.775rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    background: #F4F6FB;
    color: var(--wy-text-muted);
}

.wy-tag svg { width: 12px; height: 12px; }

/* ── Footer ── */
.wy-footer {
    background: #1A1A2E;
    padding: 28px 0;
}

.wy-footer p {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}

.wy-footer span { color: rgba(255,255,255,0.85); font-weight: 600; }

/* ── Account Dropdown (in navbar) ── */
.wy-account-menu {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid var(--wy-border);
    overflow: hidden;
    margin: 8px 0;
}

.wy-account-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wy-text-body);
    text-decoration: none;
    border-bottom: 1px solid var(--wy-border);
    transition: all 0.15s ease;
}

.wy-account-menu a:last-child { border-bottom: none; }

.wy-account-menu a:hover {
    background: rgba(66,103,216,0.05);
    color: var(--wy-primary);
}

.wy-account-menu a svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .wy-page { padding: 28px 0 48px; }
    .wy-sidebar { margin-bottom: 24px; }
}

@media (max-width: 767px) {
    .wy-hero h1 { font-size: 1.8rem; }
    .wy-btn-primary, .wy-btn-outline { padding: 10px 18px; font-size: 0.875rem; }
    .wy-card { border-radius: 16px; overflow: hidden; }
    .wy-search-bar { padding: 16px; }

    /* ── Dashboard cards: reduce padding (skip sidebar) ── */
    .col-lg-9 .wy-card > div { padding-left: 16px !important; padding-right: 16px !important; }
    .wy-section-title { font-size: 1rem; gap: 8px; }

    /* ── Sidebar: keep centered on mobile ── */
    .wy-sidebar .wy-card { text-align: center !important; padding: 24px 16px !important; }

    /* ── Job management cards (My Jobs, Saved, Applied) ── */
    .wy-job-mgmt-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 16px !important;
        gap: 12px !important;
    }
    .wy-job-mgmt-card > div {
        width: 100% !important;
        min-width: 0 !important;
    }
    .wy-job-mgmt-card > div:last-child {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .wy-job-mgmt-card h4 { font-size: 1rem !important; word-break: break-word; }
    .wy-job-mgmt-card p { font-size: 0.85rem !important; }

    /* ── My Jobs card action buttons ── */
    .wy-job-mgmt-card .wy-btn-outline,
    .wy-job-mgmt-card .wy-btn-primary,
    .wy-job-mgmt-card .wy-btn-ghost {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    /* ── Page header ── */
    .wy-page-header { padding: 32px 0 28px; }
    .wy-page-header h1 { font-size: 1.6rem; }

    /* ── Modals ── */
    .modal-dialog { margin: 12px !important; }
    .modal-content { border-radius: 14px !important; }
    .modal-header, .modal-body, .modal-footer { padding: 16px !important; }
    .modal-title { font-size: 1rem !important; }

    /* ── Prevent horizontal overflow globally ── */
    .container { overflow-x: hidden; }
    .wy-page { overflow-x: hidden; }
}

/* ── Utility ── */
.wy-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--wy-text-muted); font-size: 0.8rem;
    font-weight: 600; letter-spacing: 0.5px;
    margin: 20px 0;
}
.wy-divider::before, .wy-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--wy-border);
}
