/* assets/css/style.css - Premium Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.25);
    
    --secondary: #0ea5e9;
    --secondary-hover: #0284c7;
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    
    --dark: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --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 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.12);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.brand-sub {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 14px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 10px 12px 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(3px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

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

.nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.nav-badge.badge-primary {
    background: #ec4899;
    color: white;
}

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

.public-portal-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(14, 165, 233, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
}

.public-portal-card h5 {
    color: white;
    font-size: 13px;
    margin-bottom: 4px;
}

.public-portal-card p {
    color: #94a3b8;
    font-size: 11px;
    margin-bottom: 10px;
}

/* Main Content Area */
.app-main {
    margin-left: 280px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 280px);
}

/* Top Navbar */
.app-header {
    height: 72px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.content-wrapper {
    padding: 32px;
    flex-grow: 1;
}

/* UI Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: var(--card-accent, var(--primary));
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.1;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 26px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #dcfce7;
    color: #15803d;
}

.badge-left {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-notice {
    background: #fef3c7;
    color: #b45309;
}

.badge-applied {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-shortlist {
    background: #fdf4ff;
    color: #a21caf;
}

.badge-hired {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    background: var(--bg-surface);
}

.custom-table th {
    background: #f8fafc;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* User Avatar & Info */
.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group.col-span-2 {
    grid-column: span 2;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Inline create action button next to select */
.input-group-action {
    display: flex;
    gap: 8px;
}

.input-group-action .form-control {
    flex-grow: 1;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.98);
    transition: var(--transition);
}

.modal-backdrop.show .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

/* Flash alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Public Hiring Page Styles */
.public-page-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.public-container {
    width: 100%;
    max-width: 860px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.public-header {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    padding: 40px 36px;
    color: white;
    text-align: center;
}

.public-header h1 {
    color: white;
    font-size: 28px;
    margin-bottom: 8px;
}

.public-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.public-form-wrap {
    padding: 36px;
}

/* Leaflet Map Picker Container */
.map-picker-container {
    height: 250px;
    width: 100%;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

/* Experience Letter Document Styles */
.letter-document-wrapper {
    background: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 60px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    font-family: 'Times New Roman', Times, serif;
    color: #1a202c;
    line-height: 1.8;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.letter-company-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.letter-body {
    font-size: 15px;
    text-align: justify;
}

.letter-subject {
    font-weight: bold;
    text-decoration: underline;
    text-align: center;
    font-size: 17px;
    margin: 24px 0;
}

.letter-signature-block {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature-line {
    width: 200px;
    border-top: 1px solid #000;
    margin-top: 40px;
    padding-top: 5px;
    font-weight: bold;
}

@media print {
    body * {
        visibility: hidden;
    }
    .letter-document-wrapper, .letter-document-wrapper * {
        visibility: visible;
    }
    .letter-document-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    .no-print {
        display: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .app-sidebar {
        width: 80px;
    }
    .app-sidebar .sidebar-brand span,
    .app-sidebar .nav-link span,
    .app-sidebar .menu-label,
    .app-sidebar .sidebar-footer {
        display: none;
    }
    .app-main {
        margin-left: 80px;
        width: calc(100% - 80px);
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.col-span-2 {
        grid-column: span 1;
    }
}
