/* General Body and Container Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensure global box-sizing */
    /* Unique background pattern/gradient for the body */
    background-image: linear-gradient(45deg, #e6f2ff 25%, transparent 25%, transparent 75%, #e6f2ff 75%, #e6f2ff),
                      linear-gradient(45deg, #e6f2ff 25%, transparent 25%, transparent 75%, #e6f2ff 75%, #e6f2ff);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    background-attachment: fixed; /* Keep background fixed during scroll */
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header & Navigation Styles */
header {
    background: #004d99; /* Deep blue background */
    color: #fff;
    padding: 2rem 0; /* Increased vertical padding for more space */
    text-align: center;
    border-bottom: 3px solid #0779e4; /* Accent border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    min-height: 80px; /* Ensure a minimum height for the header */
    display: flex; /* Use flexbox for header content alignment */
    align-items: center; /* Vertically center content */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%; /* Ensure container takes full width within header's max-width */
    max-width: 1100px; /* Keep max-width for overall layout */
}

#logo {
    font-size: 2.5rem; /* Larger logo text for prominence */
    margin: 0;
    font-weight: 700; /* Even bolder logo */
    letter-spacing: 1.5px; /* More spacing for readability */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* Text shadow for better contrast */
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; /* Vertically align menu items */
}

header nav ul li {
    margin: 0 15px; /* Increased horizontal spacing between items */
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.2rem; /* Slightly larger font size for readability */
    font-weight: 600; /* Bolder font weight for menu items */
    padding: 10px 18px; /* More padding around links for better click area */
    border-radius: 6px; /* Slightly more rounded corners for hover effect */
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease; /* Added border-bottom to transition */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Stronger text shadow */
}

header a:hover,
header a.active { /* Added .active class for current page if needed */
    background: #0779e4; /* Lighter blue on hover/active */
    color: #fff;
    box-shadow: 0 0 10px rgba(7, 121, 228, 0.6); /* Glow effect on hover */
    border-bottom: 3px solid #fff; /* White underline on hover/active */
}

/* --- Form Styling (General for Register/Login) --- */
.auth-form-container {
    max-width: 480px; /* Slightly increased max-width for better internal spacing */
    margin: 50px auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    position: relative; /* Needed for background elements */
    overflow: hidden; /* Hide overflow from pseudo-elements */
}

/* Unique background elements for form container */
.auth-form-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(7,121,228,0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.auth-form-container::after {
    content: '';
    position: absolute;
    bottom: -70px;
    right: -70px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0,77,153,0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.auth-form-container h2 {
    text-align: center;
    color: #004d99;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
    position: relative; /* Bring text above pseudo-elements */
    z-index: 1;
}

.form-group {
    margin-bottom: 20px;
    position: relative; /* For password strength and toggle */
    z-index: 1; /* Ensure form elements are above pseudo-elements */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
    width: 100%; /* Ensure this container takes full width */
}

.input-with-icon input,
.input-with-icon select,
textarea { /* Added textarea and select */
    width: 100%; /* Input takes 100% of its parent (.input-with-icon) */
    padding: 12px 15px 12px 45px; /* Adjust padding: right padding for text, left for icon */
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Crucial for inputs to include padding in their width */
}

.input-with-icon input:focus,
.input-with-icon select:focus,
textarea:focus {
    border-color: #0779e4;
    outline: none;
    box-shadow: 0 0 8px rgba(7, 121, 228, 0.3);
}

.input-with-icon i {
    position: absolute;
    left: 15px; /* Icon position from left edge of input */
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
    pointer-events: none; /* Ensure icon doesn't block input clicks */
}

/* Password strength meter styles */
.password-strength-meter {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: #ccc;
    border-radius: 4px;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.strength-text {
    font-size: 0.85rem;
    color: #555;
    margin-top: 5px;
    text-align: left;
    font-weight: 500;
}

/* Toggle password visibility icon */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #004d99;
}


.auth-form-container button {
    width: 100%;
    background: #0779e4;
    color: #fff;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 25px;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative; /* Ensure button is above pseudo-elements */
    z-index: 1;
}

.auth-form-container button:hover {
    background: #004d99;
    transform: translateY(-2px);
}

/* Alert/Message Styles */
.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: #fff;
    margin-top: 40px;
}

/* Dashboard Specific Styles */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.dashboard-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    flex: 1 1 calc(50% - 20px); /* Two columns, with gap */
    min-width: 300px; /* Minimum width for responsiveness */
    box-sizing: border-box;
}

.dashboard-section.full-width {
    flex: 1 1 100%; /* Full width section */
}

.dashboard-section h2 {
    color: #004d99;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.dashboard-section h2 i {
    margin-right: 10px;
    color: #0779e4;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(to right, #004d99, #0779e4);
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}
.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-card h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card .count {
    font-size: 2rem;
    font-weight: 700;
    color: #004d99;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9rem;
    color: #555;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e6f2ff;
    border: 1px solid #cce0ff;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: #004d99;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
}

.action-btn i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #0779e4;
}

