/* =============================================
   ALPES LOG – Sistema de Expedição
   Estilo Corporativo Alpes
   ============================================= */

:root {
    --alpes-blue: #003B7A;
    --alpes-blue-light: #005BB5;
    --alpes-blue-pale: #E8F0FB;
    --alpes-green: #00873E;
    --alpes-green-light: #00A84B;
    --alpes-orange: #E87722;
    --alpes-red: #D32F2F;
    --alpes-purple: #6A1B9A;
    --alpes-gray-50: #F8FAFC;
    --alpes-gray-100: #F1F5F9;
    --alpes-gray-200: #E2E8F0;
    --alpes-gray-300: #CBD5E1;
    --alpes-gray-400: #94A3B8;
    --alpes-gray-500: #64748B;
    --alpes-gray-600: #475569;
    --alpes-gray-700: #334155;
    --alpes-gray-800: #1E293B;
    --alpes-gray-900: #0F172A;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --transition: 0.25s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--alpes-gray-800);
    background: var(--alpes-gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* =============================================
   LOGIN PAGE
   ============================================= */
body.login-page {
    background: var(--alpes-blue);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-wrapper { display: flex; width: 100%; min-height: 100vh; }

.login-left {
    flex: 1;
    background: linear-gradient(145deg, #001F4D 0%, var(--alpes-blue) 45%, #0055AA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.login-left-content { position: relative; z-index: 1; color: white; max-width: 420px; }

/* LOGO NA LOGIN */
.login-logo-brand {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 44px;
}

.login-logo-img {
    height: 200px;
    width: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 50px rgba(255,255,255,0.28))
        drop-shadow(0 12px 40px rgba(0,0,0,0.55))
        drop-shadow(0 2px 10px rgba(0,0,0,0.3));
    transition: transform 0.35s ease, filter 0.35s ease;
}
.login-logo-img:hover {
    transform: scale(1.04);
    filter:
        drop-shadow(0 0 70px rgba(255,255,255,0.38))
        drop-shadow(0 14px 50px rgba(0,0,0,0.6))
        drop-shadow(0 3px 12px rgba(0,0,0,0.35));
}

/* =============================================
   LOGO LOG — imagem PNG transparente
   Aplicada no login, mobile card e sidebar
   ============================================= */

/* Container geral */
.log-img-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    align-self: flex-end;
    margin-bottom: 10px;
}
.log-img-wrap--sidebar {
    margin-bottom: 0;
    gap: 0;
}

/* Imagem base */
.logo-log {
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-log:hover { transform: scale(1.04); }

/* ── Login (painel azul escuro) ──────────────
   A logo é azul escuro — no painel azul,
   invertemos para branco com brightness       */
.logo-log--login {
    height: 110px;
    width: auto;
    filter:
        brightness(0) invert(1)
        drop-shadow(0 4px 20px rgba(255,255,255,0.25))
        drop-shadow(0 2px 8px rgba(0,0,0,0.45));
}

/* ── Card mobile / login right (fundo branco)
   A logo é azul — aparece na cor original     */
.logo-log--mobile {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,59,122,0.15));
}

/* ── Sidebar (fundo azul escuro)
   Mesma lógica do login: invertemos para branco */
.logo-log--sidebar {
    height: 40px;
    width: auto;
    filter:
        brightness(0) invert(1)
        drop-shadow(0 1px 6px rgba(0,0,0,0.35));
    transition: opacity var(--transition);
}

/* Esconde quando sidebar colapsa */
.sidebar.collapsed .log-img-wrap {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

/* Subtexto "Expedição" */
.log-img-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 4.5px;
    color: rgba(255,255,255,0.50);
    text-transform: uppercase;
    padding-left: 2px;
}
.log-img-sub--light { color: rgba(0,59,122,0.40); }

/* Ponto pulsante verde */
.log-img-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
    flex-shrink: 0;
    animation: pulseDot 2.5s ease-in-out infinite;
    box-shadow: 0 0 0 2px rgba(74,222,128,0.2), 0 0 10px rgba(74,222,128,0.7);
}
.log-img-dot--light {
    background: var(--alpes-green);
    box-shadow: 0 0 0 2px rgba(0,135,62,0.2), 0 0 8px rgba(0,135,62,0.5);
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(74,222,128,0.2), 0 0 10px rgba(74,222,128,0.6); }
    50%       { box-shadow: 0 0 0 5px rgba(74,222,128,0.08), 0 0 22px rgba(74,222,128,0.9); }
}

