/* Repository Evaluation Portal Styles */

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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

html {
    overflow-x: hidden; /* Prevent page-level horizontal scrolling */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: #f8f9fa;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden; /* Prevent page-level horizontal scrolling */
    /* padding-bottom: 80px; Ensure footer is always visible */
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--dark-text);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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


nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--dark-text);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav ul li a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: transparent;
}

/* Login page specific styling */
#loginSection ~ main {
    padding: 1rem 0;
}

.card {
    width: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    max-width: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling within cards */
}

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

/* Compact login form */
#loginSection .container {
    max-width: 400px;
    margin: 0 auto;
}

#loginSection .card {
    max-width: 450px;
    margin: 1rem auto;
    padding: 1.5rem 2.5rem;
}

#loginSection .card h2 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

#loginSection .form-group {
    margin-bottom: 0.875rem;
}

#loginSection .form-group input {
    padding: 10px 12px;
    font-size: 0.95rem;
}

#loginSection .btn {
    width: 100%;
    padding: 10px;
    margin-top: 0.5rem;
}

#loginSection small {
    font-size: 0.8rem;
    line-height: 1.3;
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-text);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.table-container {
    width: auto;
    overflow-x: auto;
    overflow-y: hidden; /* Prevent vertical scrolling */
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    position: relative; /* Create stacking context for scrolling */
}

.table-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.table {
    width: 100%;
    min-width: 600px; /* Ensure minimum width for proper display */
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
    min-width: 100px;
    word-wrap: break-word;
    hyphens: auto;
}

.table th {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Status badges in table */
.table .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action buttons in table */
.table .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    margin-right: 4px;
}

/* Vendors tab specific styling */
#vendors.tab-content {
    padding: 1rem; /* Decreased from default card padding */
    max-width: auto; /* Auto width for flexible sizing */
}

/* Vendor evaluations table */
.vendor-table-container {
    width: auto;
    overflow-x: auto;
    overflow-y: hidden; /* Prevent vertical scrolling */
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative; /* Create stacking context for scrolling */
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}


/* Toast Notifications */
.toast-notification {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-hover);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.toast-success {
    background: rgba(40, 167, 69, 0.95);
    color: white;
    border-color: rgba(40, 167, 69, 0.3);
}

.toast-error {
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border-color: rgba(220, 53, 69, 0.3);
}