.action-btn:hover {
    background: #d4e7ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Recent Activity */
.activity-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.activity-item {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.activity-item .date {
    font-size: 0.85rem;
    color: #777;
    margin-right: 15px;
    min-width: 80px; /* Ensure date takes consistent space */
}

.activity-item .description {
    font-size: 0.95rem;
    color: #333;
}

/* Submit Manuscript Form Styles */
.submission-form-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.submission-form-container h2 {
    text-align: center;
    color: #004d99;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 600;
}

.form-steps {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    position: relative;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #e0e0e0;
    transform: translateY(-50%);
    z-index: 0;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 1;
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.step-indicator.active {
    background-color: #0779e4;
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(7, 121, 228, 0.3);
}

.step-indicator.completed {
    background-color: #2ecc71;
}

.step-label {
    position: absolute;
    top: 50px;
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
}

.step-content {
    display: none; /* Hidden by default */
    padding: 20px 0;
    animation: fadeIn 0.5s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.form-navigation button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.form-navigation .prev-btn {
    background: #6c757d;
    color: #fff;
}

.form-navigation .prev-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.form-navigation .next-btn,
.form-navigation .submit-btn {
    background: #0779e4;
    color: #fff;
}

.form-navigation .next-btn:hover,
.form-navigation .submit-btn:hover {
    background: #004d99;
    transform: translateY(-2px);
}

/* Author fields styling */
.author-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    position: relative;
}

.author-group .remove-author-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.author-group .remove-author-btn:hover {
    background: #c82333;
}

.add-author-btn {
    background: #28a745;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.add-author-btn:hover {
    background: #218838;
}

/* File upload styling */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    margin-top: 20px;
}

.file-upload-area:hover {
    border-color: #0779e4;
    background-color: #f0f8ff;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area i {
    font-size: 3rem;
    color: #0779e4;
    margin-bottom: 15px;
}

.file-upload-area p {
    font-size: 1.1rem;
    color: #555;
    margin: 0;
}

.file-upload-area .file-name {
    font-weight: bold;
    color: #004d99;
    margin-top: 10px;
    display: block;
}

/* Review Summary Styles */
.review-summary {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.review-summary h4 {
    color: #004d99;
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 1px dashed #cce0ff;
    padding-bottom: 8px;
}

.review-summary p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #444;
}

.review-summary strong {
    color: #0779e4;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 0; /* Adjust padding for mobile header */
        min-height: 70px;
        border-bottom-left-radius: 0; /* Remove rounded corners on mobile */
        border-bottom-right-radius: 0;
    }
    header .container {
        flex-direction: column;
        text-align: center;
        padding: 0 15px;
    }
    #logo {
        font-size: 2rem; /* Smaller logo on mobile */
        letter-spacing: 1px;
    }
    header nav ul {
        flex-direction: column;
        margin-top: 15px;
    }
    header nav ul li {
        margin: 5px 0;
    }
    header a {
        font-size: 1rem; /* Smaller menu items on mobile */
        padding: 8px 15px;
    }
    .container {
        padding: 10px;
        margin: 10px auto;
    }
    .auth-form-container {
        max-width: 95%; /* Allow it to be wider on small screens */
        padding: 20px;
        margin: 20px auto;
    }
    .auth-form-container h2 {
        font-size: 1.8rem;
    }
    .input-with-icon input {
        padding: 10px 10px 10px 35px; /* Adjust padding for smaller screens */
    }
    .input-with-icon i {
        left: 10px;
        font-size: 1rem;
    }
    /* Adjust pseudo-elements for mobile */
    .auth-form-container::before {
        width: 100px;
        height: 100px;
        top: -20px;
        left: -20px;
    }
    .auth-form-container::after {
        width: 150px;
        height: 150px;
        bottom: -40px;
        right: -40px;
    }

    /* Dashboard Responsive Adjustments */
    .dashboard-container {
        flex-direction: column;
        gap: 15px;
    }
    .dashboard-section {
        flex: 1 1 100%; /* Stack sections on mobile */
        padding: 20px;
    }
    .dashboard-section h2 {
        font-size: 1.6rem;
    }
    .welcome-card h1 {
        font-size: 2rem;
    }
    .welcome-card p {
        font-size: 1rem;
    }
    .stats-grid, .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Smaller cards on mobile */
        gap: 10px;
    }
    .stat-card .count {
        font-size: 1.6rem;
    }
    .action-btn i {
        font-size: 2rem;
    }
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    .activity-item .date {
        margin-bottom: 5px;
        margin-right: 0;
    }

    /* Submit Manuscript Form Responsive Adjustments */
    .submission-form-container {
        padding: 20px;
        margin: 15px auto;
    }
    .submission-form-container h2 {
        font-size: 1.8rem;
    }
    .form-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .form-steps::before {
        display: none; /* Hide line on small screens */
    }
    .step-indicator {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .step-label {
        position: static; /* Allow labels to flow naturally */
        margin-top: 5px;
        font-size: 0.8rem;
    }
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    .form-navigation button {
        width: 100%;
    }
    .author-group {
        padding: 15px;
    }
    .file-upload-area {
        padding: 20px;
    }
    .file-upload-area i {
        font-size: 2.5rem;
    }
    .file-upload-area p {
        font-size: 1rem;
    }
}

