/* P3 Sistemas - Painel de Backup — Apple iCloud-inspired Design */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #1e1e2e;
    --accent: #8b5cf6;
    --accent-light: #c4b5fd;
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --text-light: #8e8e93;
    --sidebar-width: 250px;
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== UTILITY: LABEL MUTED ===== */
.label-muted {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8e8e93;
    font-weight: 500;
}

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2b55 50%, #8b5cf6 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 56px 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.login-box .logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-box .logo h1 {
    font-size: 28px;
    color: var(--text);
    font-weight: 300;
    letter-spacing: -0.5px;
}

.login-box .logo p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fafafa;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #2dd4a0; }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #ef4444; }
.btn-warning { background: var(--warning); color: #78350f; }
.btn-warning:hover { background: #f59e0b; }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid #e5e5ea;
}
.btn-outline:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: var(--accent);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.06);
    border-left-color: var(--accent);
}

.sidebar-nav a .icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.sidebar-nav a:hover .icon,
.sidebar-nav a.active .icon {
    opacity: 1;
}

.sidebar-section {
    padding: 16px 24px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.25);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
}

.sidebar-footer a:hover { color: rgba(255,255,255,0.9); }

/* ===== MAIN ===== */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
}

.topbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h1 {
    font-size: 22px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 14px;
}

.content {
    padding: 32px;
}

/* ===== CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.red { background: #fef2f2; color: #ef4444; }
.stat-icon.orange { background: #fffbeb; color: #f59e0b; }
.stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }

.stat-info h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.5px;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* ===== STORAGE BAR ===== */
.storage-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 32px;
}

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

.storage-bar-bg {
    height: 20px;
    background: #f0f0f5;
    border-radius: 10px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s;
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
}

.storage-bar-fill.warning { background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%); }
.storage-bar-fill.danger { background: linear-gradient(90deg, #f87171 0%, #ef4444 100%); }

.storage-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== DONUT CHART ===== */
.chart-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
}

.donut-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center .number {
    font-size: 36px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.5px;
}

.donut-center .label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ===== TABLE ===== */
.card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.card-body { padding: 0; }
.card-body.padded { padding: 24px; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: #fafafa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 500;
}

td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

tr:last-child td { border-bottom: none; }
tr:hover { background: rgba(0,0,0,0.015); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #ecfdf5; color: #059669; }
.badge-error { background: #fef2f2; color: #dc2626; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-running { background: #eff6ff; color: #2563eb; }
.badge-info { background: #f5f3ff; color: #7c3aed; }

/* ===== GRID ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #ecfdf5; color: #059669; border-left: 4px solid var(--success); }
.alert-error { background: #fef2f2; color: #dc2626; border-left: 4px solid var(--error); }
.alert-warning { background: #fffbeb; color: #d97706; border-left: 4px solid var(--warning); }

/* ===== CONNECTIONS INFO ===== */
.connection-box {
    background: #f9fafb;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.connection-box h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 600;
}

.connection-box .info-row {
    display: flex;
    padding: 6px 0;
    font-size: 13px;
}

.connection-box .info-label {
    width: 120px;
    font-weight: 500;
    color: var(--text-light);
}

.connection-box .info-value {
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--text);
}

/* ===== SEARCH BOX ===== */
.search-box input {
    padding: 8px 14px;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    font-family: inherit;
}
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
    background: #fff;
}
.search-box input::placeholder { color: #c7c7cc; }

/* ===== USAGE BAR (Datasafer-style) ===== */
.usage-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.usage-bar-track {
    height: 6px;
    background: #f0f0f5;
    border-radius: 3px;
    overflow: hidden;
}
.usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.4s ease;
    min-width: 2px;
}
.usage-bar-fill.warning { background: var(--warning); }
.usage-bar-fill.danger { background: var(--error); }
.usage-bar-label {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1;
}
.usage-bar-container.compact .usage-bar-track { height: 4px; }
.usage-bar-container.compact .usage-bar-label { font-size: 11px; }

/* ===== ACTION DROPDOWN ===== */
.action-dropdown {
    position: relative;
    display: inline-block;
}
.action-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    min-width: 130px;
    z-index: 20;
    overflow: hidden;
}
.action-dropdown.open .dropdown-menu { display: block; }
.action-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}
.action-dropdown .dropdown-menu a:hover {
    background: #f5f3ff;
    color: var(--accent);
}

/* ===== ICON BUTTON ===== */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.15s;
}
.btn-icon:hover {
    background: #f5f3ff;
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== CONNECTION GRID ===== */
.connection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); font-weight: 600; }

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    border-radius: 10px;
    transition: background 0.2s;
}
.hamburger:hover { background: rgba(0,0,0,0.04); }
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== SIDEBAR CLOSE BUTTON ===== */
.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
}
.sidebar-close:hover { color: white; background: rgba(255,255,255,0.08); }

/* ===== TABLE RESPONSIVE WRAPPER ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== FORM PAGE ===== */
.form-card {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1px solid #e5e5ea;
    transition: all 0.15s;
}

