@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: hsl(120, 15%, 98%);
    --bg-card: hsla(0, 0%, 100%, 0.9);
    --bg-card-hover: hsla(120, 15%, 96%, 0.95);
    --border-color: hsla(120, 10%, 82%, 0.6);
    --border-color-hover: hsla(120, 35%, 32%, 0.4);
    
    --primary-gradient: linear-gradient(135deg, hsl(120, 35%, 32%), hsl(100, 30%, 45%));
    --primary-color: hsl(120, 35%, 32%); /* Verde Musgo Premium */
    --primary-hover: hsl(120, 35%, 26%);
    --primary-glow: rgba(85, 107, 47, 0.2);
    
    --text-main: hsl(120, 20%, 15%);
    --text-muted: hsl(120, 10%, 42%);
    --text-dark: hsl(0, 0%, 100%);
    
    --success: hsl(145, 70%, 35%);
    --danger: hsl(0, 75%, 45%);
    --warning: hsl(38, 90%, 45%);
    --info: hsl(195, 80%, 40%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 24px rgba(0, 0, 0, 0.08);
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 20%, hsla(120, 35%, 32%, 0.03) 0px, transparent 50%),
        radial-gradient(at 90% 80%, hsla(100, 30%, 45%, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: hsl(120, 15%, 96%);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Base Layout and Container */
.container {
    width: 100%;
    max-width: clamp(1024px, 98%, 1850px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Estilização para Ícones Lucide Flat */
.icon {
    width: 1.1em;
    height: 1.1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
    display: inline-block;
    transition: transform 0.2s ease;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-md {
    width: 20px;
    height: 20px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* Header Navigation */
header.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.2s ease;
}

.logo a:hover {
    transform: scale(1.02);
}

nav.nav-links {
    display: flex;
    gap: 1.5rem;
}

nav.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

nav.nav-links a:hover, nav.nav-links a.active {
    color: var(--primary-color);
    background: hsla(120, 35%, 32%, 0.06);
}

nav.nav-links a.active {
    border: 1px solid var(--primary-color);
    background: hsla(120, 35%, 32%, 0.08);
    color: var(--primary-color);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(85, 107, 47, 0.08);
}

.card:hover::before {
    opacity: 1;
}

/* Headings */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-main);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 107, 47, 0.4);
}

.btn-secondary {
    background: hsla(0, 0%, 0%, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: hsla(0, 0%, 0%, 0.08);
    border-color: var(--text-muted);
}

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

.btn-danger:hover {
    background: hsl(0, 80%, 50%);
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon-only .icon {
    margin: 0 !important;
}

.btn-disabled, .btn:disabled {
    background: hsla(220, 10%, 50%, 0.2) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* Forms and Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: hsl(0, 0%, 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.15);
    background: hsl(0, 0%, 100%);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23556b2f'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
}

/* Badge tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(46, 204, 113, 0.15); color: hsl(145, 75%, 65%); border: 1px solid rgba(46, 204, 113, 0.2); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: hsl(0, 80%, 75%); border: 1px solid rgba(231, 76, 60, 0.2); }
.badge-warning { background: rgba(241, 196, 15, 0.15); color: hsl(38, 95%, 70%); border: 1px solid rgba(241, 196, 15, 0.2); }
.badge-info { background: rgba(52, 152, 219, 0.15); color: hsl(195, 85%, 70%); border: 1px solid rgba(52, 152, 219, 0.2); }

/* Toasts and Alerts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
}

.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .header-container { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.animated-fade {
    animation: fadeIn 0.4s ease forwards;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    width: 90%;
    max-width: 550px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-main);
}

/* Customização dos Inputs de Upload de Arquivo */
input[type="file"].form-control {
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

input[type="file"].form-control::file-selector-button {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1.25rem;
    margin-right: 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px var(--primary-glow);
}

input[type="file"].form-control::-webkit-file-upload-button {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1.25rem;
    margin-right: 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px var(--primary-glow);
}

input[type="file"].form-control::file-selector-button:hover,
input[type="file"].form-control::-webkit-file-upload-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
