:root {
    --primary-color: #2962ff;
    --primary-light: #768fff;
    --primary-dark: #0039cb;
    --secondary-color: #00bcd4;
    --secondary-light: #62efff;
    --secondary-dark: #008ba3;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background-light: #f9f9f9;
    --background-main: #f5f5f5;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.15);
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-main);
    color: var(--text-primary);
    line-height: 1.6;
}

main {
    flex: 1 0 auto;
    padding: 30px 0;
}

.container {
    margin-top: 20px;
    margin-bottom: 20px;
    width: 90%;
    max-width: 1280px;
}

/* Card panels */
.card-panel {
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 0.5rem 0 1rem 0;
    transition: var(--transition-standard);
    box-shadow: var(--card-shadow);
}

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

.card-panel .material-icons.medium {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-panel p {
    margin: 10px 0 0 0;
    color: var(--text-secondary);
}

.card-panel p b {
    color: var(--text-primary);
    font-weight: 500;
}

/* Cards com efeitos de elevação */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition-standard);
    overflow: hidden;
    border: none;
    margin-bottom: 30px;
}

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

.card .card-content {
    padding: 24px;
}

.card .card-title {
    font-weight: 500;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.card .card-title i {
    margin-right: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Botões com efeitos */
.btn, .btn-large {
    border-radius: 30px;
    text-transform: none;
    letter-spacing: 0.5px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(41, 98, 255, 0.2);
    transition: var(--transition-standard);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 0 25px;
}

.btn:hover, .btn-large:hover {
    box-shadow: 0 6px 15px rgba(41, 98, 255, 0.3);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.btn-flat {
    border-radius: 30px;
    transition: var(--transition-standard);
    color: var(--primary-color);
    font-weight: 500;
    padding: 0 15px;
}

.btn-flat:hover {
    background-color: rgba(41, 98, 255, 0.08);
    color: var(--primary-dark);
}

.file-field .btn {
    height: 42px;
    line-height: 42px;
    padding: 0 20px;
}

.btn i, .btn-large i, .btn-floating i {
    font-size: 1.2rem;
    line-height: inherit;
    vertical-align: middle;
    margin-right: 8px;
}

/* Coleções e itens de lista */
.collection {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: none;
    box-shadow: var(--card-shadow);
}

.collection .collection-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-standard);
    padding: 16px 20px;
}

.collection .collection-item:hover {
    background-color: var(--background-light);
    transform: translateX(5px);
}

.collection .collection-item.avatar {
    min-height: 72px;
    padding-left: 82px;
}

.collection .collection-item.avatar i.circle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.collection .collection-item .title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.collection .collection-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* Divider */
.divider {
    margin: 20px 0;
    height: 1px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.08);
}

/* Footer */
footer.page-footer {
    margin-top: 40px;
    padding-top: 30px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer.page-footer .footer-copyright {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: 300;
}

footer.page-footer ul li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
}

footer.page-footer ul li i {
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.9);
}

/* Área de texto OCR */
#ocr-text {
    min-height: 250px;
    font-family: 'Roboto Mono', monospace;
    white-space: pre-wrap;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 450px;
    background-color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--transition-standard);
}

#ocr-text:focus {
    border-color: var(--primary-light);
    box-shadow: inset 0 2px 4px rgba(41, 98, 255, 0.1);
    outline: none;
}

/* Imagem de preview */
.card-image {
    overflow: hidden;
    max-height: 450px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
}

.card-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    object-fit: cover;
}

.card-image:hover img {
    transform: scale(1.05);
}

.card-image .card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: white;
    margin: 0;
    font-weight: 400;
}

/* Espaçamentos */
.mt-4 {
    margin-top: 30px;
}

.mb-4 {
    margin-bottom: 30px;
}

.mt-2 {
    margin-top: 15px;
}

.mb-2 {
    margin-bottom: 15px;
}

.p-4 {
    padding: 30px;
}

.p-2 {
    padding: 15px;
}

