* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

::-webkit-input-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

::-moz-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

:-ms-input-placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

body[data-theme="dark"] ::placeholder {
    color: #777 !important;
    opacity: 1 !important;
}

body[data-theme="dark"] ::-webkit-input-placeholder {
    color: #777 !important;
    opacity: 1 !important;
}

body[data-theme="dark"] ::-moz-placeholder {
    color: #777 !important;
    opacity: 1 !important;
}

body[data-theme="dark"] :-ms-input-placeholder {
    color: #777 !important;
    opacity: 1 !important;
}

select.select-placeholder {
    color: #999 !important;
}

select.select-placeholder option {
    color: #333;
}

body[data-theme="dark"] select.select-placeholder {
    color: #777 !important;
}

body[data-theme="dark"] select.select-placeholder option {
    color: #e0e0e0;
}

html, body {
    overflow-x: hidden;
    overflow-y: visible;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
}

body[data-theme="dark"] .container {
    background-color: #1a1a1a;
}

.sidebar {
    width: 250px;
    background-color: #000000;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.company-selector {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.company-selector label {
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-select {
    width: 100%;
    padding: 10px 12px;
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.company-select:hover {
    border-color: #3498db;
    background-color: #222;
}

.company-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.company-select option {
    background-color: #1a1a1a;
    color: white;
    padding: 10px;
}

.company-dropdown {
    position: relative;
}

.company-selector-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.company-selector-btn:hover {
    border-color: #3498db;
    background-color: #222;
}

.company-logo-container {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.company-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-initials {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

.company-icon-placeholder {
    color: #666;
}

.company-logo-sm {
    max-width: 50px;
    max-height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.company-name {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.15s;
}

.company-selector-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.company-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.company-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: white;
}

.company-dropdown-item:hover {
    background-color: #2d2d2d;
}

.company-dropdown-item span {
    flex: 1;
    font-size: 14px;
}

.sidebar nav a.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background-color 0.15s;
}

.sidebar nav a.nav-link:hover {
    background-color: #34495e;
}

.sidebar nav a.nav-link.active {
    background-color: #2c3e50;
    font-weight: 600;
    border-left: 3px solid #3498db;
    padding-left: 12px;
}

.sidebar nav a.nav-link svg {
    flex-shrink: 0;
}

/* Collapsible menu items */
.nav-item-collapsible {
    position: relative;
}

.nav-link-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.nav-link-wrapper .nav-link {
    flex: 1;
    margin-bottom: 0;
}

.nav-collapse-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-left: -8px;
}

.nav-collapse-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.nav-collapse-btn .chevron-icon {
    transition: transform 0.15s;
}

.nav-collapse-btn.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.nav-submenu {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.15s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.nav-submenu.collapsed {
    max-height: 0;
    opacity: 0;
}

.sidebar nav a.nav-sublink {
    padding-left: 47px;
    font-size: 14px;
    opacity: 0.9;
}

.sidebar nav a.nav-sublink:hover {
    opacity: 1;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    min-width: 0;
    overflow: visible;
}

/* Container com scroll horizontal para tabelas */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    margin: 10px 0;
}

.table-scroll table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-scroll th,
.table-scroll td {
    white-space: nowrap;
}

/* Coluna fixa (primeira) dentro de table-scroll */
.table-scroll.sticky-first-col th:first-child,
.table-scroll.sticky-first-col td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--bg-primary, #fff);
    box-shadow: 3px 0 6px rgba(0,0,0,0.1);
}

.table-scroll.sticky-first-col thead th:first-child {
    z-index: 3;
    background-color: #3498db;
}

.table-scroll.sticky-first-col tbody tr:nth-child(even) td:first-child {
    background-color: var(--row-hover, #f9f9f9);
}

/* Dark mode para table-scroll */
[data-theme="dark"] .table-scroll {
    border-color: #444;
}

[data-theme="dark"] .table-scroll.sticky-first-col th:first-child {
    background-color: #34495e;
}

[data-theme="dark"] .table-scroll.sticky-first-col td:first-child {
    background-color: var(--bg-primary, #1e1e1e);
}

[data-theme="dark"] .table-scroll.sticky-first-col tbody tr:nth-child(even) td:first-child {
    background-color: var(--row-hover, #2c2c2c);
}

.admin-nav-bar {
    background-color: #2c3e50;
    padding: 0;
    margin: -20px -20px 30px -20px;
    display: flex;
    gap: 0;
    border-bottom: 3px solid #1a252f;
}

.admin-nav-link {
    color: white;
    text-decoration: none;
    padding: 18px 30px;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
    display: inline-block;
}

.admin-nav-link:hover {
    background-color: #34495e;
}

.admin-nav-link.active {
    background-color: #1a252f;
    border-bottom: 3px solid #3498db;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin: 0 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: #e3f2fd;
}

.icon-btn-danger {
    color: #f44336;
}

.icon-btn-danger:hover {
    background-color: #ffebee;
}

.top-bar {
    background-color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.company-selector select {
    padding: 8px 12px;
    border: 1px solid #ffffff;
    border-radius: 5px;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background-color 0.15s;
}

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

.btn-primary:hover {
    background-color: #229954;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.content-box {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    max-width: 100%;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group--stack-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    gap: 5px;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    width: fit-content;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    animation: alertSlideIn 0.3s ease, alertFadeOut 0.5s ease 3.5s forwards;
}

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

@keyframes alertFadeOut {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

.alert-success {
    background-color: #27ae60;
    color: white;
}

.alert-error {
    background-color: #e74c3c;
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Coluna de texto longo (Tarefa/Meta/Projeto) - quebra de linha */
.col-text-wrap {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.col-text-wrap .item-content {
    min-width: 0;
}

.col-text-wrap .item-name {
    min-width: 0;
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

table tr:hover {
    background-color: #f8f9fa;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-row:hover {
    background-color: #e3f2fd !important;
}

.clickable-row:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    background-color: #e3f2fd !important;
}

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

.actions a,
.actions button {
    font-size: 12px;
    padding: 6px 12px;
}

/* Table cell for actions - ensures vertical centering */
td.actions-cell {
    vertical-align: middle !important;
    text-align: right;
}

td.actions-cell .actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

h1, h2 {
    color: #ffffff;
    margin-bottom: 20px;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
}

.permission-matrix {
    overflow-x: auto;
}

.permission-matrix table {
    min-width: 800px;
}

.permission-matrix th {
    min-width: 150px;
}

.permission-matrix td {
    text-align: center;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.admin-link-card {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.admin-link-card:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.admin-link-card h3 {
    margin-bottom: 10px;
    color: #3498db;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 20px;
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.btn-back:hover {
    background-color: #bdc3c7;
    border-color: #95a5a6;
}

.btn-back svg {
    flex-shrink: 0;
}

.company-links-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.company-link-row {
    display: grid;
    grid-template-columns: 200px 1fr 120px;
    gap: 15px;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.company-link-role select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.company-link-name {
    font-weight: 500;
    color: #2c3e50;
}

.company-link-active {
    text-align: right;
}

.dynamic-link-row {
    display: grid;
    grid-template-columns: 1fr 1fr 120px 50px;
    gap: 15px;
    align-items: end;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dynamic-link-field {
    display: flex;
    flex-direction: column;
}

.dynamic-link-field label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.dynamic-link-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.dynamic-link-field-checkbox {
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

.dynamic-link-actions {
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

.btn-remove-link {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-remove-link:hover {
    background-color: #c0392b;
}

.btn-remove-link svg {
    pointer-events: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 8px;
    padding-bottom: 5px;
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-footer-buttons {
    display: flex;
    gap: 4px;
    width: 100%;
}

.sidebar-footer-btn.half-btn {
    flex: 1;
    justify-content: center;
    padding: 8px;
}

.sidebar-footer-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 15px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.15s;
    text-decoration: none;
}

.sidebar-footer-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.logout-btn {
    background-color: transparent;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.theme-icon {
    flex-shrink: 0;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

body[data-theme="light"] .sun-icon {
    display: none;
}

body[data-theme="light"] .moon-icon {
    display: block;
}

body[data-theme="light"] .sidebar {
    background-color: #e8e8e8;
    color: #000;
}

body[data-theme="light"] .sidebar h2 {
    color: #000;
}

body[data-theme="light"] .company-selector label {
    color: #555;
}

body[data-theme="light"] .company-select {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

body[data-theme="light"] .company-select:hover {
    background-color: #f9f9f9;
    border-color: #3498db;
}

body[data-theme="light"] .company-select option {
    background-color: #fff;
    color: #000;
}

body[data-theme="light"] .company-selector-btn {
    background-color: #fff;
    color: #000;
    border-color: #ccc;
}

body[data-theme="light"] .company-selector-btn:hover {
    background-color: #f9f9f9;
    border-color: #3498db;
}

body[data-theme="light"] .company-dropdown-menu {
    background-color: #fff;
    border-color: #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .company-dropdown-item {
    color: #000;
}

body[data-theme="light"] .company-dropdown-item:hover {
    background-color: #f0f0f0;
}

body[data-theme="light"] .sidebar nav a.nav-link {
    color: #000;
}

body[data-theme="light"] .sidebar nav a.nav-link:hover {
    background-color: #d0d0d0;
}

body[data-theme="light"] .sidebar nav a.nav-link.active {
    background-color: #c0c0c0;
    font-weight: 600;
    border-left: 3px solid #3498db;
    padding-left: 12px;
}

body[data-theme="light"] .nav-collapse-btn {
    color: #000;
}

body[data-theme="light"] .nav-collapse-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] h1,
body[data-theme="light"] h2 {
    color: #000;
}

body[data-theme="light"] .user-profile-card {
    background-color: #d0d0d0;
    border-color: #bbb;
}

body[data-theme="light"] .user-profile-name {
    color: #000;
}

body[data-theme="light"] .user-profile-role {
    color: #555;
}

body[data-theme="light"] .user-profile-icon {
    color: #000;
}

body[data-theme="light"] .sidebar-footer {
    border-top: 2px solid rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .sidebar-footer-btn {
    background-color: transparent;
    color: #000;
    border: none;
}

body[data-theme="light"] .sidebar-footer-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .logout-btn {
    background-color: transparent;
    color: #000;
}

body[data-theme="light"] .logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .admin-nav-bar {
    background-color: #e0e0e0;
    border-bottom: 3px solid #ccc;
}

body[data-theme="light"] .admin-nav-link {
    color: #000;
}

body[data-theme="light"] .admin-nav-link:hover {
    background-color: #d0d0d0;
}

body[data-theme="light"] .admin-nav-link.active {
    background-color: #c8c8c8;
    border-bottom: 3px solid #3498db;
}

body[data-theme="dark"] .sun-icon {
    display: block;
}

body[data-theme="dark"] .moon-icon {
    display: none;
}

body[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body[data-theme="dark"] .main-content {
    background-color: #1a1a1a;
}

body[data-theme="dark"] .top-bar {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body[data-theme="dark"] .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .card:hover {
    border-color: #555;
}

body[data-theme="dark"] table {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body[data-theme="dark"] table th {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border-bottom: 1px solid #404040;
}

body[data-theme="dark"] table td {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-bottom: 1px solid #404040;
}

body[data-theme="dark"] table thead {
    background-color: #1f1f1f;
}

body[data-theme="dark"] table tbody tr {
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
}

body[data-theme="dark"] table tbody tr:hover,
body[data-theme="dark"] table tbody tr.clickable-row:hover {
    background-color: #3a3a3a;
}

body[data-theme="dark"] table tbody tr.clickable-row:focus {
    background-color: #3a3a3a;
    outline: 2px solid #4a90e2;
}

body[data-theme="dark"] .form-group label {
    color: #e0e0e0;
}

body[data-theme="dark"] .checkbox-label {
    color: #e0e0e0;
}

body[data-theme="dark"] .form-group input,
body[data-theme="dark"] .form-group select,
body[data-theme="dark"] .form-group textarea,
body[data-theme="dark"] .company-selector select,
body[data-theme="dark"] .company-link-role select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .form-group input:focus,
body[data-theme="dark"] .form-group select:focus,
body[data-theme="dark"] .form-group textarea:focus {
    border-color: #4a90e2;
    background-color: #333;
}

body[data-theme="dark"] .company-link-row {
    background-color: #2d2d2d;
    border-color: #404040;
}

body[data-theme="dark"] .company-link-name {
    color: #e0e0e0;
}

body[data-theme="dark"] .dynamic-link-row {
    background-color: #2d2d2d;
    border-color: #404040;
}

body[data-theme="dark"] .dynamic-link-field label {
    color: #e0e0e0;
}

body[data-theme="dark"] .dynamic-link-field select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .dynamic-link-field select:focus {
    border-color: #4a90e2;
    background-color: #333;
}

body[data-theme="dark"] .btn-remove-link {
    background-color: #c44;
}

body[data-theme="dark"] .btn-remove-link:hover {
    background-color: #a33;
}

body[data-theme="dark"] .alert-success {
    background-color: #27ae60;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body[data-theme="dark"] .alert-error {
    background-color: #e74c3c;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body[data-theme="dark"] .btn-primary {
    background-color: #4a90e2;
}

body[data-theme="dark"] .btn-primary:hover {
    background-color: #357abd;
}

body[data-theme="dark"] .btn-secondary {
    background-color: #555;
    color: #e0e0e0;
}

body[data-theme="dark"] .btn-secondary:hover {
    background-color: #666;
}

body[data-theme="dark"] .btn-danger {
    background-color: #c44;
}

body[data-theme="dark"] .btn-danger:hover {
    background-color: #a33;
}

body[data-theme="dark"] .btn-success {
    background-color: #27ae60;
}

body[data-theme="dark"] .btn-success:hover {
    background-color: #229954;
}

body[data-theme="dark"] .btn-back {
    background-color: #555;
    color: #e0e0e0;
    border-color: #666;
}

body[data-theme="dark"] .btn-back:hover {
    background-color: #666;
    border-color: #777;
}

body[data-theme="dark"] .sidebar {
    background-color: #1a1a1a;
    border-right: 1px solid #2d2d2d;
}

body[data-theme="dark"] .sidebar h2 {
    color: #e0e0e0;
}

body[data-theme="dark"] .sidebar nav a.nav-link {
    color: #e0e0e0;
}

body[data-theme="dark"] .sidebar nav a.nav-link:hover {
    background-color: #2d2d2d;
}

body[data-theme="dark"] .sidebar nav a.nav-link.active {
    background-color: #1a1a1a;
    font-weight: 600;
    border-left: 3px solid #3498db;
    padding-left: 12px;
}

body[data-theme="dark"] .sidebar-footer {
    border-top: 2px solid #2d2d2d;
}

body[data-theme="dark"] .sidebar-footer-btn {
    background-color: transparent;
    color: #e0e0e0;
}

body[data-theme="dark"] .sidebar-footer-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .logout-btn {
    background-color: transparent;
}

body[data-theme="dark"] .logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 0px;
}

.user-profile-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-profile-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

body[data-theme="dark"] .user-profile {
    background-color: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .user-profile-name {
    color: #e0e0e0;
}

body[data-theme="dark"] .user-profile-role {
    color: rgba(255, 255, 255, 0.5);
}

body[data-theme="dark"] .admin-link-card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .admin-link-card:hover {
    background-color: #353535;
    border-color: #4a90e2;
}

body[data-theme="dark"] .admin-link-card h3 {
    color: #4a90e2;
}

body[data-theme="dark"] .admin-link-card p {
    color: #b0b0b0;
}

body[data-theme="dark"] .content-box {
    background-color: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body[data-theme="dark"] .content-box h1,
body[data-theme="dark"] .content-box h2,
body[data-theme="dark"] .content-box h3,
body[data-theme="dark"] .content-box h4 {
    color: #e0e0e0 !important;
}

body[data-theme="dark"] .content-box p {
    color: #b0b0b0 !important;
}

body[data-theme="dark"] hr {
    border-top-color: #404040 !important;
}

.theme-toggle-login {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.theme-toggle-login:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
    transform: scale(1.05);
}

body[data-theme="dark"] .theme-toggle-login {
    background-color: #2d2d2d;
    border-color: #404040;
}

body[data-theme="dark"] .theme-toggle-login:hover {
    background-color: #3a3a3a;
    border-color: #4a90e2;
}

body[data-theme="dark"] .login-container {
    background-color: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body[data-theme="dark"] .login-container h1 {
    color: #e0e0e0;
}

body[data-theme="dark"] .login-container input {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .login-container input:focus {
    border-color: #4a90e2;
    background-color: #242424;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10000;
    font-size: 14px;
    min-width: 200px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.15s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background-color: #f44336;
}

.toast.info {
    background-color: #2196f3;
}

body[data-theme="dark"] .toast {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Confirm Modal - centered overlay popup */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.confirm-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.confirm-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body[data-theme="dark"] .confirm-modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-header {
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal form .form-group {
    margin-bottom: 12px;
}

.modal form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
}

.modal form .form-group input,
.modal form .form-group select,
.modal form .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
}

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

#task-goal {
    font-size: 16px;
}

body[data-theme="dark"] .modal form .form-group input,
body[data-theme="dark"] .modal form .form-group select,
body[data-theme="dark"] .modal form .form-group textarea {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: #444;
}

body[data-theme="dark"] .modal form .form-group select option {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
}

body[data-theme="dark"] select option {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
}

/* Bootstrap variable overrides for dark mode selects */
body[data-theme="dark"] {
    --bs-body-color: #ffffff;
    --bs-body-bg: #2c2c2c;
}

body[data-theme="dark"] .modal,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] select.form-select,
body[data-theme="dark"] select.form-control {
    --bs-body-color: #ffffff;
    color-scheme: dark;
}

body[data-theme="dark"] .form-select,
body[data-theme="dark"] select.form-select,
body[data-theme="dark"] select.form-control {
    color: #ffffff !important;
    background-color: #2c2c2c !important;
}

body[data-theme="dark"] .form-select option,
body[data-theme="dark"] select.form-select option,
body[data-theme="dark"] select.form-control option {
    color: #ffffff !important;
    background-color: #2c2c2c !important;
}

body[data-theme="dark"] .modal-footer {
    border-top-color: #444;
}

body[data-theme="light"] .modal {
    background-color: rgba(0,0,0,0.6);
}

body[data-theme="light"] .modal-content {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

body[data-theme="light"] .modal-content h2 {
    color: #2c3e50;
}

body[data-theme="light"] .modal-close {
    color: #999;
}

body[data-theme="light"] .modal-close:hover {
    color: #333;
}

body[data-theme="dark"] .modal {
    background-color: rgba(0,0,0,0.7);
}

body[data-theme="dark"] .modal-content {
    background-color: #2d2d2d;
}

body[data-theme="dark"] .modal-content h2 {
    color: #e0e0e0;
}

body[data-theme="dark"] .modal-close {
    color: #999;
}

body[data-theme="dark"] .modal-close:hover {
    color: #e0e0e0;
}

.goals-by-quarter {
    margin-top: 20px;
}

.quarter-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quarter-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.quarter-toggle {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.quarter-toggle:hover {
    background: #e9ecef;
}

.quarter-arrow {
    transition: transform 0.3s ease;
}

.quarter-content {
    display: block;
}

.quarter-section.collapsed .quarter-content {
    display: none;
}

/* Container de tabela com scroll horizontal */
.quarter-table-container,
.table-container,
.company-tasks-group {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.goals-table, .goals-table-vertical, .goals-table-grouped, .data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.goals-table thead th, .goals-table-vertical thead th, .goals-table-grouped thead th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.goals-table-grouped tbody td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quarter-group-cell {
    background: #f8f9fa;
    border-right: 2px solid #dee2e6;
    vertical-align: top;
    padding: 12px !important;
    font-weight: 600;
}

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

.quarter-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.quarter-collapse-btn:hover {
    background: #dee2e6;
}

.quarter-collapse-btn .quarter-arrow {
    transition: transform 0.3s ease;
}

.quarters-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quarter-table-wrapper {
    border: 1px solid #454545;
    border-radius: 4px;
    overflow: hidden;
}

.quarter-table-wrapper .goals-table-grouped {
    margin: 0;
    border: none;
}

.quarter-header-row {
    background: #f8f9fa;
}

.quarter-header-row td {
    padding: 15px 12px !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.quarter-total-row {
    background: #f8f9fa;
    font-weight: 500;
}

.quarter-total-row td {
    border-top: 2px solid #000000 !important;
    padding: 15px 12px !important;
}

.goal-row.collapsed-quarter td:not(.quarter-group-cell) {
    display: none;
}

.goals-table tbody tr.goal-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.goals-table tbody tr.goal-row:hover {
    background-color: #f8f9fa;
}

.goals-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.goal-name {
    font-weight: 500;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
}

.status-badge.status-done {
    background: #ff8c42;
    color: white;
}

.status-badge.status-pending {
    background: #6c757d;
    color: white;
}

.btn-perspective {
    padding: 6px 12px;
    background: #ff8c42;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-perspective:hover {
    background: #e67a32;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #4a90e2;
    transition: width 0.3s ease;
}

.quarter-total {
    background: #f8f9fa;
    font-weight: bold;
}

.quarter-total td {
    border-top: 2px solid #ffffff;
    padding: 15px 12px;
}

body[data-theme="dark"] .quarter-section {
    background: #2d2d2d;
}

body[data-theme="dark"] .quarter-header {
    background: #1f1f1f;
    border-bottom-color: #404040;
}

body[data-theme="dark"] .quarter-toggle {
    color: #e0e0e0;
}

body[data-theme="dark"] .quarter-toggle:hover {
    background: #353535;
}

body[data-theme="dark"] .goals-table thead th,
body[data-theme="dark"] .goals-table-vertical thead th,
body[data-theme="dark"] .goals-table-grouped thead th {
    background: #1f1f1f;
    color: #b0b0b0;
    border-bottom-color: #404040;
}

body[data-theme="dark"] .goals-table tbody tr.goal-row:hover {
    background: #353535;
}

body[data-theme="dark"] .goals-table tbody td {
    border-bottom-color: #404040;
}

body[data-theme="dark"] .quarter-group-cell {
    background: #1f1f1f;
    border-right-color: #404040;
}

body[data-theme="dark"] .quarter-collapse-btn:hover {
    background: #404040;
}

body[data-theme="dark"] .quarter-total-row {
    background: #1f1f1f;
}

body[data-theme="dark"] .quarter-total-row td {
    border-top-color: #4f4c4c !important;
}

body[data-theme="dark"] .goal-name {
    color: #e0e0e0;
}

body[data-theme="dark"] .progress-bar-container {
    background: #404040;
}

body[data-theme="dark"] .quarter-total {
    background: #1f1f1f;
}

body[data-theme="dark"] .quarter-total td {
    border-top-color: #404040;
}

body[data-theme="dark"] .admin-nav-bar {
    background-color: #1f1f1f;
    border-bottom-color: #000000;
}

body[data-theme="dark"] .admin-nav-link {
    color: #e0e0e0;
}

body[data-theme="dark"] .admin-nav-link:hover {
    background-color: #2d2d2d;
}

body[data-theme="dark"] .admin-nav-link.active {
    background-color: #0d0d0d;
    border-bottom-color: #3498db;
}

body[data-theme="dark"] .icon-btn {
    color: #e0e0e0;
}

body[data-theme="dark"] .icon-btn:hover {
    background-color: #2d2d2d;
}

body[data-theme="dark"] .icon-btn-danger {
    color: #f44336;
}

body[data-theme="dark"] .icon-btn-danger:hover {
    background-color: #3a1f1f;
}

body[data-theme="dark"] .company-select {
    background-color: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

body[data-theme="dark"] .company-select:hover {
    border-color: #3498db;
    background-color: #353535;
}

body[data-theme="dark"] .company-select option {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body[data-theme="dark"] .company-selector label {
    color: #888;
}

.inline-edit-select {
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: #333;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.inline-edit-select:hover {
    background-color: #f0f8ff;
}

.inline-edit-select:focus {
    outline: none;
    background-color: #f0f8ff;
    border: 1px solid #3498db;
}

.inline-edit-date {
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.inline-edit-date:hover {
    background-color: #f0f8ff;
}

.inline-edit-date:focus {
    outline: none;
    background-color: #f0f8ff;
    border: 1px solid #3498db;
}

body[data-theme="dark"] .inline-edit-input,
body[data-theme="dark"] .inline-edit-date,
body[data-theme="dark"] .inline-edit-textarea {
    background-color: transparent;
    color: #e0e0e0;
    border-color: transparent;
}

body[data-theme="dark"] .inline-edit-input:focus,
body[data-theme="dark"] .inline-edit-date:focus,
body[data-theme="dark"] .inline-edit-textarea:focus {
    background-color: #2d2d2d !important;
    border-color: #3498db !important;
    color: #e0e0e0;
}

body[data-theme="dark"] .inline-edit-select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #555;
}

body[data-theme="dark"] .inline-edit-select:focus {
    background-color: #353535;
    border-color: #3498db;
    color: #e0e0e0;
}

body[data-theme="dark"] .inline-edit-select option {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body[data-theme="dark"] .trimestre-cell {
    background-color: #1f1f1f !important;
    color: #e0e0e0;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-select:hover {
    border-color: #3498db;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filters-container {
    position: relative;
    z-index: 50;
    overflow: visible;
}

body[data-theme="dark"] .filters-container {
    background-color: #2d2d2d !important;
}

body[data-theme="dark"] .filters-container label {
    color: #999 !important;
}

body[data-theme="dark"] .filter-select {
    background-color: #2d2d2d;
    color: #f0f0f0;
    border-color: #4a4a4a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .filter-select:hover {
    border-color: #5dade2;
    background-color: #353535;
}

body[data-theme="dark"] .filter-select:focus {
    border-color: #5dade2;
    background-color: #353535;
    box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.25);
}

body[data-theme="dark"] .filter-select option {
    background-color: #2d2d2d;
    color: #f0f0f0;
    padding: 8px 12px;
}

body[data-theme="dark"] .filter-select option:hover,
body[data-theme="dark"] .filter-select option:focus,
body[data-theme="dark"] .filter-select option:checked {
    background-color: #3498db;
    color: #ffffff;
}

/* ========== PADRONIZAÇÃO: ÍCONE LIXEIRA E CHECKBOX ATIVO ========== */

/* Botão Lixeira Vermelho */
.btn-delete-icon {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    color: #e74c3c !important;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-icon:hover {
    color: #c0392b !important;
    transform: scale(1.1);
}

.btn-delete-icon:active {
    transform: scale(0.95);
}

body[data-theme="dark"] .btn-delete-icon {
    color: #e74c3c !important;
    background: none !important;
}

body[data-theme="dark"] .btn-delete-icon:hover {
    color: #ff6b6b !important;
}

/* Status Badge (Ativo/Inativo) */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    background-color: white;
    border: 1px solid;
}

.status-badge.active {
    color: #27ae60;
    border-color: #27ae60;
}

.status-badge.inactive {
    color: #e74c3c;
    border-color: #e74c3c;
}

body[data-theme="dark"] .status-badge {
    background-color: #2d2d2d;
}

body[data-theme="dark"] .status-badge.active {
    color: #2ecc71;
    border-color: #2ecc71;
}

body[data-theme="dark"] .status-badge.inactive {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* Checkbox Ativo com texto dinâmico */
.checkbox-ativo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-ativo-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    background-color: white !important;
    border: 1px solid #ccc;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

.checkbox-ativo-wrapper input[type="checkbox"]:checked::before {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e91e63;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-ativo-label {
    font-weight: 600;
    font-size: 14px;
    user-select: none;
    cursor: pointer;
}

.checkbox-ativo-label.active {
    color: #27ae60;
}

.checkbox-ativo-label.inactive {
    color: #e74c3c;
}

body[data-theme="dark"] .checkbox-ativo-wrapper input[type="checkbox"] {
    background-color: white !important;
    border-color: #ccc;
}

body[data-theme="dark"] .checkbox-ativo-label.active {
    color: #2ecc71;
}

body[data-theme="dark"] .checkbox-ativo-label.inactive {
    color: #e74c3c;
}

/* Meeting Forms - Dynamic Items */
.dynamic-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.dynamic-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.dynamic-item-full {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.dynamic-item .form-control,
.dynamic-item-grid .form-control,
.dynamic-item-full .form-control {
    margin: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background: var(--border-color);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.form-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

/* ===== Follow-Up Page ===== */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 5px;
}

.page-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Follow-Up Tabs */
.followup-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0;
}

.followup-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
}

.followup-tab:hover {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.followup-tab.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

.followup-tab svg {
    flex-shrink: 0;
}

/* Tab Badge (Notification Counter) */
.tab-badge {
    background-color: #27ae60;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

/* Item with Badge - Flexbox Layout */
/* TD deve manter display: table-cell para alinhamento correto das colunas */
td.item-with-badge,
td.followup-action-cell {
    display: table-cell !important;
    vertical-align: middle;
}

/* Flex layout apenas no wrapper interno */
td.item-with-badge > .item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Action buttons container */
td.followup-action-cell > .action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Para uso fora de tabelas */
div.item-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.item-name {
    flex: 1;
}

/* Item Badge NOVO */
.item-badge-novo {
    background-color: #27ae60;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Task Tag Inline Badge */
.task-tag-inline {
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Company Badge for multi-company view */
.company-cell {
    vertical-align: middle;
}

.company-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
}

body[data-theme="dark"] .company-badge {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
}

/* Tab Content */
.followup-tab-content {
    display: none;
}

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

/* Follow-up Row Active State */
.followup-row-active td {
    color: #27ae60 !important;
    font-weight: 500;
}

/* Follow-up Button - Sem borda, texto simples */
.btn-followup {
    background: transparent;
    color: #27ae60;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-followup:hover {
    background-color: rgba(39, 174, 96, 0.1);
}

/* Chevron Button for items with follow-ups - Com borda */
.btn-chevron {
    background: transparent;
    border: 1px solid #27ae60;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    color: #27ae60;
    font-weight: 600;
    font-size: 12px;
}

.btn-chevron:hover {
    background-color: rgba(39, 174, 96, 0.1);
}

.btn-chevron .chevron-icon {
    transition: transform 0.3s ease;
    display: block;
}

.btn-chevron.expanded .chevron-icon {
    transform: rotate(90deg);
}

.followup-count {
    min-width: 20px;
    text-align: center;
}

/* Follow-up Section (Accordion) */
.followup-section {
    background-color: #f9f9f9;
}

.followup-container {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    position: relative;
}

/* Botão fechar accordion */
.btn-close-followup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #27ae60;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-close-followup:hover {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    transform: rotate(90deg);
}

.btn-close-followup svg {
    display: block;
}

/* Add Follow-up Form */
.followup-add-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.followup-add-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #27ae60;
}

.followup-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Follow-up List */
.followup-list {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

.followup-list h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.followup-item {
    border-left: 3px solid #27ae60;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    transition: all 0.2s;
}

.followup-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.followup-date {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.followup-user {
    font-size: 13px;
    color: #3498db;
    font-weight: 600;
}

.followup-actions {
    display: flex;
    gap: 5px;
}

.followup-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.2s;
}

.followup-text:hover {
    background: rgba(39, 174, 96, 0.05);
}

.followup-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 2px solid #27ae60;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.edit-buttons {
    display: flex;
    gap: 10px;
}

.no-followups {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Follow-up Replies (Respostas) */
.followup-replies-container {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
}

.reply-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(39, 174, 96, 0.05);
    border-radius: 4px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 12px;
}

.reply-arrow {
    color: #27ae60;
    font-weight: bold;
}

.reply-date {
    color: #888;
}

.reply-user {
    color: #3498db;
    font-weight: 600;
}

.reply-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
}

.btn-reply-edit,
.btn-reply-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-reply-edit:hover,
.btn-reply-delete:hover {
    opacity: 1;
}

.btn-reply-delete {
    color: #e74c3c;
}

.reply-text {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    padding-left: 20px;
}

.reply-edit-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #27ae60;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 8px;
}

.reply-edit-buttons {
    display: flex;
    gap: 8px;
}

.followup-reply-form {
    margin-top: 12px;
    padding: 12px;
    background: rgba(39, 174, 96, 0.08);
    border-radius: 6px;
    border: 1px dashed #27ae60;
}

.reply-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 10px;
}

.reply-textarea:focus {
    border-color: #27ae60;
    outline: none;
}

.reply-form-actions {
    display: flex;
    gap: 8px;
}

.btn-add-reply {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed #999;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-reply:hover {
    border-color: #27ae60;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.btn-add-reply svg {
    opacity: 0.7;
}

.btn-add-reply:hover svg {
    opacity: 1;
}

/* Load More Button */
.btn-load-more {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.15s;
    margin-top: 15px;
}

.btn-load-more:hover {
    background-color: #e0e0e0;
    border-color: #27ae60;
    color: #27ae60;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Icon Buttons */
.btn-icon {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
}

.btn-icon:hover {
    background: rgba(0,0,0,0.05);
}

.btn-icon.btn-edit {
    color: #ff9800;
}

.btn-icon.btn-delete {
    color: #ef4444;
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Dark Theme Adjustments */
body[data-theme="dark"] .page-subtitle {
    color: #aaa;
}

body[data-theme="dark"] .followup-tabs {
    border-bottom-color: #444;
}

body[data-theme="dark"] .followup-tab {
    color: #aaa;
}

body[data-theme="dark"] .followup-tab:hover {
    background-color: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

body[data-theme="dark"] .followup-tab.active {
    color: #27ae60;
}

/* Dark theme - Tab Badge */
body[data-theme="dark"] .tab-badge {
    background-color: #27ae60;
    color: white;
}

/* Dark theme - Item Badge NOVO */
body[data-theme="dark"] .item-badge-novo {
    background-color: #27ae60;
    color: white;
}

body[data-theme="dark"] .followup-section {
    background-color: #2a2a2a;
}

body[data-theme="dark"] .btn-close-followup {
    color: #27ae60;
}

body[data-theme="dark"] .btn-close-followup:hover {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

body[data-theme="dark"] .followup-add-form,
body[data-theme="dark"] .followup-list {
    background: #1a1a1a;
    color: #e0e0e0;
}

body[data-theme="dark"] .followup-list h3,
body[data-theme="dark"] .followup-add-form h3 {
    color: #27ae60;
}

body[data-theme="dark"] .followup-item {
    background: #2a2a2a;
}

body[data-theme="dark"] .followup-item:hover {
    background: #333;
}

body[data-theme="dark"] .followup-text {
    color: #e0e0e0;
}

body[data-theme="dark"] .followup-text:hover {
    background: rgba(39, 174, 96, 0.1);
}

body[data-theme="dark"] .followup-replies-container {
    border-left-color: #444;
}

body[data-theme="dark"] .reply-item {
    background: rgba(39, 174, 96, 0.1);
}

body[data-theme="dark"] .reply-text {
    color: #ccc;
}

body[data-theme="dark"] .reply-textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body[data-theme="dark"] .reply-textarea:focus {
    border-color: #27ae60;
}

body[data-theme="dark"] .followup-reply-form {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

body[data-theme="dark"] .btn-add-reply {
    border-color: #555;
    color: #aaa;
}

body[data-theme="dark"] .btn-add-reply:hover {
    border-color: #27ae60;
    color: #27ae60;
}

body[data-theme="dark"] .followup-date {
    color: #aaa;
}

body[data-theme="dark"] .no-followups,
body[data-theme="dark"] .no-data {
    color: #666;
}

body[data-theme="dark"] .btn-load-more {
    background-color: #2a2a2a;
    border-color: #444;
    color: #aaa;
}

body[data-theme="dark"] .btn-load-more:hover {
    background-color: #333;
    border-color: #27ae60;
    color: #27ae60;
}

body[data-theme="dark"] .btn-icon:hover {
    background: rgba(255,255,255,0.1);
}

body[data-theme="dark"] .followup-row-active td {
    color: #27ae60 !important;
}

body[data-theme="dark"] .btn-followup {
    color: #27ae60;
}

body[data-theme="dark"] .btn-followup:hover {
    background-color: rgba(39, 174, 96, 0.15);
}

body[data-theme="dark"] .btn-chevron {
    color: #27ae60;
    border-color: #27ae60;
}

body[data-theme="dark"] .btn-chevron:hover {
    background-color: rgba(39, 174, 96, 0.2);
}

/* Badge de Contagem de Notas */
.notes-icon-wrapper {
    position: relative;
    display: inline-block;
}

.notes-badge,
.note-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: transparent;
    color: #999;
    font-size: 11px;
    font-weight: 700;
    min-width: auto;
    height: auto;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    z-index: 1;
    pointer-events: none;
    transition: color 0.2s ease;
}

/* Badge com notas não lidas - número colorido (azul) */
.notes-badge.unread,
.note-badge.unread {
    color: #007bff;
    background: transparent;
}

body[data-theme="dark"] .notes-badge,
body[data-theme="dark"] .note-badge {
    color: #888;
    background: transparent;
    box-shadow: none;
}

body[data-theme="dark"] .notes-badge.unread,
body[data-theme="dark"] .note-badge.unread {
    color: #4a9eff;
    background: transparent;
}

/* Spinner de carregamento */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Estilos para acordeões de trimestres */
.quarter-accordion-header td {
    cursor: pointer !important;
    user-select: none;
}

.quarter-accordion-header:hover td {
    filter: brightness(1.1);
}

.accordion-icon {
    transition: transform 0.2s ease;
}

.quarter-goal-row {
    transition: all 0.2s ease;
}

.quarter-status-select {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
}

.quarter-status-select option {
    background: #2c3e50;
    color: #fff;
}

/* ==============================================
   User Avatar Styles
   ============================================== */

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.user-avatar-lg {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.user-avatar-xl {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

/* Avatar colors based on initials */
.avatar-color-0 { background-color: #e74c3c; }
.avatar-color-1 { background-color: #3498db; }
.avatar-color-2 { background-color: #27ae60; }
.avatar-color-3 { background-color: #9b59b6; }
.avatar-color-4 { background-color: #f39c12; }
.avatar-color-5 { background-color: #1abc9c; }
.avatar-color-6 { background-color: #e67e22; }
.avatar-color-7 { background-color: #2c3e50; }
.avatar-color-8 { background-color: #16a085; }
.avatar-color-9 { background-color: #8e44ad; }

/* Company Logo Badge */
.company-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    line-height: 1;
    vertical-align: middle;
}

.company-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-logo-xs { width: 24px; height: 24px; min-width: 24px; min-height: 24px; font-size: 12px; border-radius: 4px; }
.company-logo-sm { width: 28px; height: 28px; min-width: 28px; min-height: 28px; font-size: 13px; border-radius: 5px; }
.company-logo-md { width: 32px; height: 32px; min-width: 32px; min-height: 32px; font-size: 15px; }
.company-logo-lg { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 18px; }
.company-logo-xl { width: 45px; height: 45px; min-width: 45px; min-height: 45px; font-size: 20px; }

.company-logo-color-0 { background-color: #e74c3c; }
.company-logo-color-1 { background-color: #3498db; }
.company-logo-color-2 { background-color: #27ae60; }
.company-logo-color-3 { background-color: #9b59b6; }
.company-logo-color-4 { background-color: #f39c12; }
.company-logo-color-5 { background-color: #1abc9c; }
.company-logo-color-6 { background-color: #e67e22; }
.company-logo-color-7 { background-color: #2c3e50; }
.company-logo-color-8 { background-color: #16a085; }
.company-logo-color-9 { background-color: #8e44ad; }

body[data-theme="dark"] .company-logo-badge img {
    background: #3d3d3d;
}

body[data-theme="dark"] .company-logo-color-7 {
    background-color: #4a6785;
}

/* Avatar with name */
.avatar-name-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.avatar-name-wrapper .user-name {
    font-weight: 500;
}

/* Dark theme avatar adjustments */
body[data-theme="dark"] .user-avatar {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .avatar-color-7 {
    background-color: #34495e;
}

/* Tooltip for avatar */
.user-avatar[title] {
    cursor: default;
}

/* ==============================================
   Sidebar Pin System
   ============================================== */

/* Sidebar Header with Pin */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: visible;
    flex: 1;
}

/* Pin Button */
.sidebar-pin-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-pin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-pin-btn.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.15);
}

.sidebar-pin-btn.active:hover {
    background: rgba(52, 152, 219, 0.25);
}

.sidebar-pin-btn.locked {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}

.sidebar-pin-btn.locked:hover {
    background: rgba(231, 76, 60, 0.25);
}

.sidebar-pin-btn .pin-icon {
    transition: transform 0.3s ease;
}

.sidebar-pin-btn.active .pin-icon {
    transform: rotate(45deg);
}

.sidebar-pin-btn.locked .pin-icon {
    transform: rotate(45deg) scale(0.85);
}

.sidebar.locked {
    pointer-events: auto;
}

.sidebar.locked:hover {
    width: 70px;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    width: 70px;
    padding: 15px 10px;
    overflow: visible;
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    gap: 10px;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.sidebar.collapsed .company-selector {
    padding: 0;
    margin-bottom: 15px;
}

.sidebar.collapsed .company-selector > label {
    font-size: 9px;
    margin-bottom: 4px;
    text-align: center;
}

.sidebar.collapsed .company-selector .company-selector-btn {
    width: 48px;
    height: 48px;
    padding: 8px;
    justify-content: center;
    border-radius: 8px;
    margin: 0 auto;
}

.sidebar.collapsed .company-selector .company-name,
.sidebar.collapsed .company-selector .dropdown-arrow {
    display: none;
}

.sidebar.collapsed .company-selector .company-logo-container {
    width: 32px;
    height: 32px;
    margin: 0;
}

.sidebar.collapsed .company-selector .company-logo {
    width: 32px;
    height: 32px;
}

.sidebar.collapsed .company-dropdown-menu {
    left: 70px;
    top: 0;
    min-width: 200px;
}

.sidebar.collapsed nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link svg {
    margin-right: 0;
}

.sidebar.collapsed .nav-item-collapsible .nav-link-wrapper {
    flex-direction: column;
}

.sidebar.collapsed .nav-item-collapsible .nav-link {
    width: 48px;
}

.sidebar.collapsed .nav-collapse-btn {
    display: none;
}

.sidebar.collapsed .nav-submenu {
    display: none !important;
}

.sidebar.collapsed .sidebar-footer {
    padding: 10px 0;
}

.sidebar.collapsed .sidebar-footer-buttons {
    flex-direction: column;
    gap: 2px;
}

.sidebar.collapsed .sidebar-footer-btn {
    justify-content: center;
    padding: 10px;
    width: 48px;
}

.sidebar.collapsed .sidebar-footer-btn.half-btn {
    width: 48px;
    flex: none;
}

.sidebar.collapsed .sidebar-footer-btn span,
.sidebar.collapsed .sidebar-footer-btn .theme-label {
    display: none;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .user-profile-info {
    display: none;
}

.sidebar.collapsed .user-profile-icon {
    margin-right: 0;
}

/* Expanded State (on hover when not pinned) */
.sidebar.expanded {
    width: 250px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar.expanded .sidebar-header h2 {
    display: block;
}

.sidebar.expanded .company-selector {
    display: block;
}

.sidebar.expanded .nav-link {
    justify-content: flex-start;
    padding: 12px 15px;
    width: auto;
    height: auto;
}

.sidebar.expanded .nav-link span {
    display: inline;
}

.sidebar.expanded .nav-link svg {
    margin-right: 10px;
}

.sidebar.expanded .nav-collapse-btn {
    display: flex;
}

.sidebar.expanded .nav-submenu {
    display: block !important;
}

.sidebar.expanded .nav-submenu.collapsed {
    display: none !important;
}

.sidebar.expanded .sidebar-footer-buttons {
    flex-direction: row;
    gap: 4px;
}

.sidebar.expanded .sidebar-footer-btn {
    justify-content: flex-start;
    padding: 10px 15px;
    width: auto;
}

.sidebar.expanded .sidebar-footer-btn.half-btn {
    flex: 1;
    justify-content: center;
}

.sidebar.expanded .sidebar-footer-btn span,
.sidebar.expanded .sidebar-footer-btn .theme-label {
    display: inline;
}

.sidebar.expanded .user-profile {
    justify-content: flex-start;
    padding: 15px;
}

.sidebar.expanded .user-profile-info {
    display: flex;
    flex-direction: column;
}

.sidebar.expanded .user-profile-icon {
    margin-right: 10px;
}

/* Container adjustments when sidebar is collapsed */
.container.sidebar-collapsed .main-content {
    margin-left: 70px;
}

/* Transition for smooth animations */
.sidebar {
    transition: width 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease;
}

.sidebar * {
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.main-content {
    transition: margin-left 0.25s ease;
}

/* Tooltip for collapsed menu items */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    margin-left: 10px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Dark theme adjustments for pin */
body[data-theme="dark"] .sidebar-pin-btn {
    color: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .sidebar-pin-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .sidebar-pin-btn.active {
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.15);
}

body[data-theme="dark"] .sidebar-pin-btn.locked {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

/* Light theme adjustments for pin */
body[data-theme="light"] .sidebar-pin-btn {
    color: rgba(0, 0, 0, 0.4);
}

body[data-theme="light"] .sidebar-pin-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.8);
}

body[data-theme="light"] .sidebar-pin-btn.active {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.15);
}

body[data-theme="light"] .sidebar-pin-btn.locked {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.15);
}

body[data-theme="light"] .sidebar-pin-btn.active:hover {
    background: rgba(52, 152, 219, 0.25);
}

body[data-theme="dark"] .sidebar.expanded {
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .sidebar.collapsed .nav-link::after {
    background: #1e1e1e;
    border: 1px solid #333;
}

/* ===== Campos Vazios - Metas Individuais ===== */
#goalsTable .goal-field.inline-edit:placeholder-shown,
#goalsTable textarea.goal-field:placeholder-shown,
#goalsTable .new-goal-field:placeholder-shown {
    border: 1px dashed #bdc3c7 !important;
    background-color: rgba(52, 152, 219, 0.03);
}

#goalsTable .goal-field.inline-edit.empty-field,
#goalsTable textarea.goal-field.empty-field,
#goalsTable .new-goal-field.empty-field {
    border: 1px dashed #bdc3c7 !important;
    background-color: rgba(52, 152, 219, 0.03);
}

body[data-theme="dark"] #goalsTable .goal-field.inline-edit:placeholder-shown,
body[data-theme="dark"] #goalsTable textarea.goal-field:placeholder-shown,
body[data-theme="dark"] #goalsTable .new-goal-field:placeholder-shown {
    border: 1px dashed #555 !important;
    background-color: rgba(52, 152, 219, 0.05);
}

body[data-theme="dark"] #goalsTable .goal-field.inline-edit.empty-field,
body[data-theme="dark"] #goalsTable textarea.goal-field.empty-field,
body[data-theme="dark"] #goalsTable .new-goal-field.empty-field {
    border: 1px dashed #555 !important;
    background-color: rgba(52, 152, 219, 0.05);
}

/* Campos readonly NÃO devem ter borda de campo vazio (ex: métrica x Rem) */
#goalsTable .goal-field.inline-edit[readonly],
#goalsTable .goal-field.inline-edit[readonly]:placeholder-shown,
#goalsTable .goal-field.inline-edit[readonly].empty-field,
body[data-theme="dark"] #goalsTable .goal-field.inline-edit[readonly],
body[data-theme="dark"] #goalsTable .goal-field.inline-edit[readonly]:placeholder-shown,
body[data-theme="dark"] #goalsTable .goal-field.inline-edit[readonly].empty-field {
    border: none !important;
    background-color: transparent !important;
}

/* Tabela de Follow-ups não lidos na Home - permitir texto integral em múltiplas linhas */
.unread-fups-table {
    table-layout: auto !important;
}

.unread-fups-table tbody td {
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.unread-fups-table .parent-cell,
.unread-fups-table .fup-text-cell {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
}

.unread-fups-table .parent-cell span,
.unread-fups-table .fup-text-cell div {
    display: block;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Cor do texto dos follow-ups no modo escuro */
body[data-theme="dark"] .unread-fups-table .parent-cell span,
body[data-theme="dark"] .unread-fups-table .fup-text-cell div {
    color: #ffffff !important;
}

/* ========================================
   Input Nota Final - Estilos dedicados
   (especificidade máxima com #goalsTable)
   ======================================== */
#goalsTable .goal-field.inline-edit.nota-final-input,
#goalsTable input.nota-final-input,
.nota-final-input,
input.nota-final-input {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    padding: 4px 2px;
    -moz-appearance: textfield;
}

.nota-final-input::-webkit-outer-spin-button,
.nota-final-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#goalsTable .nota-final-input:focus,
.nota-final-input:focus {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: 1px solid #3498db !important;
}

.nota-final-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modo escuro - Nota Final Input */
body[data-theme="dark"] #goalsTable .goal-field.inline-edit.nota-final-input,
body[data-theme="dark"] #goalsTable input.nota-final-input,
body[data-theme="dark"] .nota-final-input {
    background-color: transparent !important;
    background: transparent !important;
    color: #fff;
}
