/* TrustFlow Custom Styles - Dark Theme inspired by Otera */

:root {
    --otera-black: #1b2123;
    --otera-green: #5cf998;
    --otera-yellow: #fbbf24;
    --otera-green: #00c851;

    /* Updated color variables - now defaulting to light mode */
    --primary-navy: var(--otera-black);
    --primary-blue: var(--otera-green);
    --dark-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-green: var(--otera-green);
    --warning-orange: var(--otera-yellow);
    --accent-purple: #8b5cf6;
    --accent-cyan: var(--otera-cyan);
}

/* Default to light mode */
body {
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* Dark mode for dark system preference (keeping for backend compatibility) */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-bg: var(--otera-black);
        --card-bg: #252650;
        --text-primary: #ffffff;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #3b3d6b;
    }
}

/* Manual light mode toggle */
body.light-mode {
    --dark-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    background: var(--dark-bg);
    color: var(--text-primary);
}

/* Manual dark mode toggle */
body.dark-mode {
    --dark-bg: var(--otera-black);
    --card-bg: #252650;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #3b3d6b;
    background: var(--dark-bg);
    color: var(--text-primary);
}

/* Otera-style notification banner */
.notification-banner {
    background: linear-gradient(135deg, var(--otera-yellow), #f59e0b);
    color: #1a1b3a;
    padding: 0.75rem 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
    position: relative;
    z-index: 999;
    animation: slideDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.banner-icon {
    font-size: 1.1rem;
    animation: bounce 2s infinite;
}

.banner-text {
    font-weight: 600;
    letter-spacing: 0.025em;
}

.container-fluid {
    padding: 2rem 1rem;
}

/* Header styling similar to Otera */
.main-header {
    background: var(--primary-navy);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--primary-blue);
}

.main-header h1 {
    color: white;
    margin: 0;
    font-weight: 600;
}

.main-header .lead {
    color: #cbd5e1;
    margin: 0;
}

/* Navigation Bar Styles - Otera inspired */
.trustflow-navbar {
    background: var(--dark-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.light-mode .trustflow-navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.navbar-logo {
    height: 100px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.02em;
    color: #00a8ff;
    text-shadow: none;
    transition: all 0.3s ease;
}

.brand-text:hover {
    color: #0ea5e9;
}

body.light-mode .brand-text {
    color: #0066cc;
}

body.light-mode .brand-text:hover {
    color: #00a8ff;
}

/* Document Management Button in Navbar */
.document-management-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.document-management-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    color: var(--text-primary);
}

body.light-mode .document-management-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .document-management-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
}

/* Invite Codes Button in Navbar */
.invite-codes-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.invite-codes-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-1px);
    color: var(--text-primary);
}

body.light-mode .invite-codes-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .invite-codes-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--text-primary);
}

/* Theme Toggle Button in Navbar */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.theme-toggle-btn:hover {
    background: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.4);
    transform: translateY(-1px);
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 168, 255, 0.1);
    border-color: rgba(0, 168, 255, 0.3);
}

/* Theme Toggle Container for Login Page */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Login Logo Styles */
.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-img {
    height: 100px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.login-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

body.light-mode .login-logo-img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

body.light-mode .login-logo-img:hover {
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}

/* User Dropdown Button in Navbar */
.user-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
    min-width: 120px;
}

.user-dropdown-btn:hover {
    background: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.4);
    transform: translateY(-1px);
}

.user-dropdown-btn:focus {
    background: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(0,168,255,0.25);
}

body.light-mode .user-dropdown-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .user-dropdown-btn:hover {
    background: rgba(0, 168, 255, 0.1);
    border-color: rgba(0, 168, 255, 0.3);
}

body.light-mode .user-dropdown-btn:focus {
    background: rgba(0, 168, 255, 0.1);
    border-color: rgba(0, 168, 255, 0.3);
}

/* User Avatar Styles */
.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.user-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown Menu Styles */
.user-dropdown-menu {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    min-width: 220px;
    margin-top: 0.5rem;
    padding: 0;
}

.user-dropdown-menu .dropdown-header {
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    margin: 0;
    border-radius: 10px 10px 0 0;
}