/* Animações para loaders */
@keyframes pulse {
    0% {
        transform: scale(0.97);
        box-shadow: 0 0 0 0 rgba(41, 98, 255, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(41, 98, 255, 0);
    }
    
    100% {
        transform: scale(0.97);
        box-shadow: 0 0 0 0 rgba(41, 98, 255, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Animação de destaque para o texto copiado */
@keyframes highlight {
    0% {
        background-color: rgba(41, 98, 255, 0.1);
    }
    50% {
        background-color: rgba(41, 98, 255, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.highlight-animation {
    animation: highlight 1s ease-out;
}

/* Animação de escala para botões */
@keyframes scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.scale-animation {
    animation: scale 0.5s ease-out;
}

/* Toast personalizado */
#toast-container {
    top: auto !important;
    right: auto !important;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.toast {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.toast.red {
    background-color: var(--error-color);
}

.toast.blue {
    background-color: var(--primary-color);
}

/* Tabs com animação */
.tabs {
    background-color: transparent;
}

.tabs .indicator {
    background-color: white;
    height: 4px;
    border-radius: 4px 4px 0 0;
}

.tabs .tab a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-standard);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
}

.tabs .tab a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.tabs .tab a.active {
    color: white;
    font-weight: 500;
}

.tabs .tab a:focus, .tabs .tab a:focus.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.tabs .tab a i {
    margin-right: 8px;
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Navbar com sombra */
nav {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

nav .brand-logo {
    font-weight: 500;
    display: flex;
    align-items: center;
}

nav .brand-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

nav .nav-wrapper {
    padding: 0 15px;
}

nav ul a {
    transition: var(--transition-standard);
    font-weight: 500;
}

nav ul a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsividade */
@media only screen and (max-width: 600px) {
    .card-image {
        max-height: 250px;
    }
    
    .btn-large {
        height: 48px;
        line-height: 48px;
        font-size: 15px;
        padding: 0 20px;
    }
    
    .card-title {
        font-size: 1.3rem !important;
    }
    
    .container {
        width: 95%;
    }
    
    nav .brand-logo {
        font-size: 1.5rem;
    }
    
    #ocr-text {
        max-height: 300px;
    }
}

.tabs .tab a {
    padding: 0 10px;
}

/* Efeito de ripple para botões */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* Inputs e formulários */
.input-field label {
    color: var(--text-secondary);
}

.input-field input[type=text]:focus + label,
.input-field input[type=password]:focus + label,
.input-field input[type=email]:focus + label,
.input-field input[type=url]:focus + label,
.input-field input[type=date]:focus + label,
.input-field textarea.materialize-textarea:focus + label {
    color: var(--primary-color);
}

.input-field input[type=text]:focus,
.input-field input[type=password]:focus,
.input-field input[type=email]:focus,
.input-field input[type=url]:focus,
.input-field input[type=date]:focus,
.input-field textarea.materialize-textarea:focus {
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 1px 0 0 var(--primary-color);
}

.input-field .prefix.active {
    color: var(--primary-color);
}

.file-field .file-path-wrapper {
    overflow: hidden;
    padding-left: 10px;
}

.file-field input.file-path {
    border-radius: 30px;
    padding: 0 15px;
    height: 42px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: calc(100% - 15px);
}

/* Preloader personalizado */
.preloader-wrapper .spinner-blue-only {
    border-color: var(--primary-color);
}

#loading-section h5 {
    margin-top: 25px;
    font-weight: 500;
}

.progress {
    margin: 1.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress .indeterminate {
    background-color: var(--primary-color);
}

/* Ícones no loading */
#loading-section .fa-spin {
    animation-duration: 1.5s;
}

#loading-section .fa-2x {
    color: var(--primary-color);
    opacity: 0.8;
}

#loading-section .ml-4 {
    margin-left: 1.5rem;
}

#loading-section .mx-4 {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

/* Animações para elementos da página */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-in-out;
}

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

/* Estilo para o modal */
.modal {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 90%;
}

.modal .modal-content {
    padding: 24px;
}

.modal .modal-content h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
}

.modal .modal-content h4 i {
    margin-right: 8px;
}

.modal .modal-footer {
    border-top: 1px solid #e0e0e0;
}