﻿/* ============================================
   Instructor: Journal of Computer Science and Applications - Professional Theme
   ============================================ */

/* Variables */
:root {
    --primary: #2d2d5e;
    --primary-light: #4a4a8a;
    --primary-dark: #1a1a3e;
    --accent: #c0392b;
    --accent-light: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #c0392b;
    --info: #3498db;
    
    --bg-body: #EEF2F5;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #8899aa;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --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 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    
    --nav-height: 72px;
    
    --light: #f8f9fa;
    --gray: #6c757d;
}

/* Base */
* { box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    height: var(--nav-height);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.navbar-brand {
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--accent);
}

.navbar-logo {
    height: 44px;
    width: auto;
    display: block;
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 34px;
    }
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.06);
}

.nav-link i {
    font-size: 1rem;
}

.navbar .btn-light {
    background: var(--primary);
    color: white !important;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
    transition: all 0.2s ease;
}

.navbar .btn-light:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 45, 94, 0.3);
}

/* User avatar in nav */
.user-avatar-sm {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.user-avatar-sm-initial {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
    border: 1px solid rgba(0,0,0,0.04);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
}

.dropdown-item i {
    width: 1.2rem;
}

.dropdown-divider {
    margin: 0.3rem 0;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    min-height: calc(100vh - var(--nav-height) - 300px);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   Cards
   ============================================ */
.card-modern {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-modern .card-body {
    padding: 1.75rem;
}

.card-modern .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
    font-weight: 600;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3.5rem 0 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    color: white;
    font-weight: 700;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
}

/* ============================================
   Stats Cards
   ============================================ */
.stat-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Buttons (Bootstrap overrides)
   ============================================ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 45, 94, 0.25);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: #219a52;
    border-color: #219a52;
    color: white;
}

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

.btn-warning:hover {
    background: #d68910;
    border-color: #d68910;
    color: white;
}

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

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

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

.btn-accent:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

/* ============================================
   Form Elements
   ============================================ */
.form-control, .form-select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: var(--text-primary);
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

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

.input-group-text {
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   Alert Messages
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #ecfdf5;
    border-left: 4px solid var(--success);
    color: #065f46;
}

.alert-danger, .alert-error {
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-left: 4px solid var(--warning);
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-left: 4px solid var(--info);
    color: #1e40af;
}

/* ============================================
   Status Badges
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-draft {
    background: #f1f3f5;
    color: #495057;
}
.status-draft::before { background: #adb5bd; }

.status-submitted {
    background: #fff3cd;
    color: #856404;
}
.status-submitted::before { background: #ffc107; }

.status-under_review {
    background: #cce5ff;
    color: #004085;
}
.status-under_review::before { background: #007bff; }

.status-needs_revision {
    background: #f8d7da;
    color: #721c24;
}
.status-needs_revision::before { background: #dc3545; }

.status-approved {
    background: #d4edda;
    color: #155724;
}
.status-approved::before { background: #28a745; }

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}
.status-rejected::before { background: #dc3545; }

.status-published {
    background: #d1fae5;
    color: #065f46;
}
.status-published::before { background: #10b981; }

/* ============================================
   Article Cards
   ============================================ */
.article-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.article-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-card .article-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-card .article-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Data Tables
   ============================================ */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-container .table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.table-container .table {
    margin-bottom: 0;
}

.table-container .table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.9rem 1.25rem;
}

.table-container .table tbody td {
    padding: 0.9rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

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

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

/* Action buttons in tables */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.action-btn-view {
    background: #eaf2f8;
    color: var(--info);
}

.action-btn-view:hover {
    background: var(--info);
    color: white;
}

.action-btn-edit {
    background: #fef9e7;
    color: #9a7d0a;
}

.action-btn-edit:hover {
    background: var(--warning);
    color: white;
}

.action-btn-delete {
    background: #fdedec;
    color: var(--danger);
}

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

/* ============================================
   Role Badges
   ============================================ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-author {
    background: #e8f8f5;
    color: #1e8449;
}

.role-reviewer {
    background: #fef9e7;
    color: #9a7d0a;
}

.role-editor {
    background: #eaf2f8;
    color: #1a5276;
}

/* ============================================
   Hero Section (Home)
   ============================================ */
.hero-section {
    text-align: center;
    padding: 4rem 0 2rem;
    position: relative;
}

.hero-section h1 {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-section .hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.feature-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.25rem;
}

.feature-card h3 {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.steps-section {
    background: var(--primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.steps-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.steps-section::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.steps-section h3 {
    color: white;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.step-item {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.step-item .step-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 800;
    opacity: 0.3;
    line-height: 1;
}

.step-item .step-label {
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.step-item .step-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
}

.footer h5, .footer h6 {
    color: white;
}

.footer-link {
    color: rgba(255,255,255,0.6);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: white;
    padding-left: 3px;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
}

/* ============================================
   Review Score Bars
   ============================================ */
.score-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.score-bar .score-label {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 100px;
    color: var(--text-secondary);
}

.score-bar .progress {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
}

.score-bar .progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

.score-bar .score-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 30px;
    text-align: right;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-header {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
}

.profile-cover::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-avatar-section {
    position: relative;
    padding: 0 1.75rem 1.5rem;
    margin-top: -60px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    background: white;
}

.profile-avatar-initial {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
}

/* ============================================
   Modal Overrides
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        border-radius: var(--radius-md);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
    }
    
    .page-header {
        padding: 2rem 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .steps-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.7rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-avatar-initial {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
}

/* ============================================
   Utilities
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    color: var(--text-secondary);
    font-weight: 600;
}

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

.lang-btn {
    background: var(--light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.lang-btn:hover:not(.active) {
    background: var(--gray);
    color: white;
}

.control-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}
