@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-muted: rgba(99, 102, 241, 0.1);
    --secondary: #64748b;
    --secondary-glow: rgba(100, 116, 139, 0.4);
    --accent: #8b5cf6;
    --bg: #0b0e14;
    --sidebar-bg: rgba(13, 17, 23, 0.9);
    --card-bg: rgba(22, 27, 34, 0.7);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --border: rgba(255, 255, 255, 0.08);
    --success: #238636;
    --warning: #d29922;
    --error: #f85149;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.02) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-muted); }

/* Layout */
.app-container { display: flex; min-height: 100vh; }

/* Layout Adaptation for Horizontal Header */
.app-container { display: block; min-height: 100vh; }

/* Premium Header */
.premium-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 2rem;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4);
}

/* Brand Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    margin-right: 0.5rem;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 0 12px var(--primary-glow);
}

.brand-name {
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
}

/* Header Separator */
.header-sep {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 0.75rem;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
    padding: 0 0.6rem;
    height: 56px;
    white-space: nowrap;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; right: 50%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: rgba(255,255,255,0.9);
}

.nav-item:hover::after {
    opacity: 0.5;
    left: 0.6rem; right: 0.6rem;
}

.nav-item.active {
    color: #fff;
    font-weight: 600;
}

.nav-item.active::after {
    opacity: 1;
    left: 0.6rem; right: 0.6rem;
}

.nav-item i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
    height: 56px;
    display: flex;
    align-items: center;
}

/* Invisible bridge to prevent gap between trigger and menu */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
    display: none;
}

.nav-dropdown:hover::after {
    display: block;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 230px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.03);
    display: none;
    padding: 0.35rem;
    z-index: 2001;
    animation: dropdownFadeIn 0.15s ease;
}

.dropdown-content.mega-menu {
    display: none; /* hidden by default, overriden on hover */
    flex-direction: row;
    padding: 0.75rem;
    gap: 1rem;
    min-width: max-content;
}

.nav-dropdown:hover .dropdown-content.mega-menu {
    display: flex;
}

.dropdown-col {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* Dropdown trigger nav-item styling */
.nav-dropdown > .nav-item {
    gap: 0.35rem;
}

/* Dropdown Section Labels */
.dropdown-section-label {
    padding: 0.5rem 0.9rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.25rem;
}

.dropdown-section-label:first-child {
    margin-top: 0;
}

/* Notification Badges */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 50px;
    line-height: 1;
    margin-left: 4px;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: badgePulse 2s infinite;
}

.dropdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 50px;
    line-height: 1;
    margin-left: auto;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.8); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: all 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateX(2px);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.875rem;
}

.header-right { gap: 0.5rem; }

.header-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

/* User Block */
.header-user-block {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    transition: 0.2s;
    cursor: default;
}

.header-user-block:hover {
    background: rgba(255, 255, 255, 0.03);
}

.header-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 0.85rem;
}

.header-username {
    font-weight: 600;
    color: #fff;
    font-size: 0.8rem;
}

.header-role {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn-header {
    height: 34px;
    padding: 0 1rem;

    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.logout-btn-header span { display: inline; margin-left: 0.5rem; font-weight: 700; }

.logout-btn-header:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Sidebar Hide (Replacing with Header) */
.sidebar { display: none; }

.user-info {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-footer a {
    color: #ef4444;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.sidebar-footer a:hover { transform: scale(1.1); filter: brightness(1.2); }

/* Main Content */
.content {
    margin-left: 0;
    padding: 5rem 4rem 4rem; /* Adjusted for 56px header */
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 4rem;
    background: linear-gradient(to bottom, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* Premium Cards */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 2rem;
    border-color: rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-num {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: -0.5rem;
}

th {
    text-align: left;
    padding: 1.25rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

td {
    padding: 1.25rem 1.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    transition: 0.2s;
}

tr td:first-child { border-left: 1px solid var(--card-border); border-radius: 24px 0 0 24px; }
tr td:last-child { border-right: 1px solid var(--card-border); border-radius: 0 24px 24px 0; }

tr:hover td { 
    background: rgba(255, 255, 255, 0.04); 
    border-color: rgba(255,255,255,0.1);
}

/* Forms */
.form-group label {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
    display: block;
}

input, select, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px var(--primary-bg-glow);
    outline: none;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
}

.badge-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border-color: #f59e0b; }
.badge-accepted, .badge-approved, .badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: #10b981; }
.badge-rejected, .badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: #ef4444; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border-color: #3b82f6; }
.badge-high { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: #ef4444; }
.badge-medium { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border-color: #f59e0b; }
.badge-low { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: #10b981; }
.badge-reviewed { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border-color: #3b82f6; }
.badge-closed { background: rgba(100, 116, 139, 0.1); color: #64748b; border-color: #64748b; }
.badge-claimed { background: rgba(168, 85, 247, 0.1); color: #a855f7; border-color: #a855f7; }
.badge-resolved { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: #10b981; }

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px -5px var(--primary-glow);
}

.btn-primary:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-block { width: 100%; display: flex; }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.75rem; }

/* Grid System */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Responsive */
@media (max-width: 1200px) {
    .premium-header { padding: 0 1rem; }
    .header-brand { display: none; }
    .header-sep:first-of-type { display: none; }
    .nav-item span { display: none; }
    .nav-item i { font-size: 1rem; }
    .content { padding: 5rem 2rem 4rem; }
}

@media (max-width: 768px) {
    .header-left .nav-item:not(:first-child):not(.nav-dropdown) { display: none; }
    .header-user-info { display: none; }
    .content { padding: 4.5rem 1.5rem 3rem; }
}
/* Recruitment Cards Design */
.recruitment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.recruitment-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.recruitment-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.recruitment-card .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-open { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-closed { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.recruitment-card .dept-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
}

.recruitment-card .dept-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.recruitment-card .deadline {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.recruitment-card .already-joined {
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 600;
    margin-top: 0.5rem;
}

.recruitment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
