/* AutoJobApplication Premium Design System - ITCSS Architecture (BUNDLED) */

/* Remove default focus outline (user preference) */
*:focus,
*:focus-visible {
    outline: none !important;
}

/* ========================================= */
/* 1. Settings (_variables.css)              */
/* ========================================= */
/* ITCSS: Settings */
:root {
    /* Color Palette - FRIENDLY OPTIMISTIC THEME */
    --primary: #14b8a6;
    /* Teal 500 - Fresh, friendly, optimistic */
    --primary-hover: #0d9488;
    /* Teal 600 */
    --primary-light: #5eead4;
    /* Teal 300 - For gradients */
    --primary-light-hover: #2dd4bf;
    /* Teal 400 */
    --primary-glow: rgba(20, 184, 166, 0.4);

    --secondary: #6b7280;
    /* Gray 500 */
    --secondary-hover: #9ca3af;
    /* Gray 400 */

    --success: #22c55e;
    /* Green 500 - Brighter, more cheerful */
    --warning: #fbbf24;
    /* Amber 400 - Warmer yellow */
    --danger: #f87171;
    /* Red 400 - Softer red */

    /* Backgrounds - Warm Dark */
    --bg-app: #0f172a;
    /* Slate 900 with warmth */
    --bg-surface: #1e293b;
    /* Slate 800 */
    --bg-glass: rgba(30, 41, 59, 0.8);
    /* Translucent Slate */
    --bg-sidebar: rgba(15, 23, 42, 0.95);
    /* Nearly Opaque Slate 900 */

    /* Text */
    --text-main: #f1f5f9;
    /* Slate 100 - Slightly warmer white */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --text-on-primary: #ffffff;

    /* Borders */
    --border: #334155;
    /* Slate 700 */
    --border-glass: rgba(255, 255, 255, 0.1);

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.15);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.2);
    --shadow-glow: 0 0 20px var(--primary-glow);

    --backdrop-blur: 12px;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Accent Colors for variety */
    --accent-coral: #fb7185;
    /* Rose 400 */
    --accent-amber: #fbbf24;
    /* Amber 400 */
    --accent-sky: #38bdf8;
    /* Sky 400 */

    /* Bootstrap Overrides */
    --bs-primary: var(--primary);
    --bs-primary-rgb: 20, 184, 166;
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-hover);

    /* Bootstrap Body Overrides - Force Dark Mode */
    --bs-body-bg: var(--bg-app);
    --bs-body-color: var(--text-main);
}

/* ========================================= */
/* 2. Elements (_base.css)                   */
/* ========================================= */
/* ITCSS: Elements */

/* Reset browser defaults */
html,
body {
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* Remove all focus outlines */
*:focus,
*:focus-visible {
    outline: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
    border-radius: 5px;
    border: 2px solid var(--bg-app);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2dd4bf 0%, var(--primary) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--bg-app);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-app);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    /* Increased from default */
    background-color: var(--bg-app, #0f172a);
    background-image:
        radial-gradient(at 0% 0%, rgba(20, 184, 166, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(34, 197, 94, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main, #f1f5f9);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px var(--primary-glow);
}


/* ========================================= */
/* 2. Elements (_animations.css)             */
/* ========================================= */
/* ITCSS: Elements (Animations) */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(20, 184, 166, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}


/* ========================================= */
/* 2. Elements (_markdown.css)               */
/* ========================================= */
/* ITCSS: Elements (Markdown) */
.markdown-body {
    color: var(--text-main);
    line-height: 1.7;
}

.markdown-body p {
    margin-bottom: 1em;
}

.markdown-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1em;
}

.markdown-body li {
    margin-bottom: 0.5em;
}


/* ========================================= */
/* 3. Objects (_layout.css)                  */
/* ========================================= */
/* ITCSS: Objects (Layout) */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    width: 100%;
    scroll-behavior: smooth;
    transition: padding 0.3s;
}

.page-transition {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-out;
}


/* ========================================= */
/* 4. Components (_cards.css)                */
/* ========================================= */
/* ITCSS: Components (Cards) */
.card,
.job-card,
.login-card,
.subscribe__card {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.job-card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(20, 184, 166, 0.3);
    transform: translateY(-2px);
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
}


/* ========================================= */
/* 4. Components (_buttons.css)              */
/* ========================================= */
/* ITCSS: Components (Buttons) */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    /* Increased Padding */
    border-radius: 9999px;
    /* Pill/Circular Shape */
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glass);
    color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* ========================================= */