.login-logo-img-sm {
    height: 86px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 12px rgba(0,59,122,0.22));
}

.login-tagline {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    color: white;
}
.login-desc { font-size: 15px; color: rgba(255,255,255,0.75); margin-bottom: 36px; line-height: 1.7; }
.login-features { display: flex; flex-direction: column; gap: 11px; }
.feature-item { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.9); font-size: 14px; }
.feature-item i { color: #4ADE80; font-size: 15px; }

.login-right {
    width: 480px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.login-card { width: 100%; max-width: 400px; }

.login-logo-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.login-card-header { margin-bottom: 32px; }
.login-card-header h2 { font-size: 26px; font-weight: 800; color: var(--alpes-gray-900); margin-bottom: 4px; }
.login-card-header p { color: var(--alpes-gray-500); font-size: 14px; }

.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--alpes-gray-700); font-size: 13px; }
.login-form label i { margin-right: 6px; color: var(--alpes-blue); }
.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--alpes-gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--alpes-gray-800);
    transition: var(--transition);
    outline: none;
    background: var(--alpes-gray-50);
}
.login-form input:focus {
    border-color: var(--alpes-blue-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(0,91,181,0.1);
}

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 48px; }
.toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--alpes-gray-400);
    font-size: 16px; padding: 4px; transition: color var(--transition);
}
.toggle-pass:hover { color: var(--alpes-blue); }

.login-error {
    background: #FEF2F2; border: 1px solid #FECACA;
    color: var(--alpes-red); padding: 11px 14px;
    border-radius: var(--radius-md); margin-bottom: 14px;
    font-size: 13px; display: flex; align-items: center; gap: 8px;
}

.btn-login {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--alpes-blue), var(--alpes-blue-light));
    color: white; border: none; border-radius: var(--radius-md);
    font-size: 15px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 8px; transition: var(--transition); letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
}
.btn-login:hover {
    background: linear-gradient(135deg, #002D5C, var(--alpes-blue));
    transform: translateY(-1px); box-shadow: var(--shadow-lg);
}
.btn-login:active { transform: translateY(0); }

.login-footer { margin-top: 36px; text-align: center; color: var(--alpes-gray-400); font-size: 12px; }

/* =============================================
   APP LAYOUT
   ============================================= */
#app { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--alpes-gray-900);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh;
    z-index: 100; transition: width var(--transition); overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
    padding: 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: space-between;
    min-height: 72px;
}

/* LOGO SIDEBAR */
.sidebar-logo {
    display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden;
}
.sidebar-logo-img {
    height: 52px; width: auto; object-fit: contain; flex-shrink: 0;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0,0,0,0.45));
    transition: var(--transition);
}
.sidebar-log-text {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 2.5px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 5px;
    padding: 3px 8px;
    transition: opacity var(--transition);
    align-self: flex-end;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sidebar-toggle-btn {
    background: rgba(255,255,255,0.08); border: none;
    color: rgba(255,255,255,0.6); width: 32px; height: 32px;
    border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--transition);
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,0.15); color: white; }

.sidebar-nav {
    flex: 1; padding: 16px 10px;
    display: flex; flex-direction: column; gap: 3px;
    overflow-y: auto; overflow-x: hidden;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; border-radius: var(--radius-md);
    text-decoration: none; color: rgba(255,255,255,0.6);
    font-size: 14px; font-weight: 500;
    transition: var(--transition); white-space: nowrap;
}
.nav-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--alpes-blue); color: white; }

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-log-text { opacity: 0; pointer-events: none; }

.sidebar-user {
    padding: 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 11px; overflow: hidden;
}
.user-avatar {
    width: 36px; height: 36px; background: var(--alpes-blue);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; white-space: nowrap; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: white; }