/* Timeline specific styles */
.timeline-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align items to the top */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px; /* Space between timeline items */
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f8f8; /* Light background for the timeline */
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.timeline-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex: 1; /* Allow items to grow and shrink */
    min-width: 250px; /* Minimum width for each card */
    max-width: 300px; /* Max width for each card */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.timeline-date-box {
    background-color: #0779e4; /* Default blue for date box */
    color: #fff;
    padding: 15px 10px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    width: 120px; /* Fixed width for date box */
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.timeline-date-box.red {
    background-color: #e74c3c; /* Red for submission */
}

.timeline-date-box.green {
    background-color: #2ecc71; /* Green for acceptance */
}

.timeline-item p {
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}

/* New: Icon styling for timeline items */
.timeline-item .icon {
    font-size: 2.5rem; /* Larger icon size */
    color: #004d99; /* Primary blue color for icons */
    margin-bottom: 15px; /* Space between icon and date box */
}


/* Arrows for navigation if needed, but for simple display, they aren't functional */
.timeline-navigation {
    text-align: right;
    margin-bottom: 15px;
}

.timeline-navigation .arrow {
    /* Removed background-color, color, padding, border-radius, font-size, cursor, margin-left, transition */
    /* display: none; */ /* Optionally hide completely */
}

.timeline-navigation .arrow:hover {
    /* Removed background-color */
}

@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    .timeline-item {
        min-width: 90%; /* Take more width on small screens */
        max-width: 90%;
    }
}

/* Status colors (re-used from view_submissions) */
.status-tag {
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    color: #fff;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 10px;
}
.status-Submitted { background-color: #0779e4; }
.status-UnderReview { background-color: #ffc107; color: #333; }
.status-Accepted { background-color: #28a745; }
.status-Rejected { background-color: #dc3545; }
.status-RevisionsRequested { background-color: #6f42c1; } /* Corrected CSS class name */
.status-Published { background-color: #17a2b8; }
.status-Pending { background-color: #6c757d; }
