/* Global Styles */
:root {
    --primary-color: #1ab394;
    --primary-dark: #18a689;
    --primary-darker: #148c72;
    --error-color: #ed5565;
    --warning-color: #f8ac59;
    --text-color: #676a6c;
    --border-color: #e7eaec;
    --background-color: #f3f3f4;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 14px;
    line-height: 1.42857;
    height: 100%;
    margin: 0;
    padding: 0;
}

.gray-bg {
    background-color: var(--background-color);
}

/* Login Container */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 50px 15px 30px;
}

.loginColumns {
    padding-top: 20px;
    padding-bottom: 40px;
}

.ibox-content {
    background-color: #ffffff;
    color: inherit;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--box-shadow);
}

/* Form Elements */
.form-control {
    background-color: #FFFFFF;
    background-image: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: inherit;
    display: block;
    padding: 10px 12px;
    transition: var(--transition);
    width: 100%;
    font-size: 14px;
    height: 42px;
    margin-bottom: 5px;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(26, 179, 148, 0.15);
}

.form-control.error {
    border-color: var(--error-color);
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 4px;
    border: 1px solid transparent;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.42857;
    vertical-align: middle;
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.btn-primary:active {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    transform: translateY(0);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

/* Animations */
.animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.fadeInDown {
    animation-name: fadeInDown;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

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

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

@keyframes pulseWarning {
    0% { background-color: #ff9800; }
    50% { background-color: #ff5722; }
    100% { background-color: #ff9800; }
}

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

/* Utilities */
.m-t {
    margin-top: 15px;
}

.m-b {
    margin-bottom: 15px;
}

.full-width {
    width: 100%;
}

.block {
    display: block;
}

.text-center {
    text-align: center;
}

/* Messages */
.error-message {
    color: var(--error-color);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(237, 85, 101, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--error-color);
}

.success-message {
    color: #1ab394;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(26, 179, 148, 0.1);
    border-radius: 4px;
    border-left: 3px solid #1ab394;
}

.info-message {
    color: #1c84c6;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(28, 132, 198, 0.1);
    border-radius: 4px;
    border-left: 3px solid #1c84c6;
}

.warning-message {
    color: var(--warning-color);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(248, 172, 89, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--warning-color);
}

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

/* Horizontal Rule */
hr {
    margin-top: 30px;
    margin-bottom: 30px;
    border: 0;
    border-top: 1px solid var(--border-color);
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 5px;
    top: 10px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
}

.password-toggle:hover {
    color: var(--text-color);
}

/* Image container */
.img-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Lockout message styling */
.lockout-message {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid var(--warning-color);
}

/* Token expiry modal styles */
.w3-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.w3-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 4px 20px 0 rgba(0,0,0,0.19);
    animation: animatetop 0.4s;
    border-radius: 5px;
}

.w3-container {
    padding: 16px;
}

.w3-red {
    background-color: #f44336 !important;
    color: white;
    padding: 16px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.w3-button {
    border: none;
    display: inline-block;
    padding: 8px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: inherit;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

.w3-display-topright {
    position: absolute;
    right: 0;
    top: 0;
    padding: 12px;
}

.w3-green {
    background-color: #4CAF50 !important;
    color: white;
    margin-right: 8px;
}

.w3-gray {
    background-color: #9e9e9e !important;
    color: white;
}

.w3-padding {
    padding: 8px 16px !important;
}

/* Session expiry warning */
.session-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ff9800;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 1000;
    animation: pulseWarning 2s infinite;
}

/* Countdown styling */
#expiryCountdown {
    font-weight: bold;
    color: #f44336;
    font-size: 1.2em;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s;
}

.modal-header {
    background-color: #f44336;
    color: white;
    padding: 15px;
    position: relative;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.modal-header h3 {
    margin: 0;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ddd;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #eee;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #9e9e9e;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #757575;
}

/* Viewer page specific styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.data-container {
    position: relative;
    min-height: 200px;
}

.json-viewer-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
    margin-bottom: 20px;
    min-height: 300px;
    overflow: auto;
}

.audit-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

.audit-details-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.audit-details-table tr:hover {
    background-color: #f8f9fa;
}

.warning-banner {
    background-color: rgba(248, 172, 89, 0.2);
    border-left: 4px solid var(--warning-color);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.warning-icon {
    margin-right: 10px;
    color: var(--warning-color);
    font-size: 18px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-container {
        padding-top: 30px;
        padding-bottom: 20px;
    }

    .loginColumns {
        padding-top: 10px;
    }

    .ibox-content {
        padding: 20px;
    }

    .col-sm-offset-3, .col-md-offset-3 {
        margin-left: 0;
    }

    .col-sm-6, .col-md-6 {
        width: 100%;
    }

    .modal-content,
    .w3-modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .w3-row {
        flex-direction: column;
    }

    .w3-col.l6 {
        width: 100%;
        margin-bottom: 30px;
    }
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }

    .form-control {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .btn-primary:hover, .btn-primary:focus {
        transform: none;
    }

    .session-warning {
        animation: none;
    }

    .loading-spinner {
        animation: none;
        border-top-color: var(--primary-color);
    }
}

/* Add these styles to your existing style.css file */

/* Header styles */
.header1 {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.container-menu-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.wrap_header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wrap_menu {
    width: 100%;
}

.menu {
    display: flex;
    justify-content: center;
}

.main_menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.main_menu h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Data comparison layout */
.data-comparison {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.data-container {
    flex: 1;
    position: relative;
    min-height: 200px;
}

.section-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.json-viewer-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
    min-height: 300px;
    overflow: auto;
}

/* Audit info section */
.audit-info-section {
    margin-top: 30px;
}

.audit-info-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .data-comparison {
        flex-direction: column;
    }

    .main_menu h3 {
        font-size: 20px;
    }
}

/* Token Expiry Modal Styles */
.w3-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.w3-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 4px 20px 0 rgba(0,0,0,0.19);
    animation: animatetop 0.4s;
    border-radius: 5px;
    position: relative;
}

.w3-container {
    padding: 16px;
}

.w3-red {
    background-color: #f44336 !important;
    color: white;
    padding: 16px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: relative;
}

/* Token Expiry Modal Close Button Styles */
.w3-button.w3-display-topright {
    position: absolute;
    right: 0;
    top: 0;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: var(--transition);
    z-index: 1;
    color: white;
    background: none;
    border: none;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}

.w3-button.w3-display-topright:hover {
    color: #f0f0f0;
    background-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.w3-button.w3-display-topright:active {
    transform: scale(0.95);
}

/* Focus state for accessibility */
.w3-button.w3-display-topright:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .w3-button.w3-display-topright {
        border: 2px solid #fff;
        padding: 6px 10px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .w3-button.w3-display-topright:hover,
    .w3-button.w3-display-topright:active {
        transform: none;
    }
}