/* 4. Components (_forms.css)                */
/* ========================================= */
/* ITCSS: Components (Forms) */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface);
    /* Slate 950 */
    border: 1px solid var(--border);
    /* Slate 600 */
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(15, 23, 42, 0.9);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main) !important;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(15, 23, 42, 0.95);
}

/* File Input */
input[type="file"],
.form-control-file {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 2px dashed #14b8a6;
    border-radius: var(--radius-md);
    color: #5eead4;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="file"]:hover,
.form-control-file:hover {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    border-color: #2dd4bf;
}

input[type="file"]::file-selector-button,
.form-control-file::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="file"]::file-selector-button:hover,
.form-control-file::file-selector-button:hover {
    background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
    transform: translateY(-1px);
}


/* ========================================= */
/* 4. Components (_sidebar.css)              */
/* ========================================= */
/* ITCSS: Components (Sidebar) */
.app-sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease-in-out;
    z-index: 50;
    backdrop-filter: blur(var(--backdrop-blur));
    position: relative;
}

/* Desktop Collapsed State */
.app-sidebar.desktop-collapsed {
    width: 80px;
}

.app-sidebar.desktop-collapsed .nav-header {
    justify-content: center;
    padding: 1.5rem 0;
}

.app-sidebar.desktop-collapsed .nav-header span:not([class^="bi"]) {
    display: none;
}

.app-sidebar.desktop-collapsed .nav-link {
    justify-content: center;
    padding: 0.875rem 0;
}

.app-sidebar.desktop-collapsed .nav-link span:not(.bi) {
    display: none;
}

.app-sidebar.desktop-collapsed .nav-link .bi {
    margin-right: 0;
    font-size: 1.5rem;
}

/* Desktop Toggle Button */
.desktop-toggle-wrapper {
    margin-top: auto;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
}

.app-sidebar.desktop-collapsed .desktop-toggle-wrapper {
    justify-content: center;
}

.desktop-toggle {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.desktop-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Mobile: Always hide desktop toggle */
@media (max-width: 768px) {
    .desktop-toggle-wrapper {
        display: none !important;
    }
}

/* Mobile Header/Toggle */
.mobile-nav-toggle {
    display: block;
    /* Visible on mobile */
}

@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}

.mobile-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

@media (min-width: 769px) {
    .mobile-close-btn {
        display: none !important;
    }
}

/* Mobile Responsiveness for Sidebar */
@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-content {
        padding: 1rem;
    }

    .jobs-grid,
    .content-grid {
        grid-template-columns: 1fr !important;
        /* Force single column */
    }
}

/* Mobile Header */
.mobile-header {
    display: none;
    padding: 1.25rem 1.5rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-glass);
    align-items: center;
    gap: 1rem;
    min-height: 70px;
}

.mobile-header .brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.mobile-header .brand .bi-robot {
    font-size: 1.75rem;
    margin-right: 0.5rem;
    color: var(--primary);
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
}


/* ========================================= */
/* 4. Components (_misc.css)                 */
/* ========================================= */
/* ITCSS: Components (Badges & Tags) */
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    font-family: var(--font-heading);
}

.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0px;
    overflow-x: auto;
}

.tab-link {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

/* Robot Icon Teal Color */
.bi-robot {
    color: var(--primary);
}


/* ========================================= */
/* 5. Utilities (_helpers.css)               */
/* ========================================= */
/* ITCSS: Utilities */
.hidden {
    display: none !important;
}

.text-gradient {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #2dd4bf 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hover-lift {
    transition: transform 0.2s;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* External Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Floating Feedback Button */
.floating-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.btn-feedback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.btn-feedback:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(20, 184, 166, 0.6);
}

.btn-feedback i {
    pointer-events: none;
}

@media (max-width: 768px) {
    .floating-feedback {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .btn-feedback {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}