/* Premium JURUS University Research Portal CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: #151c2c;
    --bg-card-hover: #1e2638;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #10b981; /* Emerald */
    --accent: #f43f5e; /* Rose */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

a:hover {
    color: #818cf8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: var(--radius-sm);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-btn:hover, .nav-btn.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

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

.nav-btn.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
}

.user-badge .role-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    text-transform: uppercase;
    font-weight: 600;
}

.user-badge.role-admin .role-tag {
    background: rgba(244, 63, 94, 0.2);
    color: #fda4af;
}

/* Hero Section */
.hero {
    padding: 5rem 0 3rem 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Layout Grids */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Cards & Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

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

.btn-submit:hover {
    background: #4f46e5;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--secondary);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
}

.flash-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: var(--secondary);
}

.flash-message.error {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    border-color: var(--accent);
}

/* Documents & Announcements lists */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: var(--transition-smooth);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-title {
    font-weight: 600;
    color: var(--text-main);
}

.item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    color: #a5b4fc;
}

.file-link:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.badge-pending { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.badge-approved { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-rejected { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }

/* Upload area */
.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.02);
}

.upload-dropzone.dragover {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Admin panel tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Project workspaces */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.project-card {
    display: block;
    color: var(--text-main);
}

.project-card:hover {
    color: var(--text-main);
}

.project-card .item-title {
    font-size: 1.1rem;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    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='%2394a3b8' 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 1rem center;
    padding-right: 2.5rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4rem;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

/* ===================== Light theme ===================== */
[data-theme="light"] {
    --bg-main: #f5f7fb;
    --bg-card: #ffffff;
    --bg-card-hover: #eef1f8;
    --border-color: rgba(15, 23, 42, 0.10);
    --border-hover: rgba(99, 102, 241, 0.45);
    --text-main: #0f172a;
    --text-muted: #5b6472;
    --primary-glow: rgba(99, 102, 241, 0.12);
}

[data-theme="light"] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #1e293b 30%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .nav-btn:hover,
[data-theme="light"] .nav-btn.active {
    background: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .form-control {
    background: #ffffff;
}

[data-theme="light"] .list-item {
    background: rgba(15, 23, 42, 0.02);
}

[data-theme="light"] .btn {
    background: rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn:hover {
    background: rgba(15, 23, 42, 0.09);
}

/* ===================== Notifications bell ===================== */
.bell-wrapper { position: relative; }

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    border-radius: 50px;
}

.bell-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
    z-index: 200;
    overflow: hidden;
}

.bell-wrapper:hover .bell-dropdown { display: block; }

.bell-dropdown-head {
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.bell-item {
    display: block;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.bell-item span { display: block; }
.bell-item:hover { background: var(--bg-card-hover); color: var(--text-main); }
.bell-item.unread { background: var(--primary-glow); color: var(--text-main); }

.bell-foot {
    display: block;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.notif-row.unread { border-left: 3px solid var(--primary); }

/* ===================== Theme toggle ===================== */
.theme-toggle {
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.theme-light-icon { display: none; }
[data-theme="light"] .theme-dark-icon { display: none; }
[data-theme="light"] .theme-light-icon { display: inline; }
