:root {
    /* --- Modern Professional Palette --- */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    /* Neutral colors */
    --bg-main: #0f172a; /* Deep dark blue */
    --bg-card: #1e293b; /* Slate 800 */
    --bg-sidebar: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    
    /* Design tokens */
    --radius-sm: 0.5rem;
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --sidebar-width: 280px;
    --glass: rgba(30, 41, 59, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Garante que o FontAwesome use sua própria fonte e não a do wildcard */
i.fas, i.fa-solid, i.fa-regular, i.fa-brands {
    font-family: "Font Awesome 6 Free" !important;
    font-style: normal;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* --- LOGIN PAGE --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at top right, #312e81, transparent),
                radial-gradient(circle at bottom left, #1e1b4b, transparent),
                var(--bg-main);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.2;
    z-index: 0;
}

.login-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    z-index: 1;
    animation: fadeIn 0.6s ease-out;
}

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

.login-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

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

/* --- DASHBOARD LAYOUT --- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header i {
    font-size: 1.75rem;
    color: var(--primary-light);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.sidebar-header span {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    box-shadow: inset 4px 0 0 var(--primary);
}

.nav-item.active i {
    color: var(--primary-light);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    transition: var(--transition);
    max-width: 1600px;
}

header.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

header.top-bar h2 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* --- COMPONENTS --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.btn i {
    font-size: 1rem;
    transition: var(--transition);
}

.btn:hover i {
    transform: scale(1.1);
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-secondary { 
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text-main); 
    border-color: var(--border);
}
.btn-secondary:hover { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    height: auto;
}

.btn-danger { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { 
    background: var(--danger); 
    color: white; 
}

.btn-success { 
    background: rgba(16, 185, 129, 0.1); 
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}
.btn-success:hover { 
    background: var(--success); 
    color: white; 
}

/* Inputs */
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.625rem; font-size: 0.875rem; font-weight: 600; color: var(--text-main); opacity: 0.9; }
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: white;
    outline: none;
    transition: var(--transition);
}
input:focus, select:focus { 
    border-color: var(--primary); 
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); 
}

