/* Reset e variáveis globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-width: 260px;
    --header-height: 70px;
    --footer-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cabeçalho */
.header {
    background: rgba(255, 255, 255, 0.95);
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 2em;
}

.logo-text {
    font-size: 1.8em;
    font-weight: bold;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    color: var(--primary-color);
}

/* Container principal */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* Menu lateral */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    overflow-y: auto;
    padding: 20px 0;
    transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.menu-category {
    margin-bottom: 25px;
}

.category-title {
    padding: 12px 20px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    font-size: 1.2em;
}

.menu-items {
    list-style: none;
}

.menu-item {
    padding: 0;
}

.menu-link {
    display: block;
    padding: 12px 20px 12px 50px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-link.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

/* Conteúdo principal */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
}

.page-title {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Card de ferramenta */
.tool-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.5s ease;
}

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

.tool-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.tool-icon {
    font-size: 2em;
}

.tool-title {
    color: var(--primary-color);
    font-size: 1.8em;
    margin: 0;
}

.tool-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Formulários */
.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Botões */
button, .btn {
    background: var(--bg-gradient);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active, .btn:active {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Resultados */
.result {
    margin-top: 25px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1em;
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Rodapé */
.footer {
    background: rgba(255, 255, 255, 0.95);
    height: var(--footer-height);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.footer-content {
    text-align: center;
    color: #666;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Cards de boas-vindas */
.welcome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.welcome-card-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.welcome-card-title {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.welcome-card-count {
    color: #666;
    font-size: 0.9em;
}

/* Responsivo */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 20px;
    }

    .page-title {
        font-size: 2em;
    }

    .tool-card {
        padding: 20px;
    }
}