.user-info-details {
    margin: 0;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.user-id {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: monospace;
}

.user-dropdown-menu .dropdown-divider {
    margin: 0;
    border-color: var(--border-color);
}

.user-dropdown-menu .logout-btn {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
}

.user-dropdown-menu .logout-btn:hover {
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
}

/* Navbar Toggler for Mobile */
.navbar-toggler {
    border: 2px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.light-mode .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 41, 59, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.progress-container {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.progress {
    background-color: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    transition: width 0.6s ease;
}

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

.security-card, .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 3rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease-out;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    border-color: var(--primary-blue);
}

.card-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 2rem;
    animation: bounce 1s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.card-content h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

/* Center subheadings and secondary text in cards */
.card-content h4,
.card-content h5,
.card-content .lead,
.card-content .subtitle {
    text-align: center;
}

/* Center specific card elements */
.card-content .text-center + p,
.card-content .text-center + div,
.card h3 + p,
.card h3 + h4,
.card h3 + h5 {
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature {
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.15);
}

.feature strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.trust-badge {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.checkpoint {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
    border: 1px solid var(--border-color);
}

.checkpoint input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 0.75rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.certification {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.certification:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.certification img {
    max-width: 120px;
    margin-bottom: 1rem;
    filter: brightness(0.9);
}

.certification h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.region-map {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.guarantees {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.guarantees ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.guarantees li {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    padding-left: 0.25rem;
}

.guarantees p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.guarantees p strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.isolation-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.workspace {
    flex: 1;
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 0 1rem;
}

.workspace.yours {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid var(--success-green);
}

.workspace.others {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
}

.barrier {
    font-size: 3rem;
    color: #ef4444;
}

.ai-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step {
    flex: 1;
    text-align: center;
    padding: 1rem;
}

.step h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.arrow {
    font-size: 2rem;
    color: var(--text-muted);
    margin: 0 1rem;
}

.guarantees .highlight {
    background: rgba(16, 185, 129, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 4px solid var(--success-green);
    margin-bottom: 0.5rem;
}

.validation {
    background: rgba(245, 158, 11, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--warning-orange);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.checklist-item {
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.checklist-item:hover {
    border-left-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
}

.checklist-item input[type="checkbox"]:checked + label {
    color: var(--success-green);
    font-weight: 500;
}

.success-icon {
    animation: pulse 2s infinite;
}

.download-section {
    padding: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.next-steps {
    background: rgba(59, 130, 246, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.next-steps h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.next-steps ol {
    margin-bottom: 0;
}

.next-steps li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Form Controls */
.form-control, .form-select {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: var(--card-bg);
    border-color: var(--primary-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Enhanced checkbox styling */
.form-check-input {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    transform: scale(1.1);
}

.form-check-input:checked {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.form-check-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-check-label {
    color: var(--text-secondary);
    margin-left: 0.75rem;
    line-height: 1.5;
}

/* Fix checkbox alignment */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check .form-check-input {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.form-check .form-check-label {
    margin-left: 0;
    flex: 1;
}

/* Text Colors */
.text-primary {
    color: var(--primary-blue) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.lead {
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Button Styles - Otera inspired */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    text-transform: none;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary-blue));
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 168, 255, 0.5);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green), #059669);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-banner {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
    
    .banner-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .banner-text {
        text-align: center;
        line-height: 1.3;
    }
    
    /* Navbar responsive adjustments */
    .trustflow-navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-logo {
        height: 32px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .theme-toggle-btn,
    .user-dropdown-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .user-name {
        max-width: 80px;
    }
    
    .user-dropdown-menu {
        min-width: 200px;
        right: 0;
    }
    
    /* Navbar collapse adjustments */
    .navbar-nav {
        gap: 0.5rem;
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .theme-toggle-btn,
    .user-dropdown-btn {
        width: 100%;
        justify-content: center;
        margin: 0.25rem 0;
    }
    
    .card-container {
        padding: 1rem 0.5rem;
    }
    
    .security-card, .card {
        padding: 2rem 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .isolation-diagram,
    .ai-flow {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .workspace {
        margin: 0.5rem 0;
    }
    
    /* Login page responsive adjustments */
    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    .theme-toggle-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .login-logo-img {
        height: 60px;
    }
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Selection styling */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* Focus indicators for accessibility */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Comprehensive text color fixes for dark mode */
p, span, div, li, td, th, label, small {
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* Override Bootstrap and other default text colors */
.text-dark {
    color: var(--text-primary) !important;
}

.text-black {
    color: var(--text-primary) !important;
}

/* Progress text */
.progress-container p {
    color: var(--text-primary);
}

/* Card body text */
.card-body p, .card-body li, .card-body span {
    color: var(--text-primary);
}

/* Feature text */
.feature {
    color: var(--text-primary);
}

/* Workspace text */
.workspace {
    color: var(--text-primary);
}

/* Step text */
.step p, .step span {
    color: var(--text-primary);
}

/* Guarantees text */
.guarantees p, .guarantees li {
    color: var(--text-primary);
}

/* Validation text */
.validation p {
    color: var(--text-primary);
}

/* Next steps text */
.next-steps p, .next-steps li {
    color: var(--text-primary);
}

/* Download section text */
.download-section p {
    color: var(--text-primary);
}

/* List items */
ul li, ol li {
    color: var(--text-primary);
}

/* Table text */
table, td, th {
    color: var(--text-primary);
}

/* Ensure all text in cards is visible */
.card *, .security-card * {
    color: inherit;
}

.card p, .security-card p,
.card span, .security-card span,
.card div, .security-card div,
.card li, .security-card li {
    color: var(--text-primary);
}

/* Override any remaining dark text */
.text-body {
    color: var(--text-primary) !important;
}

/* DPA Card Specific Styles */
.dpa-card {
    border: 2px solid var(--primary-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

.key-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.highlight-card {
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.15);
    border-left-color: var(--accent-purple);
}

.highlight-card strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.highlight-card p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

.dpa-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.dpa-details {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease-out;
}

body.light-mode .dpa-details {
    background: rgba(248, 250, 252, 0.8);
}

.dpa-sections {
    display: grid;
    gap: 1.5rem;
}

.dpa-sections .section {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dpa-sections .section:hover {
    border-left-color: var(--accent-purple);
}

.dpa-sections .section h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dpa-sections .section p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

.legal-basis {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--warning-orange);
    border: 1px solid var(--border-color);
    text-align: center;
}

.legal-basis p {
    margin: 0;
    color: var(--text-secondary);
}

.legal-basis small {
    color: var(--text-muted);
}

.btn-outline-secondary {
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    background: transparent;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-secondary:hover {
    background: var(--text-muted);
    color: var(--dark-bg);
    transform: translateY(-2px);
    border-color: var(--text-muted);
    text-decoration: none;
}

/* Responsive adjustments for DPA card */
@media (max-width: 768px) {
    .key-highlights {
        grid-template-columns: 1fr;
    }
    
    .dpa-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .dpa-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .highlight-card {
        padding: 1rem;
    }
    
    .dpa-details {
        padding: 1rem;
    }
    
    .dpa-sections .section {
        padding: 1rem;
    }
}

/* Enhanced checkbox styling for DPA acceptance */
.checkpoint input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--success-green);
}

.checkpoint .form-check-label {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.checkpoint .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Compliance Card Specific Styles */
.compliance-card {
    border: 2px solid var(--accent-purple);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05));
    position: relative;
    overflow: hidden;
}

.compliance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--primary-blue));
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.compliance-section {
    padding: 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--accent-purple);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.compliance-section:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.15);
    border-left-color: var(--primary-blue);
}

.compliance-section h4 {
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.compliance-section ul {
    margin: 0;
    padding-left: 1rem;
}

.compliance-section li {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.customer-benefits {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    position: relative;
}


.customer-benefits h4 {
    color: var(--success-green);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    font-size: 1.2rem;
}

.customer-benefits p {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--success-green);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.customer-benefits p:last-child {
    margin-bottom: 0;
}

.customer-benefits strong {
    color: var(--success-green);
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

/* Framework-specific color variations */
.compliance-card[data-framework="gdpr"] {
    border-color: #0ea5e9;
}

.compliance-card[data-framework="gdpr"] .compliance-section {
    border-left-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

.compliance-card[data-framework="gdpr"] .compliance-section h4 {
    color: #0ea5e9;
}

.compliance-card[data-framework="hipaa"] {
    border-color: #10b981;
}

.compliance-card[data-framework="hipaa"] .compliance-section {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.compliance-card[data-framework="hipaa"] .compliance-section h4 {
    color: #10b981;
}

.compliance-card[data-framework="pci"] {
    border-color: #f59e0b;
}

.compliance-card[data-framework="pci"] .compliance-section {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.compliance-card[data-framework="pci"] .compliance-section h4 {
    color: #f59e0b;
}

.compliance-card[data-framework="dora"] {
    border-color: #6366f1;
}

.compliance-card[data-framework="dora"] .compliance-section {
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.compliance-card[data-framework="dora"] .compliance-section h4 {
    color: #6366f1;
}

.compliance-card[data-framework="nis2"] {
    border-color: #ef4444;
}

.compliance-card[data-framework="nis2"] .compliance-section {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.compliance-card[data-framework="nis2"] .compliance-section h4 {
    color: #ef4444;
}

.compliance-card[data-framework="iso"] {
    border-color: var(--accent-purple);
}

.compliance-card[data-framework="iso"] .compliance-section {
    border-left-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.compliance-card[data-framework="iso"] .compliance-section h4 {
    color: var(--accent-purple);
}

/* Responsive adjustments for compliance cards */
@media (max-width: 768px) {
    .compliance-grid {
        grid-template-columns: 1fr;
    }
    
    .compliance-section {
        padding: 1rem;
    }
    
    .customer-benefits {
        padding: 1.5rem;
    }
    
    .customer-benefits strong {
        min-width: auto;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .customer-benefits p {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Enhanced animations for compliance cards */
.compliance-card {
    animation: slideInFromRight 0.6s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Compliance card hover effects */
.compliance-card:hover {
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.compliance-card:hover .compliance-section {
    background: rgba(139, 92, 246, 0.2);
}

/* Package Contents Styles */
.package-contents {
    background: var(--card-bg);
    border: 2px solid var(--success-green);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
    animation: fadeIn 0.6s ease-out;
}

.package-contents h3 {
    color: var(--success-green);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.documents-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.document-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--success-green);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.document-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--success-green), var(--primary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.document-item:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--primary-blue);
}

.document-item:hover::before {
    transform: scaleX(1);
}

.document-icon {
    font-size: 1.5rem;
    color: var(--success-green);
    min-width: 2rem;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.document-info {
    flex: 1;
}

.document-info h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.document-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.package-note {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary-blue);
}

.package-note strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Enhanced download section styling */
.download-section {
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success-green), var(--primary-blue), var(--accent-purple));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive adjustments for package contents */
@media (max-width: 768px) {
    .package-contents {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .package-contents h3 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .document-item {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .document-icon {
        font-size: 1.25rem;
        min-width: 1.5rem;
    }
    
    .document-info h4 {
        font-size: 0.95rem;
    }
    
    .document-info p {
        font-size: 0.85rem;
    }
    
    .package-note {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Animation for document items */
.document-item {
    animation: slideInFromLeft 0.5s ease-out;
    animation-fill-mode: both;
}

.document-item:nth-child(1) { animation-delay: 0.1s; }
.document-item:nth-child(2) { animation-delay: 0.2s; }
.document-item:nth-child(3) { animation-delay: 0.3s; }
.document-item:nth-child(4) { animation-delay: 0.4s; }
.document-item:nth-child(5) { animation-delay: 0.5s; }
.document-item:nth-child(6) { animation-delay: 0.6s; }
.document-item:nth-child(7) { animation-delay: 0.7s; }
.document-item:nth-child(8) { animation-delay: 0.8s; }
.document-item:nth-child(9) { animation-delay: 0.9s; }

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

/* Package Preview and Toggle Styles */
.package-preview {
    text-align: center;
}

.package-contents-container {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

.package-contents-container[style*="display: none"] {
    animation: slideUp 0.3s ease-out;
}

.package-contents-list {
    background: var(--card-bg);
    border: 2px solid var(--success-green);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.package-contents-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success-green), var(--primary-blue), var(--accent-purple));
    animation: shimmer 2s infinite;
}

.package-contents-list h5 {
    color: var(--success-green);
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#toggle-package-contents {
    transition: all 0.3s ease;
    border-radius: 25px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#toggle-package-contents:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 12px;
    text-align: center;
}

/* Slide animations for package contents */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

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

/* Responsive adjustments for package preview */
@media (max-width: 768px) {
    .package-contents-list {
        padding: 1.5rem;
    }
    
    .package-contents-list h5 {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    #toggle-package-contents {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Invite Codes Management Screen Styles */
.invite-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.invite-code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.invite-code-item:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
}

/* Status-specific styling for invite codes */
.invite-code-item.status-active {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.invite-code-item.status-active:hover {
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.invite-code-item.status-expiring {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.invite-code-item.status-expiring:hover {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.invite-code-item.status-expired {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    opacity: 0.7;
}

.invite-code-item.status-expired:hover {
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.invite-status {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

body.light-mode .invite-status {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.invite-code-info {
    flex: 1;
    margin-right: 1rem;
}

.invite-code-info h5 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    font-size: 1rem;
    font-family: monospace;
}

.invite-code-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85rem;
}

.invite-code-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.invite-code-link {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.invite-code-link:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-delete-invite {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-delete-invite:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: translateY(-1px);
}

.invite-result-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.invite-result-success h5 {
    color: var(--success-green);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invite-link-display {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 3rem 1rem 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--text-primary);
    position: relative;
}

.copy-link-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-blue);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-link-btn:hover {
    background: var(--accent-cyan);
    transform: translateY(-1px);
}

/* Fix for invite code actions copy button */
.invite-code-actions .copy-link-btn {
    position: static;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: auto;
}

.invite-code-actions .copy-link-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.invite-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.stat-card h6 {
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Responsive adjustments for invite codes */
@media (max-width: 768px) {
    .invite-code-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .invite-code-info {
        margin-right: 0;
        width: 100%;
    }
    
    .invite-code-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .invite-link-display {
        font-size: 0.8rem;
        padding-right: 3rem;
    }
    
    .copy-link-btn {
        position: static;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .invite-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading states */
.invite-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.invite-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Empty state styling */
#no-invite-codes {
    background: rgba(59, 130, 246, 0.05);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

#no-invite-codes:hover {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
}

/* Backup cards styling */
.backup-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.backup-card:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
}

.backup-card h6 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.backup-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.backup-card .btn {
    margin-top: auto;
}

/* Import result styling */
.import-result-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.import-result-success h5 {
    color: var(--success-green);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-result-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.import-result-warning h5 {
    color: var(--warning-orange);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-result-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.import-result-error h5 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.import-stat {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.import-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.import-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.import-issues {
    margin-top: 1rem;
}

.import-issues h6 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.import-issues ul {
    margin: 0;
    padding-left: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.import-issues li {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Animation for new invite codes */
.invite-code-item.new-item {
    animation: slideInFromTop 0.5s ease-out;
}

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

/* Custom Modal Styles */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.show {
    opacity: 1;
}

.custom-modal {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.custom-modal-overlay.show .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(59, 130, 246, 0.05);
}

.custom-modal-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
}

.custom-modal-body {
    padding: 2rem;
}

.custom-modal-message {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.custom-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.custom-modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.custom-modal-footer .btn {
    min-width: 100px;
}

/* Custom Notification Styles */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.custom-notification.show {
    transform: translateX(0);
}

.custom-notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.custom-notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.custom-notification-message {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.custom-notification-error {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.custom-notification-success {
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.custom-notification-info {
    border-left: 4px solid var(--primary-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* Responsive adjustments for modal and notifications */
@media (max-width: 768px) {
    .custom-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .custom-modal-footer {
        flex-direction: column;
    }
    
    .custom-modal-footer .btn {
        width: 100%;
    }
    
    .custom-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Document Management Screen Styles */
.document-actions {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.document-stats {
    margin-bottom: 1rem;
}

.document-stats .stat-card {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.document-stats .stat-card:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    background: rgba(16, 185, 129, 0.1);
}

.document-stats .stat-card h6 {
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.document-stats .stat-card .stat-value {
    color: var(--success-green);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.documents-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.document-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--success-green);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.document-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--success-green), var(--primary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.document-list-item:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--primary-blue);
}

.document-list-item:hover::before {
    transform: scaleX(1);
}

.document-list-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.document-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--success-green);
    cursor: pointer;
    flex-shrink: 0;
}

.document-icon {
    font-size: 1.5rem;
    color: var(--success-green);
    min-width: 2rem;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    flex-shrink: 0;
}

.document-info {
    flex: 1;
    min-width: 0;
}

.document-info h5 {
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.document-info p {
    color: var(--text-secondary);
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.document-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.document-category {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.document-size {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.8rem;
}

.document-actions-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-download-single {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-green);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-download-single:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--success-green);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Category-specific colors */
.document-category.certification {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-orange);
}

.document-category.audit-report {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.document-category.technical-documentation {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
}

.document-category.whitepaper {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.document-category.legal-document {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.document-category.security-documentation {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-cyan);
}

.document-category.security-assessment {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-orange);
}

.document-category.compliance-documentation {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Loading states for documents */
.documents-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.documents-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Empty state styling for documents */
#no-documents {
    background: rgba(16, 185, 129, 0.05);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

#no-documents:hover {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
}

/* Animation for new document items */
.document-list-item.new-item {
    animation: slideInFromLeft 0.5s ease-out;
}

.document-list-item {
    animation: slideInFromLeft 0.5s ease-out;
    animation-fill-mode: both;
}

.document-list-item:nth-child(1) { animation-delay: 0.1s; }
.document-list-item:nth-child(2) { animation-delay: 0.2s; }
.document-list-item:nth-child(3) { animation-delay: 0.3s; }
.document-list-item:nth-child(4) { animation-delay: 0.4s; }
.document-list-item:nth-child(5) { animation-delay: 0.5s; }
.document-list-item:nth-child(6) { animation-delay: 0.6s; }
.document-list-item:nth-child(7) { animation-delay: 0.7s; }
.document-list-item:nth-child(8) { animation-delay: 0.8s; }
.document-list-item:nth-child(9) { animation-delay: 0.9s; }

/* Responsive adjustments for document management */
@media (max-width: 768px) {
    .document-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .document-info {
        width: 100%;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .document-actions-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .document-stats .row {
        gap: 0.5rem;
    }
    
    .document-stats .col-md-3 {
        flex: 1;
        min-width: 0;
    }
    
    .document-actions .d-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .document-actions .d-flex .d-flex {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Select all checkbox styling */
.select-all-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.select-all-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.select-all-label {
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* Bulk action buttons styling */
.bulk-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.bulk-actions .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bulk-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bulk-actions .btn:not(:disabled):hover {
    transform: translateY(-1px);
}

/* Download progress indicator */
.download-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    text-align: center;
    min-width: 300px;
}

.download-progress h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.download-progress .spinner-border {
    color: var(--success-green);
    width: 2rem;
    height: 2rem;
}

.download-progress p {
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Analytics Button in Navbar */
.analytics-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.analytics-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    color: var(--text-primary);
}

body.light-mode .analytics-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .analytics-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* Access Requests Button in Navbar */
.access-requests-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.access-requests-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
    color: var(--text-primary);
}

body.light-mode .access-requests-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .access-requests-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--text-primary);
}

/* Analytics Screen Styles */
.analytics-overview {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analytics-overview .row {
    gap: 1rem;
    margin: 0;
}

.analytics-overview .col-md-2 {
    flex: 1;
    min-width: 150px;
    padding: 0;
}

/* Metric Cards */
.metric-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.metric-card:hover::before {
    transform: scaleX(1);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.metric-trend {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-top: auto;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-trend.trend-positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
    border-color: rgba(16, 185, 129, 0.3);
}

.metric-trend.trend-negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.metric-trend.trend-neutral {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-muted);
    border-color: rgba(156, 163, 175, 0.3);
}

/* Analytics Charts Section */
.analytics-charts {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analytics-charts .row {
    gap: 2rem;
    margin: 0;
}

.analytics-charts .col-md-6 {
    flex: 1;
    min-width: 300px;
    padding: 0;
}

/* Chart Cards */
.chart-card {
    background: rgba(59, 130, 246, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    background: rgba(59, 130, 246, 0.05);
}

.chart-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 200px;
}

/* Chart Legends */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Analytics Details Section */
.analytics-details {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analytics-details .row {
    gap: 2rem;
    margin: 0;
}

.analytics-details .col-md-6 {
    flex: 1;
    min-width: 300px;
    padding: 0;
}

/* Detail Cards */
.detail-card {
    background: rgba(16, 185, 129, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    border-left: 4px solid var(--success-green);
}

.detail-card:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.1);
    background: rgba(16, 185, 129, 0.05);
    border-left-color: var(--primary-blue);
}

.detail-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .stat-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .stat-row:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: monospace;
}

/* Export Information */
.export-info {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-left: 4px solid var(--accent-purple);
    border-radius: 12px;
}

.export-info h6 {
    color: var(--accent-purple);
    font-weight: 600;
}

.export-info p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Analytics Loading State */
.analytics-loading {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.analytics-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--primary-blue);
}

.analytics-loading p {
    margin: 0;
    color: var(--text-secondary);
}

/* Analytics Error State */
.analytics-error {
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    text-align: center;
}

.analytics-error .text-danger {
    color: #ef4444 !important;
}

.analytics-error span {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.analytics-error p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 1rem 0;
}

/* Empty Chart States */
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
    font-style: italic;
}

.chart-empty span {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.export-buttons .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-buttons .btn-success {
    background: linear-gradient(135deg, var(--success-green), #059669);
    border: none;
    color: white;
}

.export-buttons .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    color: white;
}

/* Responsive Analytics Styles */
@media (max-width: 768px) {
    .analytics-overview .row,
    .analytics-charts .row,
    .analytics-details .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .analytics-overview .col-md-2,
    .analytics-charts .col-md-6,
    .analytics-details .col-md-6 {
        min-width: auto;
    }
    
    .metric-card {
        padding: 1rem;
        min-height: 120px;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .metric-label {
        font-size: 0.75rem;
    }
    
    .metric-trend {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .chart-card {
        padding: 1rem;
    }
    
    .chart-title {
        font-size: 1rem;
    }
    
    .chart-container {
        min-height: 150px;
    }
    
    .chart-legend {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .export-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .export-buttons .btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .analytics-overview,
    .analytics-charts,
    .analytics-details {
        padding: 1rem;
    }
    
    .metric-card {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .chart-card {
        padding: 0.75rem;
    }
    
    .chart-container {
        min-height: 120px;
    }
    
    .detail-card {
        padding: 0.75rem;
    }
}

/* Analytics Animations */
.analytics-overview,
.analytics-charts,
.analytics-details {
    animation: fadeInUp 0.6s ease-out;
}

.metric-card {
    animation: fadeInScale 0.5s ease-out;
    animation-fill-mode: both;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }
.metric-card:nth-child(5) { animation-delay: 0.5s; }
.metric-card:nth-child(6) { animation-delay: 0.6s; }

.chart-card {
    animation: slideInFromBottom 0.6s ease-out;
    animation-fill-mode: both;
}

.chart-card:nth-child(1) { animation-delay: 0.2s; }
.chart-card:nth-child(2) { animation-delay: 0.4s; }
.chart-card:nth-child(3) { animation-delay: 0.6s; }
.chart-card:nth-child(4) { animation-delay: 0.8s; }

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Analytics Screen Specific Loading */
#analytics-screen .analytics-loading {
    min-height: 400px;
}

#analytics-screen .analytics-error {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Chart Canvas Styling */
canvas {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

body.light-mode canvas {
    background: rgba(0, 0, 0, 0.02);
}

/* Enhanced metric card hover effects */
.metric-card:hover .metric-value {
    color: var(--accent-cyan);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.metric-card:hover .metric-label {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Performance optimizations */
.chart-container {
    will-change: transform;
    transform: translateZ(0);
}

.metric-card {
    will-change: transform;
    transform: translateZ(0);
}

/* Dark mode specific chart adjustments */
@media (prefers-color-scheme: dark) {
    canvas {
        filter: brightness(0.9) contrast(1.1);
    }
}

body.light-mode canvas {
    filter: brightness(1.1) contrast(0.9);
}

/* Analytics screen transition */
#analytics-screen {
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print styles for analytics */
@media print {
    .analytics-btn,
    .export-buttons {
        display: none;
    }
    
    .analytics-overview,
    .analytics-charts,
    .analytics-details {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .metric-card,
    .chart-card,
    .detail-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Access Requests Management Screen Styles */
.access-requests-overview {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.access-requests-overview .row {
    gap: 1rem;
    margin: 0;
}

.access-requests-overview .col-md-3 {
    flex: 1;
    min-width: 150px;
    padding: 0;
}

/* Access Request Stats Cards */
.request-stat-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.request-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.request-stat-card:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.request-stat-card:hover::before {
    transform: scaleX(1);
}

.request-stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.request-stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Status-specific stat card colors */
.request-stat-card.pending-card {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.request-stat-card.pending-card h3 {
    color: #f59e0b;
}

.request-stat-card.approved-card {
    border-left: 4px solid var(--success-green);
    background: rgba(16, 185, 129, 0.05);
}

.request-stat-card.approved-card h3 {
    color: var(--success-green);
}

.request-stat-card.rejected-card {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.request-stat-card.rejected-card h3 {
    color: #ef4444;
}

/* Access Requests List Section */
.access-requests-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.access-request-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.access-request-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.access-request-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.access-request-item:hover::before {
    transform: scaleX(1);
}

/* Status-specific styling for access request items */
.access-request-item.status-pending {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), rgba(255, 255, 255, 1));
}

body.light-mode .access-request-item.status-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), rgba(248, 250, 252, 1));
}

.access-request-item.status-approved {
    border-left-color: var(--success-green);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(255, 255, 255, 1));
}

body.light-mode .access-request-item.status-approved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(248, 250, 252, 1));
}

.access-request-item.status-rejected {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02), rgba(255, 255, 255, 1));
    opacity: 0.9;
}

body.light-mode .access-request-item.status-rejected {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02), rgba(248, 250, 252, 1));
}

/* Access Request Header */
.access-request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
}

.access-request-user {
    flex: 1;
}

.access-request-user h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.access-request-user p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.access-request-status {
    flex-shrink: 0;
}

.request-status {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

body.light-mode .request-status {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Access Request Details */
.access-request-details {
    margin-bottom: 2rem;
}

.detail-group {
    margin-bottom: 1rem;
}

.detail-group strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.request-message {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
    border-left: 4px solid var(--primary-blue);
}

/* Access Request Actions */
.access-request-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.access-request-actions .btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.access-request-actions .btn-success {
    background: linear-gradient(135deg, var(--success-green), #059669);
    border: none;
    color: white;
}

.access-request-actions .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

.access-request-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
}

.access-request-actions .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}

/* Access Request Results */
.access-request-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.result-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success-green);
}

.result-success p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.result-success code {
    background: rgba(16, 185, 129, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-processing {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-orange);
}

.result-processing p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

.result-rejected {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

.result-rejected p {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* Loading states for access requests */
.access-requests-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-height: 200px;
}

.access-requests-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--primary-blue);
}

.access-requests-loading p {
    margin: 0;
    color: var(--text-secondary);
}

/* Empty state styling for access requests */
#no-access-requests {
    background: rgba(245, 158, 11, 0.05);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    padding: 3rem;
}

#no-access-requests:hover {
    border-color: var(--warning-orange);
    background: rgba(245, 158, 11, 0.1);
}

#no-access-requests span {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

#no-access-requests h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#no-access-requests p {
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive adjustments for access requests */
@media (max-width: 768px) {
    .access-requests-overview {
        padding: 1.5rem;
    }
    
    .access-requests-overview .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .access-requests-overview .col-md-3 {
        min-width: auto;
    }
    
    .request-stat-card {
        padding: 1rem;
        min-height: 100px;
    }
    
    .request-stat-card h3 {
        font-size: 1.5rem;
    }
    
    .access-requests-section {
        padding: 1.5rem;
    }
    
    .access-request-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .access-request-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .access-request-user h5 {
        font-size: 1.1rem;
    }
    
    .access-request-details .row {
        flex-direction: column;
    }
    
    .access-request-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .access-request-actions .btn {
        justify-content: center;
    }
    
    .access-request-result {
        padding: 1rem;
    }
    
    #no-access-requests {
        padding: 2rem;
    }
    
    #no-access-requests span {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .access-requests-overview,
    .access-requests-section {
        padding: 1rem;
    }
    
    .access-request-item {
        padding: 1rem;
    }
    
    .request-stat-card {
        padding: 0.75rem;
        min-height: 80px;
    }
    
    .request-stat-card h3 {
        font-size: 1.25rem;
    }
}

/* Animations for access request items */
.access-request-item {
    animation: slideInFromLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.access-request-item:nth-child(1) { animation-delay: 0.1s; }
.access-request-item:nth-child(2) { animation-delay: 0.2s; }
.access-request-item:nth-child(3) { animation-delay: 0.3s; }
.access-request-item:nth-child(4) { animation-delay: 0.4s; }
.access-request-item:nth-child(5) { animation-delay: 0.5s; }

/* Access request screen transition */
#access-requests-screen {
    animation: slideInFromRight 0.5s ease-out;
}

/* Enhanced hover effects */
.access-request-item:hover .access-request-user h5 {
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.access-request-item:hover .request-status {
    transform: scale(1.05);
    transition: all 0.3s ease;
}