/* Badges */
.status-badge {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-running { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-running::before { background: #10b981; box-shadow: 0 0 8px #10b981; }

.status-stopped { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status-stopped::before { background: #ef4444; }

.status-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-pending::before { background: #f59e0b; animation: pulse 2s infinite; }

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    z-index: 2000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
}
.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}

.modal-content.modal-lg {
    max-width: 800px;
}

.hidden { display: none !important; }

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding: 1rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Notificação */
#notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1.25rem 2rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: white;
    font-weight: 600;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- TABLES --- */
.data-table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rule-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr 1.5fr auto;
    gap: 0.75rem;
    align-items: end;
    background: rgba(15, 23, 42, 0.3);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

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

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

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* S3 Configuration Header */
.s3-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.s3-breadcrumb {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 300px;
}

.s3-breadcrumb-icon {
    background: rgba(245, 158, 11, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.2);
    flex-shrink: 0;
}

.s3-breadcrumb-icon i {
    color: var(--warning);
}

.current-bucket-display {
    color: var(--text-muted);
    white-space: nowrap;
}

.breadcrumb-separator {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.current-path-display {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s3-config-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.625rem;
    flex: 2 1 400px;
}

.s3-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    font-size: 0.875rem;
}

.s3-upload-btn {
    cursor: pointer;
    margin-bottom: 0;
}

/* S3 Objects Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.card.s3-object-card {
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.card.s3-object-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.s3-card-info {
    min-width: 0;
    flex: 1;
}

.s3-card-title {
    font-size: 1rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    margin-bottom: 0.25rem;
}

.s3-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.s3-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

/* --- MOBILE ADAPTATIONS (Responsive Professional) --- */

/* Tablets */
@media (max-width: 1024px) {
    .sidebar { width: 88px; }
    .sidebar-header span, .nav-item span, .sidebar-footer span, .nav-label { display: none; }
    .sidebar-header { justify-content: center; padding: 2rem 0; }
    .nav-item { justify-content: center; padding: 1rem; }
    .nav-item i { font-size: 1.5rem; }
    .main-content { margin-left: 88px; }

    /* S3 Header in Tablet */
    .s3-action-btn span { display: none; }
    .s3-action-btn { padding: 0; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; gap: 0; }
    .s3-breadcrumb { flex: 1; min-width: 0; }

    /* S3 Card Buttons in Tablet/Mobile */
    .s3-actions .btn span { display: none; }
}

/* Mobile Phones */
@media (max-width: 768px) {
    .main-content { padding: 1rem; }
    header.top-bar { flex-direction: column; align-items: stretch; gap: 1rem; }
    header.top-bar h2 { font-size: 1.5rem; }
    header.top-bar p { font-size: 0.75rem; }
    .grid { grid-template-columns: 1fr; }

    /* Region Selector Mobile Fix */
    .top-actions {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem !important;
        width: 100%;
    }
    
    /* Os botões que não são a região devem ser menores e sem texto */
    .top-actions .btn span { display: none; }
    .top-actions .btn { padding: 0.75rem; min-width: 0; width: 100%; height: 44px; }
    
    .region-selector-container {
        grid-column: span 3; /* Ocupa a linha toda no topo ou embaixo */
        order: -1; /* Coloca no topo do grid */
        z-index: 1001; /* Maior que os outros itens do grid para o dropdown aparecer por cima */
    }
    
    #current-region-btn {
        width: 100%;
        justify-content: center;
        padding: 0 1rem;
        height: 48px;
        border-radius: 12px;
        background: rgba(99, 102, 241, 0.1);
        border: 1px solid rgba(99, 102, 241, 0.2);
        white-space: nowrap;
    }

    #current-region-btn span { 
        display: inline !important; 
        font-size: 0.85rem;
    }

    /* Ajuste para os itens dentro do dropdown de região no mobile */
    #region-dropdown .nav-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
        height: auto !important;
        width: 100% !important;
        background: transparent !important;
        color: var(--text-main) !important;
    }

    #region-dropdown .nav-item span {
        display: inline !important;
        font-size: 0.9rem !important;
        color: var(--text-main) !important;
    }

    #region-dropdown .nav-item i {
        font-size: 1rem !important;
        color: var(--text-muted) !important;
        width: auto !important;
    }

    #region-dropdown .nav-item.active {
        background: rgba(99, 102, 241, 0.1) !important;
    }

    #region-dropdown .nav-item.active span, 
    #region-dropdown .nav-item.active i {
        color: var(--primary-light) !important;
    }

    #region-dropdown {
        left: 0;
        right: 0;
        width: 100%;
        top: 105%;
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
        max-height: 350px;
        overflow-y: auto;
        z-index: 1002;
        background: var(--bg-card);
        border: 1px solid var(--border);
        padding: 0.5rem;
    }

    /* Security Groups Mobile (Table to Cards) */
    .data-table, .data-table thead, .data-table tbody, .data-table th, .data-table td, .data-table tr { 
        display: block; 
    }
    
    .data-table thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .data-table tr {
        border: 1px solid var(--border);
        margin-bottom: 1.5rem;
        background: var(--bg-card);
        border-radius: var(--radius);
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .data-table td { 
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
        padding-left: 45% !important; 
        text-align: right;
        min-height: 3rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .data-table td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-left: 1.5rem !important;
        padding-top: 1.5rem;
    }

    .data-table td:before { 
        position: absolute;
        top: 50%;
        left: 1.5rem;
        transform: translateY(-50%);
        width: 40%; 
        padding-right: 10px; 
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.65rem;
        content: attr(data-label);
    }

    /* SG Rules Row Mobile */
    .sg-rule-row, .rule-row {
        grid-template-columns: 1fr !important;
        background: rgba(15, 23, 42, 0.3);
        padding: 1rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        gap: 1rem !important;
    }

    .rule-row .form-group { margin-bottom: 0.5rem; }
    .rule-row button { grid-column: 1 / -1; width: 100%; height: 44px; margin-top: 0.5rem; }

    /* S3 Card Mobile */
    .s3-config-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .s3-breadcrumb { margin-bottom: 0; width: 100%; flex: none; font-size: 0.875rem; }
    .s3-breadcrumb-icon { width: 32px; height: 32px; }
    
    .s3-config-actions { 
        display: grid; 
        grid-template-columns: repeat(4, 1fr); 
        gap: 0.5rem; 
        flex: none;
        width: 100%;
    }
    .s3-action-btn { 
        width: 100%; 
        height: 44px; 
        border-radius: 8px; 
        padding: 0;
        justify-content: center;
        font-size: 1.125rem;
        min-width: 0;
    }
    .s3-action-btn span { display: none !important; }

    /* S3 Object Cards Mobile */
    .s3-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem !important;
    }
    .s3-actions .btn {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.8125rem !important;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    .s3-actions .btn span { display: inline !important; font-size: 0.75rem; }
}

@media (max-width: 640px) {
    .sidebar {
        bottom: 0;
        height: 72px;
        width: 100%;
        flex-direction: row;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--border);
        background: var(--glass);
        backdrop-filter: blur(16px);
    }
    .sidebar-header { display: none; }
    .sidebar-nav {
        display: flex;
        justify-content: space-around;
        padding: 0.5rem;
        width: 100%;
    }
    .nav-item {
        margin-bottom: 0;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        font-size: 0.65rem;
        flex: 1;
        border-radius: var(--radius-sm);
    }
    .nav-item.active { box-shadow: inset 0 -3px 0 var(--primary); }
    .nav-item i { font-size: 1.25rem; }
    .sidebar-footer { display: none; } /* On mobile, logout could be in top bar or last nav item */
    
    .main-content {
        margin-left: 0;
        margin-bottom: 72px;
        padding: 1.25rem;
    }
    
    .login-card { padding: 2rem; }
    .login-header h1 { font-size: 1.75rem; }
    
    .top-actions button span { display: none; }
    .top-actions button { padding: 0.75rem; border-radius: 50%; width: 44px; height: 44px; }

    /* S3 Mobile Refinements */
    .s3-config-header { gap: 0.5rem; }
    .s3-breadcrumb { font-size: 0.75rem; }
    .s3-breadcrumb-icon { width: 24px; height: 24px; border-radius: 6px; }
    .s3-breadcrumb-icon i { font-size: 0.65rem; }
    
    .s3-card-title { 
        font-size: 0.8125rem; 
        max-width: calc(100vw - 160px); /* Garante que o texto não empurre o card */
    }
    .s3-actions { gap: 0.4rem !important; grid-template-columns: repeat(2, 1fr); }
    .s3-actions .btn { padding: 0.6rem 0.4rem !important; }
}
