:root {
    --sidebar-width: 180px;
    --sidebar-collapsed-width: 65px;
    --top-portal-height: 28px;
    --header-height: 45px;
    --footer-height: 30px;
}

body {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
    font-family: 'Inter', sans-serif;
}

.top-portal {
    height: var(--top-portal-height);
    background: #111;
    color: #666;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1050;
}

.wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

#sidebar {
    width: var(--sidebar-width);
    background: #1e2227;
    display: flex;
    flex-direction: column;
    z-index: 1020;
    transition: width 0.2s ease;
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width) !important;
}

/* ... existing code ... */

/* ===== Autenticação Enterprise (SaaS Style) ===== */
.auth-page-wrapper {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem 1rem !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    position: relative !important;
}

.auth-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    width: 100% !important;
    max-width: 440px !important;
}

.auth-logo-container {
    padding: 3rem 2.5rem 1.5rem !important;
    text-align: center !important;
}

.auth-form-container {
    padding: 0 2.5rem 3rem !important;
}

.auth-input-group {
    margin-bottom: 1.25rem !important;
}

.auth-label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
}

.auth-input {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #1f2937 !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 0.75rem !important;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}

.auth-input:focus {
    color: #111827 !important;
    background-color: #fff !important;
    border-color: #4e73df !important;
    outline: 0 !important;
    box-shadow: 0 0 0 4px rgba(78, 115, 223, 0.1) !important;
}

.auth-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.25rem !important;
    color: #ffffff !important;
    background-color: #4e73df !important;
    border: none !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.auth-button:hover {
    background-color: #2e59d9 !important;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.2) !important;
}

.auth-button:active {
    transform: scale(0.98) !important;
}

.auth-link {
    font-size: 0.875rem !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: color 0.15s !important;
}

.auth-link:hover {
    color: #4e73df !important;
}

.auth-link-bold {
    font-weight: 600 !important;
    color: #4e73df !important;
    text-decoration: none !important;
}

.auth-link-bold:hover {
    text-decoration: underline !important;
}

.auth-footer {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #f3f4f6 !important;
    text-align: center !important;
}

.auth-back-button {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    background: #ffffff;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auth-back-button:hover {
    color: #111827;
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateX(-3px);
}

/* Container Principal com Footer Fixo */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 50px;
}

.header-main {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
}

/* RODAPÉ FIXO */
.footer-fixed {
    height: var(--footer-height);
    background: #fff;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    font-size: 0.7rem;
    color: #999;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* ===== Fluxo (Steps) ===== */
.flow-step {
    cursor: grab;
    user-select: none;
    padding-right: 46px;
    /* espaço pro botão X */
}

.flow-step.is-dragging {
    opacity: 0.6;
    cursor: grabbing;
}

.flow-step-remove-form {
    position: absolute;
    top: 6px;
    right: 8px;
    margin: 0;
}

.flow-step-remove {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.flow-step-remove i {
    font-size: 0.9rem;
}

/* ===== Inbox Split-Pane Layout ===== */
.inbox-wrapper {
    display: flex;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow: hidden;
}

.inbox-list {
    width: 380px;
    min-width: 320px;
    border-right: 1px solid #e5e7eb;
    background: #fff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
}

.inbox-detail {
    flex: 1;
    background: #f9fafb;
    overflow-y: auto;
}

.inbox-item {
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    background-color: #fff;
}

.inbox-item:hover {
    background: #f9fafb;
}

.inbox-item.active {
    background: #f0f7ff;
    border-left-color: #4e73df;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.inbox-item .workflow-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.inbox-item .step-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    background: #ebf5ff;
    color: #2563eb;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #dbeafe;
}

.inbox-item .requester-info {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.inbox-item .approver-info {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.inbox-item .datetime-info {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 500;
}

.search-wrapper {
    transition: all 0.2s;
}

.search-wrapper:focus-within {
    background-color: #f9fafb !important;
}

#inboxSearch:focus {
    box-shadow: none;
    background-color: #fff !important;
    border: 1px solid #4e73df !important;
}

.inbox-empty {
    padding: 3rem;
    text-align: center;
    color: #adb5bd;
}

.detail-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

/* NOTIFICATIONS */
.notification-bell-wrapper {
    position: relative;
    cursor: pointer;
    margin-right: 1.5rem;
    color: #6c757d;
    transition: color 0.2s;
}

.notification-bell-wrapper:hover {
    color: #4e73df;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #e74a3b;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: 700;
    border: 2px solid #fff;
}

.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notification-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8faff;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-item-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4e73df;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.notification-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
}

.notification-item-text {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

.notification-item-time {
    font-size: 0.65rem;
    color: #999;
    margin-top: 5px;
}

.notification-footer {
    padding: 8px;
    text-align: center;
    border-top: 1px solid #eee;
}

.notification-footer a {
    font-size: 0.75rem;
    color: #4e73df;
    text-decoration: none;
    font-weight: 600;
}

/* CUSTOM BUTTON COLORS */
.btn-indigo {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.btn-indigo:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.btn-outline-indigo {
    color: #6366f1;
    border-color: #6366f1;
}

.btn-outline-indigo:hover {
    background-color: #6366f1;
    color: #fff;
}

.btn-purple {
    background-color: #a855f7;
    border-color: #a855f7;
    color: #fff;
}

.btn-purple:hover {
    background-color: #9333ea;
    border-color: #9333ea;
    color: #fff;
}

.btn-outline-purple {
    color: #a855f7;
    border-color: #a855f7;
}

.btn-outline-purple:hover {
    background-color: #a855f7;
    color: #fff;
}

.btn-pink {
    background-color: #ec4899;
    border-color: #ec4899;
    color: #fff;
}

.btn-pink:hover {
    background-color: #db2777;
    border-color: #db2777;
    color: #fff;
}

.btn-outline-pink {
    color: #ec4899;
    border-color: #ec4899;
}

.btn-outline-pink:hover {
    background-color: #ec4899;
    color: #fff;
}

.btn-cyan {
    background-color: #06b6d4;
    border-color: #06b6d4;
    color: #fff;
}

.btn-cyan:hover {
    background-color: #0891b2;
    border-color: #0891b2;
    color: #fff;
}

.btn-outline-cyan {
    color: #06b6d4;
    border-color: #06b6d4;
}

.btn-outline-cyan:hover {
    background-color: #06b6d4;
    color: #fff;
}

.btn-teal {
    background-color: #14b8a6;
    border-color: #14b8a6;
    color: #fff;
}

.btn-teal:hover {
    background-color: #0d9488;
    border-color: #0d9488;
    color: #fff;
}

.btn-outline-teal {
    color: #14b8a6;
    border-color: #14b8a6;
}

.btn-outline-teal:hover {
    background-color: #14b8a6;
    color: #fff;
}

/* ===== Modern Dashboard Buttons (Exact Match Image) ===== */
.btn-modern {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1.5px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #a0aec0;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.btn-modern-edit {
    color: #6366f1; /* Indigo/Purple shade */
    border-color: #e2e8f0;
}

.btn-modern-edit:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
}

.btn-modern-delete {
    color: #f87171; /* Lighter Red shade */
    border-color: #e2e8f0;
}

.btn-modern-delete:hover {
    color: #ef4444;
    border-color: #fecaca;
}

/* Icon sizing for better match */
.btn-modern i {
    font-size: 1.25rem;
    display: block;
}

.hover-bg-light:hover {
    background-color: #f8fafc;
    border-color: #e2e8f0 !important;
}

.transition-all {
    transition: all 0.2s ease;
}