/* Component Styles */

/* Header */
.app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation Tabs */
.app-nav {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    overflow-x: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 24px;
    height: var(--nav-height);
    align-items: center;
}

.nav-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-primary-dark);
    font-weight: 500;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
}

/* User Avatar placeholder */
.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Submenu Styles */
.submenu-container {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
}

.submenu-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.submenu-item:hover {
    color: var(--color-primary);
}

.submenu-item.active {
    color: var(--color-primary);
    font-weight: 700;
}

/* Table Styles - Lançamentos */
.data-table-container {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-top: 0;
    box-shadow: none;
}

.action-bar {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-bottom: none;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-group input {
    margin: 0;
    width: auto;
    min-width: 150px;
}

table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table.data-table thead {
    background: transparent;
}

table.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: #F9FAFB;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

table.data-table th:first-child {
    border-top-left-radius: 8px;
}

table.data-table th:last-child {
    border-top-right-radius: 8px;
}

table.data-table tbody {
    background: white;
}

table.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-main);
    background: white;
}

table.data-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

table.data-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

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

/* Badge Status Styles */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background: #FEF2F2;
    color: #991B1B;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

/* Form Styles Extension */
.form-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--color-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-main);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideUp 0.3s;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.2s;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Chip Toggle Buttons */
.chip-toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.chip-toggle {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #E5E7EB;
    background: #F9FAFB;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.chip-toggle:hover {
    border-color: #D1D5DB;
    background: #F3F4F6;
}

.chip-toggle.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.chip-toggle input[type="checkbox"] {
    display: none;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 0;
    margin: 0;
}

.toast {
    display: flex;
    align-items: center;
    min-width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 5px solid;
    animation: toastSlideIn 0.3s ease-out;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(20px);
}

.toast-content {
    flex: 1;
    padding: 0 12px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: #111827;
}

.toast-message {
    font-size: 13px;
    color: #6B7280;
}

.toast-close {
    cursor: pointer;
    color: #9CA3AF;
    background: none;
    border: none;
    font-size: 18px;
    padding: 4px;
}

.toast-close:hover {
    color: #374151;
}

/* Toast Variants */
.toast-success {
    border-left-color: #10B981;
}

.toast-success i {
    color: #10B981;
}

.toast-error {
    border-left-color: #EF4444;
}

.toast-error i {
    color: #EF4444;
}

.toast-warning {
    border-left-color: #F59E0B;
}

.toast-warning i {
    color: #F59E0B;
}

.toast-info {
    border-left-color: #3B82F6;
}

.toast-info i {
    color: #3B82F6;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Input Feedback */
.input-success {
    border-color: #10B981 !important;
    background-color: #ECFDF5 !important;
    transition: all 0.3s;
}

/* Fix Dropdown Stacking in Item Lists */
.item-row:focus-within {
    z-index: 1000 !important;
}

.custom-dropdown-container {
    position: relative;
    z-index: 1001;
}

/* Dashboard Specifics */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.kpi-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Table Hover Effect */
.tr-hover:hover td {
    background-color: #F3F4F6 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}