.pagination a:hover { background: var(--accent); color: white; border-color: var(--accent); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== SEVERITY DOTS (replaces emojis) ===== */
.severity-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.severity-dot.critical { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.severity-dot.warning { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.severity-dot.info { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.4); }

/* ===== SIDEBAR SVG ICONS ===== */
.sidebar-nav .icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   RESPONSIVE - LARGE TABLET (max-width: 1200px)
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-info h3 { font-size: 24px; }
    .grid-2 { grid-template-columns: 1.5fr 1fr; gap: 20px; }
    .content { padding: 24px; }
    .topbar h1 { font-size: 20px; }
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close { display: block; }
    .sidebar-header { position: relative; }

    .main { margin-left: 0; width: 100%; max-width: 100vw; overflow-x: hidden; }

    .hamburger { display: flex; }

    .topbar {
        padding: 12px 20px;
        gap: 8px;
    }
    .topbar h1 {
        font-size: 18px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .grid-2 { grid-template-columns: 1fr; }

    .content { padding: 20px; }

    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-box input { width: 160px; }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
        border-radius: 12px;
    }
    .stat-info h3 { font-size: 22px; }
    .stat-info p { font-size: 11px; }

    .grid-2, .grid-equal {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .content { padding: 16px; }

    .topbar {
        padding: 10px 12px;
    }
    .topbar h1 {
        font-size: 14px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .hamburger { margin-right: 8px; padding: 6px; }
    .user-name { display: none; }
    .user-info { flex-shrink: 0; margin-left: 4px; }
    .topbar .badge { font-size: 10px; padding: 2px 6px; }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .card-header .btn { width: 100%; }

    .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 500px; }
    th { padding: 10px 12px; font-size: 10px; }
    td { padding: 10px 12px; font-size: 13px; }

    .login-box {
        margin: 16px;
        padding: 32px 24px;
        border-radius: 16px;
    }

    .storage-card { padding: 16px; }
    .storage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn { padding: 10px 18px; font-size: 14px; }
    .btn-sm { padding: 7px 12px; font-size: 12px; }

    .connection-box .info-row {
        flex-direction: column;
        gap: 2px;
    }
    .connection-box .info-label {
        width: auto;
        font-size: 11px;
    }
    .connection-box .info-value {
        font-size: 13px;
    }

    .search-box input { width: 100%; }
    .card-header > div { width: 100%; flex-direction: column; }

    .donut-container {
        width: 140px;
        height: 140px;
    }
    .donut-container svg {
        width: 140px !important;
        height: 140px !important;
    }
    .donut-center .number { font-size: 28px; }

    .alert { font-size: 13px; padding: 12px 14px; }

    .badge { font-size: 11px; padding: 3px 10px; }

    .empty-state { padding: 40px 16px; }
    .empty-state .icon { font-size: 36px; }
    .empty-state h3 { font-size: 16px; }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .stat-card {
        padding: 14px;
    }

    .content { padding: 12px; }

    .topbar {
        padding: 8px 12px;
    }
    .topbar h1 { font-size: 14px; }

    .card { border-radius: 12px; }
    .card-header {
        padding: 14px 16px;
    }
    .card-header h2 { font-size: 14px; }
    .card-body.padded { padding: 16px; }

    table { min-width: 400px; }
    th { padding: 8px 10px; font-size: 10px; }
    td { padding: 8px 10px; font-size: 12px; }

    .login-box {
        padding: 24px 20px;
        margin: 12px;
    }
    .login-box .logo img { height: 48px !important; }

    .storage-card { padding: 12px; margin-bottom: 20px; }
    .storage-bar-bg { height: 18px; }

    .pagination { gap: 4px; padding: 12px; }
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    .form-group label { font-size: 12px; }

    .sidebar { width: 280px; }
}

/* ===== STANDARDIZED FORM CONTROLS ===== */
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    min-width: 150px;
}
.form-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.form-select-sm { padding: 6px 10px; font-size: 13px; }

.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .form-select { min-width: 160px; width: auto; }

.action-group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

.btn-pix { background: #7B1FA2; color: #fff; border: none; }
.btn-pix:hover { background: #6A1B9A; }
.btn-verify { background: #1565C0; color: #fff; border: none; }
.btn-verify:hover { background: #0D47A1; }
.btn-cancel { background: #757575; color: #fff; border: none; }
.btn-cancel:hover { background: #616161; }

.btn-full { width: 100%; }

/* ===== PRINT / PDF ===== */
@media print {
    .sidebar, .topbar, .wz-nav, .btn, button, nav, .no-print { display: none !important; }
    body { background: #fff !important; }
    .main-content { margin: 0 !important; padding: 20px !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; page-break-inside: avoid; }
    table { font-size: 11px; }
    a { text-decoration: none; color: #333 !important; }
    .badge { border: 1px solid #999; }
    .print-header { display: block !important; }
    .print-footer { display: block !important; position: fixed; bottom: 0; width: 100%; }
}

.print-header { display: none; }
.print-footer { display: none; }
