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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333333;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-item {
    padding: 8px 16px;
    color: #999999;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item:hover {
    color: #ffffff;
    background-color: #333333;
}

.nav-item.active {
    color: #ffffff;
    background-color: #404040;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-email {
    font-size: 13px;
    color: #999999;
}

.user-email i {
    margin-right: 6px;
}

.btn-sair {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #666666;
    color: #999999;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sair:hover {
    border-color: #ffffff;
    color: #ffffff;
}

/* Main Content */
.main-content {
    padding: 12px 24px;
    padding-top: 60px;
}

/* Filters */
.filters {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 0;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    position: sticky;
    top: 47px;
    z-index: 95;
}

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

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #666666;
    white-space: nowrap;
}

.filter-select,
.filter-input {
    padding: 6px 10px;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: #1a1a1a;
    font-size: 13px;
    min-width: 140px;
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.filter-input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
    color: #666666;
}

/* Table Container */
.table-container {
    background-color: #ffffff;
    border-radius: 0;
    overflow: visible;
    border: 1px solid #e0e0e0;
    border-top: none;
}

/* Table */
.activities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.activities-table thead {
    background-color: #1a1a1a;
}

.activities-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid #333333;
    background-color: #1a1a1a;
    position: sticky;
    top: 88px;
    z-index: 80;
}

.activities-table th:nth-child(3) {
    text-align: left;
}

.activities-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
    text-align: center;
}

.activities-table td:nth-child(3) {
    text-align: left;
}

/* Row Types */
.row-mae {
    background-color: #1a1a1a;
    color: #ffffff;
}

.row-mae td {
    border-bottom-color: #333333;
}

.row-mae .activity-name {
    font-weight: 600;
    color: #ffffff;
}

.row-filha {
    background-color: #f0f0f0;
}

.row-filha .activity-name {
    font-weight: 500;
    color: #1a1a1a;
}

.row-neta {
    background-color: #f8f8f8;
}

.row-neta .activity-name {
    color: #333333;
}

.row-bisneta {
    background-color: #fafafa;
}

.row-bisneta .activity-name {
    color: #333333;
}

.row-etapa {
    background-color: #ffffff;
}

.row-etapa .activity-name {
    color: #666666;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.actions-cell i {
    color: #999999;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
}

.actions-cell i:hover {
    color: #1a1a1a;
}

.row-mae .actions-cell i {
    color: #999999;
}

.row-mae .actions-cell i:hover {
    color: #ffffff;
}

/* Tipo - texto simples sem badge */
.tipo-text {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.row-mae .tipo-text {
    color: #999999;
}

.row-filha .tipo-text {
    color: #666666;
}

.row-neta .tipo-text,
.row-bisneta .tipo-text {
    color: #888888;
}

.row-etapa .tipo-text {
    color: #aaaaaa;
}

/* Activity Name */
.activity-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Input inline (sem bordas) */
.input-inline {
    width: 45px;
    padding: 4px 2px;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: inherit;
    font-size: 12px;
    text-align: center;
    font-family: inherit;
}

.input-inline:hover {
    border-bottom-color: #cccccc;
}

.input-inline:focus {
    outline: none;
    border-bottom-color: #1a1a1a;
    background-color: rgba(0,0,0,0.03);
}

.row-mae .input-inline {
    color: #ffffff;
}

.row-mae .input-inline:hover {
    border-bottom-color: #666666;
}

.row-mae .input-inline:focus {
    border-bottom-color: #999999;
    background-color: rgba(255,255,255,0.1);
}

/* Remove spinner from number inputs */
.input-inline::-webkit-outer-spin-button,
.input-inline::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-inline {
    -moz-appearance: textfield;
}

/* Date picker */
.input-date {
    padding: 2px 4px;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: inherit;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}

.input-date:hover {
    border-bottom-color: #cccccc;
}

.input-date:focus {
    outline: none;
    border-bottom-color: #1a1a1a;
}

.row-mae .input-date {
    color: #ffffff;
    color-scheme: dark;
}

.row-mae .input-date:hover {
    border-bottom-color: #666666;
}

.row-mae .input-date:focus {
    border-bottom-color: #999999;
}

.input-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
}

.input-date:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.row-mae .input-date::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Status Cell */
.status-cell {
    text-align: center;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-select {
    width: 70px;
    padding: 3px 4px;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: #666666;
    font-size: 10px;
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.status-select option {
    background-color: #ffffff;
    color: #1a1a1a;
}

.row-mae .status-select {
    background-color: #2a2a2a;
    border-color: #444444;
    color: #999999;
}

.row-mae .status-select option {
    background-color: #2a2a2a;
    color: #ffffff;
}

/* Status colors - mantendo cores para status pois são indicadores importantes */
.status-dot[style*="4a9eff"] { background-color: #666666 !important; }
.status-dot[style*="eab308"] { background-color: #888888 !important; }
.status-dot[style*="ef4444"] { background-color: #1a1a1a !important; }
.status-dot[style*="f97316"] { background-color: #aaaaaa !important; }
.status-dot[style*="10b981"] { background-color: #444444 !important; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* Table horizontal scroll */
body {
    overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .activities-table {
        min-width: 1400px;
    }
}

/* Highlight row on hover */
.activities-table tbody tr:hover {
    filter: brightness(0.97);
}

.activities-table tbody tr.row-mae:hover {
    filter: brightness(1.15);
}