.user-role { display: block; font-size: 11px; color: rgba(255,255,255,0.5); }
.btn-logout {
    background: rgba(255,255,255,0.08); border: none;
    color: rgba(255,255,255,0.5); width: 30px; height: 30px;
    border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--transition);
}
.btn-logout:hover { background: rgba(211,47,47,0.3); color: #FC8181; }

/* MAIN */
.main-content {
    margin-left: var(--sidebar-width); flex: 1; min-height: 100vh;
    transition: margin-left var(--transition); display: flex; flex-direction: column;
}
.main-content.expanded { margin-left: var(--sidebar-collapsed); }

/* TOPBAR */
.topbar {
    height: var(--topbar-height); background: white;
    border-bottom: 1px solid var(--alpes-gray-200);
    display: flex; align-items: center; padding: 0 24px; gap: 16px;
    position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm);
}
.menu-toggle {
    display: none; background: none; border: none;
    font-size: 20px; color: var(--alpes-gray-600); cursor: pointer;
    padding: 6px; border-radius: var(--radius-sm); transition: var(--transition);
}
.menu-toggle:hover { background: var(--alpes-gray-100); color: var(--alpes-blue); }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--alpes-gray-800); flex: 1; }
.topbar-date { font-size: 13px; color: var(--alpes-gray-500); font-weight: 500; }

