/* Krommus Auth - Validador Público - Estilos Premium Black */

:root {
    --black-primary: #000000;
    --black-secondary: #0A0A0A;
    --black-tertiary: #1A1A1A;
    --black-quaternary: #2A2A2A;
    --white-primary: #FFFFFF;
    --white-secondary: #F8F8F8;
    --gray-light: #D0D0D0;
    --gray-medium: #A0A0A0;
    --gray-dark: #707070;
    --accent-silver: #E8E8E8;
    --accent-gold: #FFD700;
    --accent-platinum: #E5E4E2;
    --success: #00E676;
    --error: #FF5252;
    --warning: #FFB74D;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background: 
        radial-gradient(circle at 20% 80%, rgba(192, 192, 192, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.01) 0%, transparent 50%),
        linear-gradient(135deg, var(--black-primary) 0%, var(--black-secondary) 50%, var(--black-tertiary) 100%);
    color: var(--white-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(192, 192, 192, 0.005) 0%, transparent 70%),
        linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.002) 50%, transparent 51%);
    background-size: 120px 120px;
    pointer-events: none;
    z-index: 0;
}

.validator-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.validator-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.validator-header {
    text-align: center;
    padding: 40px 0 60px;
    position: relative;
}

.validator-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-silver), transparent);
}

.logo {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--white-primary) 0%, var(--accent-silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--gray-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tagline {
    font-size: 1.1rem;
    color: var(--gray-medium);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Main Content */
.validator-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.validator-card {
    background: 
        linear-gradient(135deg, rgba(11, 11, 11, 0.95) 0%, rgba(21, 21, 21, 0.9) 100%);
    backdrop-filter: blur(25px) saturate(1.1);
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-radius: var(--border-radius-xl);
    padding: 56px;
    width: 100%;
    max-width: 680px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.validator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(192, 192, 192, 0.4) 25%, 
        rgba(192, 192, 192, 0.6) 50%, 
        rgba(192, 192, 192, 0.4) 75%, 
        transparent 100%);
    opacity: 0.6;
}

.validator-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(192, 192, 192, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.005) 0%, transparent 50%);
    pointer-events: none;
    animation: shimmer 12s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(180deg); }
}

/* Form Section */
.validator-form-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white-primary);
}

.form-description {
    color: var(--gray-medium);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.validator-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--white-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-input {
    width: 100%;
    padding: 20px 28px;
    background: 
        linear-gradient(135deg, 
            rgba(21, 21, 21, 0.95) 0%, 
            rgba(26, 26, 26, 0.9) 100%);
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: var(--border-radius);
    color: var(--white-primary);
    font-size: 1.1rem;
    font-family: var(--font-family);
    transition: var(--transition);
    backdrop-filter: blur(15px) saturate(1.05);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: rgba(192, 192, 192, 0.6);
    box-shadow: 
        0 0 0 3px rgba(192, 192, 192, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.4);
    background: 
        linear-gradient(135deg, 
            rgba(26, 26, 26, 0.98) 0%, 
            rgba(32, 32, 32, 0.95) 100%);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--gray-medium);
    font-weight: 400;
}

.form-input:hover {
    border-color: rgba(192, 192, 192, 0.5);
    background: 
        linear-gradient(135deg, 
            rgba(24, 24, 24, 0.95) 0%, 
            rgba(30, 30, 30, 0.9) 100%);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(192, 192, 192, 0.9) 50%, 
            rgba(160, 160, 160, 0.85) 100%);
    color: var(--black-primary);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 1) 0%, 
            rgba(192, 192, 192, 0.95) 50%, 
            rgba(180, 180, 180, 0.9) 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-outline {
    background: 
        linear-gradient(135deg, 
            rgba(21, 21, 21, 0.9) 0%, 
            rgba(26, 26, 26, 0.8) 100%);
    color: var(--white-primary);
    border: 1px solid rgba(192, 192, 192, 0.4);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(192, 192, 192, 0.1), 
        transparent);
    transition: var(--transition-fast);
}

