:root {
    --primary: #0d47a1;
    --primary-dark: #08306b;
    --primary-light: #1565c0;
    --secondary: #2e7d32;
    --accent: #ff8f00;
    --bg: #f8f9fa;
    --bg-white: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

.top-bar {
    background: var(--primary-dark);
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar a { color: #fff; opacity: 0.9; }
.top-bar a:hover { opacity: 1; text-decoration: none; }

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}

.journal-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.journal-title .subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 4px;
}

.user-info {
    text-align: right;
}

.user-info .greeting { opacity: 0.9; font-size: 0.9rem; }

.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.nav-list li a {
    display: block;
    padding: 14px 20px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--primary);
    background: rgba(13, 71, 161, 0.05);
    border-bottom-color: var(--primary);
    text-decoration: none;
}

.nav-list .dropdown { position: relative; }

.nav-list .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    z-index: 200;
}

.nav-list .dropdown:hover .dropdown-content { display: block; }

.dropdown-content a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    border-bottom-color: transparent;
}

.dropdown-content a:last-child { border-bottom: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
    padding: 40px 0;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.page-header h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--text-muted);
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

.btn-success { background: var(--success); }
.btn-success:hover { background: #218838; }

.btn-warning { background: var(--warning); color: #212529; }
.btn-warning:hover { background: #e0a800; color: #212529; }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c82333; }

.btn-info { background: var(--info); }
.btn-info:hover { background: #138496; }

.btn-secondary { background: var(--text-muted); }
.btn-secondary:hover { background: #545b62; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }

.card {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 10px 10px 0 0;
    margin: -24px -24px 20px;
    border-bottom: none;
}

.card-header h3 { color: #fff; margin: 0; }

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat-card {
    text-align: center;
    padding: 30px 20px;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.table tr:hover { background: rgba(13, 71, 161, 0.03); }

.table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge.bg-secondary { background: var(--text-muted); color: #fff; }
.badge.bg-success { background: var(--success); color: #fff; }
.badge.bg-danger { background: var(--danger); color: #fff; }
.badge.bg-warning { background: var(--warning); color: #212529; }
.badge.bg-info { background: var(--info); color: #fff; }
.badge.bg-primary { background: var(--primary); color: #fff; }

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success { background: #d4edda; color: #155724; border-color: #28a745; }
.alert-danger { background: #f8d7da; color: #721c24; border-color: #dc3545; }
.alert-warning { background: #fff3cd; color: #856404; border-color: #ffc107; }
.alert-info { background: #d1ecf1; color: #0c5460; border-color: #17a2b8; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

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

select.form-control { background: var(--bg-white); }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 24px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.article-card .meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.article-card .meta .topic-tag {
    background: rgba(13, 71, 161, 0.1);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-card .abstract {
    color: var(--text);
    margin-bottom: 15px;
}

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 0;
    border-radius: 0 0 30px 30px;
    margin: -40px -40px 40px;
    padding-left: 40px;
    padding-right: 40px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 700px;
    margin-bottom: 25px;
}

.hero .btn {
    background: #fff;
    color: var(--primary);
    margin-right: 10px;
    margin-top: 5px;
}

.hero .btn:hover { background: rgba(255,255,255,0.9); }

.hero .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.hero .btn-outline:hover { background: #fff; color: var(--primary); }

.footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer p, .footer li {
    color: rgba(255,255,255,0.8);
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer ul { list-style: none; }

.footer a {
    color: rgba(255,255,255,0.8);
    display: inline-block;
    padding: 4px 0;
}

.footer a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 480px;
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 25px;
}

.auth-card .logo-icon {
    margin: 0 auto 15px;
    background: var(--primary);
    color: #fff;
    width: 70px;
    height: 70px;
    font-size: 2rem;
}

.auth-card h2 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: flex-start;
}

.sidebar {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
    border: 1px solid var(--border);
}

.sidebar .user-card {
    padding: 0 20px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 12px;
}

.sidebar .user-name {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.sidebar .user-role {
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 24px;
    color: var(--text);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(13, 71, 161, 0.06);
    color: var(--primary);
    border-left-color: var(--primary);
    text-decoration: none;
}

.sidebar-nav li a i { margin-right: 10px; }

.sidebar-nav .has-notification { position: relative; }

.sidebar-nav .has-notification::after {
    content: attr(data-count);
    position: absolute;
    top: 10px;
    right: 20px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.notification-dropdown {
    position: relative;
    display: inline-block;
}

.notification-dropdown .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-white);
    min-width: 360px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 300;
    color: var(--text);
}

.notification-dropdown:hover .dropdown-content { display: block; }

.notification-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    text-align: left;
}

.notification-item.unread { background: rgba(13, 71, 161, 0.05); }

.notification-item:last-child { border-bottom: none; }

.notification-item .notif-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

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

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 25px;
}

.tabs .tab {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tabs .tab.active,
.tabs .tab:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    font-weight: 500;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.article-detail .title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-detail .authors {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.article-detail .full-meta {
    background: var(--bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.article-detail .full-meta > div { font-size: 0.95rem; }
.article-detail .full-meta strong { color: var(--primary-dark); }

.article-detail h4 {
    color: var(--primary-dark);
    margin: 20px 0 10px;
    font-size: 1.15rem;
}

.article-detail .abstract-box {
    background: rgba(13, 71, 161, 0.03);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.topic-card {
    padding: 24px;
    border-radius: 10px;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    transition: all 0.2s;
    height: 100%;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.topic-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.topic-card p { color: var(--text-muted); font-size: 0.95rem; }

.filter-bar {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    border: 1px solid var(--border);
}

.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 180px; }

.history-item {
    padding: 15px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    gap: 15px;
}

.history-item:last-child { border-bottom: none; }

.history-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.history-content { flex: 1; }

.history-content .action { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.history-content .time { font-size: 0.85rem; color: var(--text-muted); }
.history-content .notes { font-size: 0.9rem; margin-top: 5px; color: var(--text-muted); }

.timeline {
    padding-left: 10px;
}

.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-bell .count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.call-to-action {
    background: linear-gradient(135deg, var(--secondary), #4caf50);
    color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

.call-to-action h3 { color: #fff; margin-bottom: 10px; font-size: 1.4rem; }
.call-to-action p { opacity: 0.95; margin-bottom: 18px; }

.call-to-action .btn {
    background: #fff;
    color: var(--secondary);
    font-weight: 600;
}

.call-to-action .btn:hover { background: rgba(255,255,255,0.92); }

@media (max-width: 768px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hero h2 { font-size: 1.8rem; }
    .header .container { flex-direction: column; text-align: center; }
    .top-bar .container { flex-direction: column; }
    .journal-title h1 { font-size: 1.25rem; }
    .nav-list { flex-direction: column; }
    .nav-list .dropdown-content { position: static; box-shadow: none; }
    .hero { margin: -20px -20px 20px; padding: 40px 20px; border-radius: 0 0 15px 15px; }
    .notification-dropdown .dropdown-content { min-width: 300px; right: auto; left: -100px; }
}