/* PAGES */
.page { padding: 28px 28px 40px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h2 {
    font-size: 22px; font-weight: 800; color: var(--alpes-gray-900);
    display: flex; align-items: center; gap: 10px; margin-bottom: 3px;
}
.page-header h2 i { color: var(--alpes-blue); }
.page-header p { color: var(--alpes-gray-500); font-size: 14px; }

/* =============================================
   STATS
   ============================================= */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.stat-card {
    background: white; border-radius: var(--radius-lg);
    padding: 20px 22px; display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--alpes-gray-100);
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
    width: 50px; height: 50px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue { background: var(--alpes-blue-pale); color: var(--alpes-blue); }
.stat-icon.green { background: #DCFCE7; color: var(--alpes-green); }
.stat-icon.orange { background: #FFF7ED; color: var(--alpes-orange); }
.stat-icon.purple { background: #F3E8FF; color: var(--alpes-purple); }
.stat-number { display: block; font-size: 30px; font-weight: 800; color: var(--alpes-gray-900); line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: 12px; color: var(--alpes-gray-500); font-weight: 500; }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--alpes-gray-100); overflow: hidden;
}
.card-header {
    padding: 16px 22px; border-bottom: 1px solid var(--alpes-gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 14px; font-weight: 700; color: var(--alpes-gray-800); display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--alpes-blue); }
.card-body { padding: 20px 22px; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }

/* QUICK ACTIONS */
.quick-actions {
    background: white; border-radius: var(--radius-lg);
    padding: 20px 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--alpes-gray-100);
}
.quick-actions h3 {
    font-size: 14px; font-weight: 700; color: var(--alpes-gray-800);
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.quick-actions h3 i { color: var(--alpes-orange); }
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px 14px; border-radius: var(--radius-lg); border: none; cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif;
    transition: var(--transition);
}
.quick-action-btn i { font-size: 24px; }
.quick-action-btn.blue { background: var(--alpes-blue-pale); color: var(--alpes-blue); }
.quick-action-btn.blue:hover { background: #D1E3F8; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-action-btn.green { background: #DCFCE7; color: var(--alpes-green); }
.quick-action-btn.green:hover { background: #BBF7D0; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-action-btn.orange { background: #FFF7ED; color: var(--alpes-orange); }
.quick-action-btn.orange:hover { background: #FED7AA; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-action-btn.purple { background: #F3E8FF; color: var(--alpes-purple); }
.quick-action-btn.purple:hover { background: #E9D5FF; transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    background: linear-gradient(135deg, var(--alpes-blue), var(--alpes-blue-light));
    color: white; border: none; border-radius: var(--radius-md);
    padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.btn-primary:hover { background: linear-gradient(135deg, #002D5C, var(--alpes-blue)); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary {
    background: white; color: var(--alpes-gray-700); border: 1.5px solid var(--alpes-gray-200);
    border-radius: var(--radius-md); padding: 10px 20px; font-size: 14px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.btn-secondary:hover { background: var(--alpes-gray-50); border-color: var(--alpes-gray-300); }
.btn-sm {
    background: var(--alpes-blue-pale); color: var(--alpes-blue); border: none;
    border-radius: var(--radius-sm); padding: 6px 14px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: 'Inter', sans-serif; transition: var(--transition);
}
.btn-sm:hover { background: #D1E3F8; }
.btn-danger {
    background: #FEF2F2; color: var(--alpes-red); border: 1.5px solid #FECACA;
    border-radius: var(--radius-md); padding: 8px 14px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.btn-danger:hover { background: #FEE2E2; }
.btn-back {
    background: none; border: none; color: var(--alpes-blue); font-size: 14px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 0;
    margin-bottom: 8px; font-family: 'Inter', sans-serif;
}
.btn-back:hover { text-decoration: underline; }

/* =============================================
   FORM
   ============================================= */
.form-card {
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--alpes-gray-100); overflow: hidden;
}
.form-section { padding: 26px 28px; border-bottom: 1px solid var(--alpes-gray-100); }
.form-section:last-child { border-bottom: none; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title h3 { font-size: 15px; font-weight: 700; color: var(--alpes-gray-800); }
.step-badge {
    width: 30px; height: 30px; background: var(--alpes-blue); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--alpes-gray-700); display: flex; align-items: center; gap: 5px; }
.form-group label i { color: var(--alpes-blue); width: 13px; }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 13px; border: 1.5px solid var(--alpes-gray-200);
    border-radius: var(--radius-md); font-size: 14px;
    font-family: 'Inter', sans-serif; color: var(--alpes-gray-800);
    background: var(--alpes-gray-50); transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--alpes-blue-light); background: white;
    box-shadow: 0 0 0 3px rgba(0,91,181,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions {
    padding: 20px 28px; background: var(--alpes-gray-50);
    display: flex; justify-content: flex-end; gap: 12px;
    border-top: 1px solid var(--alpes-gray-100);
}

/* =============================================
   UPLOAD & FOTOS
   ============================================= */
.upload-area {
    border: 2px dashed var(--alpes-gray-300); border-radius: var(--radius-lg);
    padding: 44px 28px; text-align: center; cursor: pointer;
    transition: var(--transition); background: var(--alpes-gray-50); margin-bottom: 18px;
}
.upload-area:hover { border-color: var(--alpes-blue-light); background: var(--alpes-blue-pale); }
.upload-area.drag-over { border-color: var(--alpes-blue); background: var(--alpes-blue-pale); transform: scale(1.01); }
.upload-icon { font-size: 44px; color: var(--alpes-blue-light); margin-bottom: 14px; }
.upload-area h4 { font-size: 16px; font-weight: 700; color: var(--alpes-gray-700); margin-bottom: 6px; }
.upload-area p { font-size: 13px; color: var(--alpes-gray-500); }

.fotos-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.foto-item {
    position: relative; border-radius: var(--radius-md); overflow: hidden;
    border: 2px solid var(--alpes-gray-200); background: var(--alpes-gray-100);
    aspect-ratio: 4/3; transition: var(--transition);
}
.foto-item:hover { border-color: var(--alpes-blue); }
.foto-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.foto-remove {
    position: absolute; top: 5px; right: 5px; width: 24px; height: 24px;
    background: rgba(211,47,47,0.9); color: white; border: none; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 10px; transition: var(--transition);
}
.foto-remove:hover { background: var(--alpes-red); }
.foto-nome {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.65); color: white; font-size: 10px;
    padding: 4px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ANÁLISE IA */
.fotos-analise {
    background: var(--alpes-blue-pale); border: 1px solid #C7DEFA;
    border-radius: var(--radius-lg); overflow: hidden;
}
.analise-header {
    background: linear-gradient(135deg, var(--alpes-blue), var(--alpes-blue-light));
    color: white; padding: 14px 18px;
    display: flex; align-items: center; gap: 10px;
}
.analise-header h4 { font-size: 14px; font-weight: 700; flex: 1; }
.ia-badge {
    background: rgba(255,255,255,0.25); color: white;
    font-size: 10px; font-weight: 800; padding: 2px 8px;
    border-radius: 100px; letter-spacing: 1px; border: 1px solid rgba(255,255,255,0.3);
}
.analise-item {
    padding: 13px 18px; border-bottom: 1px solid #D4E8FC;
    display: flex; align-items: flex-start; gap: 12px;
}
.analise-item:last-child { border-bottom: none; }
.analise-thumb { width: 60px; height: 45px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.analise-texto { flex: 1; font-size: 13px; color: var(--alpes-gray-700); line-height: 1.5; }
.analise-texto strong { display: block; font-weight: 600; color: var(--alpes-gray-900); margin-bottom: 2px; }
.analise-ia-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--alpes-blue-pale); color: var(--alpes-blue);
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 100px;
    border: 1px solid #A8C8F0; margin-top: 4px;
}

/* =============================================
   FILTROS E TABELA
   ============================================= */
.filters-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--alpes-gray-400); font-size: 14px; }
.search-box input {
    width: 100%; padding: 10px 13px 10px 38px; border: 1.5px solid var(--alpes-gray-200);
    border-radius: var(--radius-md); font-size: 14px; font-family: 'Inter', sans-serif;
    color: var(--alpes-gray-800); background: white; transition: var(--transition); outline: none;
}
.search-box input:focus { border-color: var(--alpes-blue-light); box-shadow: 0 0 0 3px rgba(0,91,181,0.1); }
.filter-group select {
    padding: 10px 13px; border: 1.5px solid var(--alpes-gray-200); border-radius: var(--radius-md);
    font-size: 14px; font-family: 'Inter', sans-serif; color: var(--alpes-gray-700);
    background: white; outline: none; cursor: pointer; transition: var(--transition);
}
.filter-group select:focus { border-color: var(--alpes-blue-light); }

.table-wrapper { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    background: var(--alpes-gray-50); color: var(--alpes-gray-600); font-weight: 700;
    padding: 11px 14px; text-align: left; border-bottom: 2px solid var(--alpes-gray-200);
    white-space: nowrap; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;
}
.data-table td {
    padding: 13px 14px; border-bottom: 1px solid var(--alpes-gray-100);
    color: var(--alpes-gray-700); vertical-align: middle;
}
.data-table tr:hover td { background: var(--alpes-gray-50); }
.data-table tr:last-child td { border-bottom: none; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.badge-processando { background: #FFF7ED; color: #C05621; }
.badge-expedido { background: #DCFCE7; color: #166534; }
.badge-entregue { background: var(--alpes-blue-pale); color: var(--alpes-blue); }
.badge-cancelado { background: #FEF2F2; color: #991B1B; }

/* =============================================
   DETALHE
   ============================================= */
.detalhe-header-card {
    background: linear-gradient(135deg, var(--alpes-blue) 0%, var(--alpes-blue-light) 100%);
    border-radius: var(--radius-lg); padding: 26px 28px; color: white; margin-bottom: 18px;
}
.detalhe-header-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.detalhe-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.detalhe-meta-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,0.85); }
.detalhe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.info-row { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--alpes-gray-100); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--alpes-gray-500); }
.info-value { font-size: 14px; color: var(--alpes-gray-800); font-weight: 500; }

.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 13px; }
.foto-card { border-radius: var(--radius-md); overflow: hidden; border: 2px solid var(--alpes-gray-200); cursor: pointer; transition: var(--transition); }
.foto-card:hover { border-color: var(--alpes-blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.foto-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.foto-card-info { padding: 7px 9px; background: white; }
.foto-card-nome { font-size: 11px; color: var(--alpes-gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* STATUS BARS */
.status-bars { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.status-bar-item { display: flex; flex-direction: column; gap: 5px; }
.status-bar-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--alpes-gray-700); }
.status-bar-track { height: 10px; background: var(--alpes-gray-100); border-radius: 100px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 100px; transition: width 0.8s ease; }

/* =============================================
   GALERIA
   ============================================= */
.galeria-section { margin-bottom: 28px; }
.galeria-section-title {
    font-size: 14px; font-weight: 700; color: var(--alpes-gray-700);
    margin-bottom: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding-bottom: 10px; border-bottom: 2px solid var(--alpes-blue-pale);
}

/* =============================================
   RELATÓRIOS
   ============================================= */
.relatorio-grid {
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    gap: 18px;
}

/* RECENT LIST */
.recent-item {
    display: flex; align-items: center; gap: 13px; padding: 11px 0;
    border-bottom: 1px solid var(--alpes-gray-100); cursor: pointer;
    transition: var(--transition); border-radius: var(--radius-sm);
}
.recent-item:hover { padding-left: 5px; }
.recent-item:last-child { border-bottom: none; }
.recent-icon {
    width: 38px; height: 38px; background: var(--alpes-blue-pale);
    border-radius: var(--radius-md); display: flex; align-items: center;
    justify-content: center; color: var(--alpes-blue); font-size: 15px; flex-shrink: 0;
}
.recent-info { flex: 1; min-width: 0; }
.recent-romaneio { font-weight: 700; font-size: 13px; color: var(--alpes-gray-800); }
.recent-meta { font-size: 11px; color: var(--alpes-gray-500); }

/* PREVIEW RELATÓRIO */
.relatorio-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.relatorio-preview-table th {
    background: var(--alpes-blue); color: white;
    padding: 9px 12px; text-align: left; font-size: 11px; font-weight: 700;
}
.relatorio-preview-table td { padding: 9px 12px; border-bottom: 1px solid var(--alpes-gray-100); }
.relatorio-preview-table tr:hover td { background: var(--alpes-gray-50); }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.88);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(4px);
}
.modal-content {
    position: relative; max-width: 90vw; max-height: 90vh;
    border-radius: var(--radius-lg); overflow: hidden; background: var(--alpes-gray-900);
}
.modal-content img { display: block; max-width: 100%; max-height: 80vh; object-fit: contain; }
.modal-close {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
    background: rgba(255,255,255,0.2); border: none; border-radius: 50%;
    color: white; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition); z-index: 10;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-info { padding: 12px 18px; color: rgba(255,255,255,0.8); font-size: 13px; }

/* =============================================
   TOAST & LOADING
   ============================================= */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--alpes-gray-900); color: white;
    padding: 13px 18px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; box-shadow: var(--shadow-xl);
    z-index: 2000; display: flex; align-items: center; gap: 10px;
    animation: slideInToast 0.3s ease; max-width: 360px;
}
.toast.success { border-left: 4px solid var(--alpes-green); }
.toast.error { border-left: 4px solid var(--alpes-red); }
.toast.info { border-left: 4px solid var(--alpes-blue-light); }
@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.loading-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 3000; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.loading-box {
    background: white; border-radius: var(--radius-lg); padding: 36px 48px;
    text-align: center; box-shadow: var(--shadow-xl);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.loading-box p { font-size: 15px; font-weight: 600; color: var(--alpes-gray-700); }

.empty-state { text-align: center; padding: 44px 20px; color: var(--alpes-gray-400); }
.empty-state i { font-size: 44px; margin-bottom: 12px; display: block; }
.empty-state p { margin-bottom: 18px; font-size: 15px; color: var(--alpes-gray-500); }
.loading { text-align: center; padding: 36px; color: var(--alpes-gray-500); font-size: 14px; }
.loading i { margin-right: 8px; color: var(--alpes-blue); }

/* EMAIL FEEDBACK */
.email-feedback {
    padding: 11px 14px; border-radius: var(--radius-md); font-size: 13px;
    display: flex; align-items: center; gap: 8px;
}
.email-feedback.success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.email-feedback.error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .relatorio-grid { grid-template-columns: 260px 1fr; }
    .relatorio-grid .card:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .detalhe-grid { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .login-left { display: none; }
    .login-right { width: 100%; }
    .login-logo-mobile { display: flex; }
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .menu-toggle { display: flex !important; }
    .topbar-date { display: none; }
    .page { padding: 18px 14px 32px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-section { padding: 18px 14px; }
    .form-actions { padding: 14px; flex-direction: column-reverse; }
    .fotos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .relatorio-grid { grid-template-columns: 1fr; }
    .relatorio-grid .card { grid-column: span 1 !important; }
    .data-table th:nth-child(3), .data-table td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
}