.toast-info {
    background: rgba(23, 162, 184, 0.95);
    color: white;
    border-color: rgba(23, 162, 184, 0.3);
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.4em;
    margin-left: 15px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-spinner p {
    color: var(--dark-text);
    font-weight: 500;
    margin: 0;
}

.hidden {
    display: none !important;
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(5px);
    width: 100%;
    box-sizing: border-box;
}

.file-upload:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.file-upload span {
    color: var(--light-text);
    font-weight: 500;
    pointer-events: none;
}

.file-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

/* Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.field-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Logout Buttons for Different Roles */
#vendorLogout,
#subadminLogout {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#vendorLogout .btn,
#subadminLogout .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#vendorLogout .btn:hover,
#subadminLogout .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Admin Sidebar */
#adminSidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

/* Role-based portal layouts */
.role-layout {
    display: flex;
    min-height: calc(100vh - 0px); /* No header for role portals */
}

.role-sidebar {
    width: 260px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    color: white;
    padding: 2rem 0;
}

.role-sidebar.admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.role-sidebar.subadmin {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.role-sidebar.vendor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.role-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: #f8f9fa;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling in main content */
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-nav {
    padding: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-link i {
    margin-right: 0.75rem;
    width: 20px;
}

.sidebar-link.logout {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

/* Page headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0 0 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header p {
    margin: 0;
    color: #666;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* Stats grid */
.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.stat-card {
    flex: 0 0 calc(25% - 0.75rem);
    min-width: 180px;
}

/* Stack cards on smaller screens */
@media (max-width: 1024px) {
    .stats-grid {
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 0 1 calc(50% - 0.5rem);
        min-width: 200px;
    }
}

/* Single column on very small screens */
@media (max-width: 576px) {
    .stat-card {
        flex: 0 1 100%;
        min-width: 0;
    }
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #f093fb, #f5576c); color: white; }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); color: white; }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); color: white; }

.stat-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.stat-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Cards */
.card {
    width: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.card-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-container {
    width: auto;
    overflow-x: auto;
    overflow-y: hidden; /* Prevent vertical scrolling */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; /* Create stacking context for scrolling */
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 600;
    color: #333;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active { background: #d4edda; color: #155724; }
.status-badge.inactive { background: #f8d7da; color: #721c24; }

.recommendation-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.rec-great { background: #d4edda; color: #155724; }
.rec-good { background: #cce5ff; color: #004085; }
.rec-fair { background: #fff3cd; color: #856404; }
.rec-poor { background: #f8d7da; color: #721c24; }

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.recommendation-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.recommendation-badge.rec-great {
    background: #d4edda;
    color: #155724;
}

.recommendation-badge.rec-good {
    background: #cce5ff;
    color: #004085;
}

.recommendation-badge.rec-fair {
    background: #fff3cd;
    color: #856404;
}

.recommendation-badge.rec-poor {
    background: #f8d7da;
    color: #721c24;
}

.link-icon {
    color: #007bff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.link-icon:hover {
    color: #0056b3;
    text-decoration: none;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover { transform: scale(1.1); }
.btn-edit { background: #007bff; color: white; }
.btn-edit:hover { background: #0056b3; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }
.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; }
.btn-warning { background: #ffc107; color: #212529; }
.btn-warning:hover { background: #e0a800; }

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* Form Validation Styles */
.field-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.field-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
    animation: fadeInError 0.3s ease-in;
}

.form-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDownError 0.4s ease-out;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDownError {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

/* Enhanced form field focus states */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transition: all 0.3s ease;
}

/* Modal form styles */
.modal form {
    padding: 1.5rem;
}

.modal .form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* Activity lists */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    margin-right: 1rem;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #333;
}

.activity-content small {
    color: #666;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.action-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.action-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.action-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Submissions list */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.submission-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    margin-right: 1rem;
}

.submission-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.submission-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}


.submission-meta .status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-submitted { background: #cce5ff; color: #004085; }
.status-under-review { background: #fff3cd; color: #856404; }
.status-verified { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

.submission-meta .date {
    color: #666;
}

/* Evaluation summary */
.evaluation-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: #333;
}

.summary-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Form styles */
.form-container {
    max-width: auto;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.file-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.visibility-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.visibility-badge.visible {
    background: #d4edda;
    color: #155724;
}

.visibility-badge.hidden {
    background: #f8d7da;
    color: #721c24;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #666;
}

.search-box input {
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 250px;
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .role-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .role-main {
        margin-left: 0;
        padding: 1rem;
    }

    .role-layout {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    /* Table responsiveness for mobile */
    .table-container,
    .vendor-table-container {
        margin: 0.5rem -1rem; /* Extend to screen edges on mobile */
        border-radius: 8px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 0.8rem;
        min-width: 80px; /* Smaller min-width on mobile */
        word-wrap: break-word;
    }

    .table th {
        font-size: 0.75rem;
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, var(--primary-color), #667eea);
        z-index: 10;
    }

    .table {
        font-size: 0.85rem;
        min-width: 400px; /* Smaller min-width for mobile */
    }
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 500px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.login-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.login-form {
    padding: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form label i {
    color: #667eea;
    font-size: 1.1rem;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Password input wrapper with toggle button */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    width: 100% !important;
    padding: 0.875rem 3.5rem 0.875rem 1rem !important; /* Left padding same as other inputs, right padding for toggle */
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    width: 2.5rem;
    height: 2.5rem;
    z-index: 1;
}

.password-toggle:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-full {
    width: 100%;
}

.login-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.credentials-info h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
}

.credential-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.credential-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    font-size: 0.85rem;
    line-height: 1.4;
}

.credential-group strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
    }

    .login-header {
        padding: 1.5rem;
    }

    .login-form {
        padding: 1.5rem;
    }

    #loginSection .card {
        max-width: 100%;
        padding: 1rem;
    }

    .login-container {
        max-width: 100%;
    }

    .credential-groups {
        grid-template-columns: 1fr;
    }

    /* Table column responsiveness - hide less important columns on small screens */
    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        display: none;
    }

    /* Show action column on mobile */
    .table th:last-child,
    .table td:last-child {
        display: table-cell;
    }
}

/* Extra small screens - show only essential columns */
@media (max-width: 480px) {
    .table th:nth-child(n+3),
    .table td:nth-child(n+3) {
        display: none;
    }

    .table th:last-child,
    .table td:last-child {
        display: table-cell;
    }

    /* Make remaining columns wider on very small screens */
    .table th,
    .table td {
        min-width: 140px;
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .table th {
        font-size: 0.75rem;
    }
}

/* Allow text wrapping on medium screens */
@media (max-width: 1024px) {
    .table th,
    .table td {
        white-space: normal;
        max-width: 180px;
    }
}