.btn-outline:hover {
    background: 
        linear-gradient(135deg, 
            rgba(26, 26, 26, 0.95) 0%, 
            rgba(32, 32, 32, 0.9) 100%);
    border-color: rgba(192, 192, 192, 0.6);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.btn-outline:hover::before {
    left: 100%;
}

.btn-outline:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Result Section */
.result-section {
    padding: 32px;
    border-radius: var(--border-radius-lg);
    margin-top: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    backdrop-filter: blur(20px) saturate(1.1);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 230, 118, 0.3) 25%, 
        rgba(0, 230, 118, 0.6) 50%, 
        rgba(0, 230, 118, 0.3) 75%, 
        transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.result-section.success {
    background: 
        linear-gradient(135deg, 
            rgba(0, 230, 118, 0.08) 0%, 
            rgba(0, 200, 81, 0.12) 50%, 
            rgba(0, 180, 61, 0.08) 100%);
    border: 1px solid rgba(0, 230, 118, 0.3);
    box-shadow: 
        var(--shadow-md),
        inset 0 1px 0 rgba(0, 230, 118, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.result-section.success::before {
    opacity: 1;
}

.result-section.error {
    background: 
        linear-gradient(135deg, 
            rgba(255, 82, 82, 0.08) 0%, 
            rgba(255, 68, 68, 0.12) 50%, 
            rgba(255, 54, 54, 0.08) 100%);
    border: 1px solid rgba(255, 82, 82, 0.3);
    box-shadow: 
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 82, 82, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.result-section.error::before {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 82, 82, 0.3) 25%, 
        rgba(255, 82, 82, 0.6) 50%, 
        rgba(255, 82, 82, 0.3) 75%, 
        transparent 100%);
    opacity: 1;
}

.result-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.result-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.result-section.success .result-icon {
    color: var(--success);
}

.result-section.error .result-icon {
    color: var(--error);
}

.result-content {
    flex: 1;
}

.result-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--white-primary);
}

.result-content p {
    color: var(--gray-medium);
    margin-bottom: 16px;
}

.result-details {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(192, 192, 192, 0.1);
}

.detail-label {
    font-weight: 500;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: var(--white-primary);
    text-align: right;
}

.status-estoque { color: var(--gray-medium); }
.status-vendida { color: var(--warning); }
.status-validada { color: var(--success); }
.status-suspeita { color: var(--error); }

.buyer-section {
    background: rgba(21, 21, 21, 0.5);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(192, 192, 192, 0.1);
}

.buyer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white-primary);
}

.buyer-section p {
    color: var(--gray-medium);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--black-secondary);
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    border-bottom: 1px solid rgba(192, 192, 192, 0.1);
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(192, 192, 192, 0.1);
    color: var(--white-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.modal-body {
    padding: 0 24px 24px;
}

.buyer-details {
    background: rgba(21, 21, 21, 0.5);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(192, 192, 192, 0.1);
    margin-bottom: 20px;
}

.buyer-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--white-primary);
}

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

/* Footer */
.validator-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(192, 192, 192, 0.1);
    margin-top: 60px;
}

.validator-footer p {
    color: var(--gray-medium);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.validator-footer a {
    color: var(--accent-silver);
    text-decoration: none;
    transition: var(--transition);
}

.validator-footer a:hover {
    color: var(--white-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .validator-container {
        padding: 0 16px;
    }
    
    .validator-card {
        padding: 24px;
        margin: 0 8px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .validator-header {
        padding: 20px 0 40px;
    }
    
    .result-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .modal-content {
        margin: 0 8px;
    }
    
    .modal-header,
    .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .validator-card {
        padding: 20px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-outline {
        width: 100%;
    }
}

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

.validator-card {
    animation: fadeInUp 0.6s ease-out;
}

.result-section {
    animation: fadeInUp 0.4s ease-out;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled::before {
    display: none;
}

/* Focus states for accessibility */
.form-input:focus,
.btn:focus {
    outline: 2px solid var(--accent-silver);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --black-primary: #000000;
        --white-primary: #FFFFFF;
        --gray-medium: #CCCCCC;
    }
}

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