/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores MSL Estratégia */
    --primary-color: #40BEAF;      /* Turquesa MSL */
    --primary-dark: #2D9A8C;       /* Turquesa escuro */
    --primary-light: #5FCFBD;      /* Turquesa claro */
    --accent-color: #00CEC9;       /* Verde água */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

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

.header-left {
    text-align: left;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-primary);
}

.user-avatar:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.user-avatar svg {
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 250px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-header strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-header span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item svg {
    color: var(--text-secondary);
}

/* Navigation Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    background: transparent;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: #000000;
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-btn svg {
    transition: var(--transition);
}

.tab-btn:hover svg {
    transform: scale(1.1);
}

/* Content Area */
.content {
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Card */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card-header {
    background: #000000;
    color: white;
    padding: 2rem;
}

.card-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Form */
.form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 2rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.file-upload-placeholder:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.file-upload-placeholder svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-upload-placeholder p {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-upload-placeholder span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.file-preview {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.file-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: var(--bg-secondary);
}

.remove-file {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-file:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

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

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Relatório Resultado */
.relatorio-resultado {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border-top: 3px solid var(--primary-color);
}

.relatorio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.relatorio-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.relatorio-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item strong {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-content h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
}

.relatorio-table {
    width: 100%;
    border-collapse: collapse;
}

.relatorio-table thead {
    background: var(--bg-tertiary);
}

.relatorio-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.relatorio-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.relatorio-table tbody tr {
    transition: var(--transition);
}

.relatorio-table tbody tr:hover {
    background: var(--bg-secondary);
}

.relatorio-table tbody tr:last-child td {
    border-bottom: none;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
}

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

.btn-filter-clear {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-filter-clear:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem;
    border: 2px solid var(--border-color);
}

.btn-view-toggle {
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.btn-view-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-view-toggle.active {
    background: #000000;
    color: white;
}

.btn-view-toggle svg {
    display: block;
}

/* Peças Grid */
.pecas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

/* Peças List */
.pecas-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.peca-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.peca-card:nth-child(even) {
    background: #F3F6F6;
}

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

/* Peca Card List View */
.pecas-list .peca-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem;
}

.pecas-list .peca-card-header {
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 200px;
}

.pecas-list .peca-card-body {
    flex: 1;
    margin-bottom: 0;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.pecas-list .peca-info {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.pecas-list .peca-info-item {
    min-width: auto;
}

.pecas-list .peca-card-footer {
    margin-left: auto;
    flex: 0 0 auto;
    border-top: none;
    padding-top: 0;
    min-width: 300px;
}

.pecas-list .peca-card:hover {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.peca-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.peca-card-title {
    flex: 1;
}

.peca-card-title h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.peca-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.peca-card-body {
    margin-bottom: 1rem;
}

.peca-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.peca-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.peca-info-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.peca-info-item strong {
    color: var(--text-primary);
    min-width: 100px;
}

.peca-card-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-small {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-small svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-view {
    background: var(--primary-color);
    color: white;
}

.btn-view:hover {
    background: var(--primary-dark);
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
}

/* Configuração */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0;
}

.config-list {
    margin-top: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.config-item:hover {
    background: var(--bg-tertiary);
}

.config-item-content {
    flex: 1;
}

.config-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.config-item-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.config-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-delete {
    background: var(--danger-color);
    color: white;
}

.btn-icon-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

.modal-content-form {
    position: relative;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content-form h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-close-edit {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: var(--transition);
    z-index: 10;
}

.modal-close-edit:hover {
    background: var(--danger-color);
    color: white;
}

/* Modal de Login */
.modal-content-login {
    position: relative;
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-close-login {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: var(--transition);
    border: none;
}

.modal-close-login:hover {
    background: var(--danger-color);
    color: white;
}

/* Painel de Administração */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00CEC9 0%, #008b87 100%);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.admin-content {
    margin-bottom: 2rem;
}

/* Tabela de Usuários */
.usuarios-table-wrapper {
    overflow-x: auto;
    padding: 1.5rem;
}

.usuarios-table {
    width: 100%;
    border-collapse: collapse;
}

.usuarios-table thead {
    background: var(--bg-tertiary);
}

.usuarios-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.usuarios-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.usuarios-table tbody tr {
    transition: var(--transition);
}

.usuarios-table tbody tr:hover {
    background: var(--bg-secondary);
}

.usuarios-table tbody tr:last-child td {
    border-bottom: none;
}

.permission-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permission-badge.master {
    background: #10b981;
    color: white;
}

.permission-badge.social_media {
    background: #3b82f6;
    color: white;
}

.permission-badge.financeiro {
    background: #f59e0b;
    color: white;
}

.btn-table {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-table-delete {
    background: var(--danger-color);
    color: white;
}

.btn-table-delete:hover {
    background: #dc2626;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    z-index: 1001;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.success-message svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .relatorio-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .filter-bar {
        flex-direction: column;
    }

    .pecas-grid {
        grid-template-columns: 1fr;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .pecas-list .peca-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .pecas-list .peca-card-header {
        min-width: 100%;
        margin-bottom: 1rem;
    }

    .pecas-list .peca-card-body {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
    }

    .pecas-list .peca-card-footer {
        min-width: 100%;
        width: 100%;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .header,
    .tabs,
    .filter-bar,
    .form-actions,
    .btn,
    .peca-card-footer {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .relatorio-resultado {
        background: white;
    }
}

/* ============================================
   ANIMAÇÕES E MELHORIAS VISUAIS MSL
   ============================================ */

/* Animações de Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Hover Effects nos Cards de Peças */
.peca-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease-out;
}

.peca-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(64, 190, 175, 0.25), 
                0 15px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.peca-card:hover .peca-card-title h3 {
    color: var(--primary-color);
}

/* Botões com animações */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(64, 190, 175, 0.3);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Tabs com transição suave */
.tab-btn {
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover::after {
    width: 80%;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Loading Spinner Bonito */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(64, 190, 175, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Animação de entrada para inputs */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 190, 175, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Badge animado */
.peca-badge {
    transition: all 0.3s ease;
}

.peca-card:hover .peca-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(64, 190, 175, 0.3);
}

/* Mensagens de sucesso animadas */
.success-message {
    animation: slideIn 0.4s ease, fadeOut 0.3s ease 2.7s;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Header com gradiente animado */
.header {
    position: relative;
    overflow: visible;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(64, 190, 175, 0.05) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Cards com sombra animada */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 30px rgba(64, 190, 175, 0.15);
}

/* Stat Cards animados */
.stat-card {
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(64, 190, 175, 0.2);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon {
    transition: all 0.3s ease;
}

/* Smooth scroll para toda página */
html {
    scroll-behavior: smooth;
}

/* Transição suave para modais */
.modal {
    transition: all 0.3s ease;
}

.modal.active .modal-content,
.modal.active .modal-content-form,
.modal.active .modal-content-login {
    animation: fadeIn 0.3s ease;
    transform: scale(1);
}

/* Badge de permissão com cor MSL */
.permission-badge {
    transition: all 0.3s ease;
}

.permission-badge.master {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    animation: pulse 2s infinite;
}

/* File upload com hover animado */
.file-upload-wrapper {
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background: rgba(64, 190, 175, 0.05);
}

.file-upload-placeholder {
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-placeholder {
    transform: translateY(-5px);
}

/* Dropdown animado */
.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(64, 190, 175, 0.1);
    padding-left: 1.5rem;
    color: var(--primary-color);
}

/* Skeleton loading para cards */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Pulse effect para notificações */
@keyframes notification-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(64, 190, 175, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(64, 190, 175, 0);
    }
}

.notification-badge {
    animation: notification-pulse 2s infinite;
}

/* Transição suave para empty state */
.empty-state {
    animation: fadeIn 0.5s ease;
}

.empty-state svg {
    animation: bounce 2s infinite;
}

/* Gradient text para títulos especiais */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Entrada animada para lista de peças */
.pecas-grid > * {
    animation: fadeIn 0.5s ease;
}

.pecas-grid > *:nth-child(1) { animation-delay: 0.1s; }
.pecas-grid > *:nth-child(2) { animation-delay: 0.2s; }
.pecas-grid > *:nth-child(3) { animation-delay: 0.3s; }
.pecas-grid > *:nth-child(4) { animation-delay: 0.4s; }

/* Glow effect para elementos importantes */
.glow {
    box-shadow: 0 0 20px rgba(64, 190, 175, 0.5);
    animation: pulse 2s infinite;
}

/* Responsive animations - desabilitar em mobile para performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
