/* ============================================================
   SmartDB — Tema Navy (navy + cyan glassmorphism)
   Usato da: Default.aspx, LoginError.aspx
   Toggle: Web.config -> SmartDB.UiTheme = "navy"
============================================================ */
:root {
    --primary-color: #0ea5e9;
    --secondary-color: #38bdf8;
    --primary-gradient: linear-gradient(135deg, #0f1e3d 0%, #0ea5e9 100%);
    --header-height: 70px;
    --navy: #0f1e3d;
    --cyan: #0ea5e9;
    --cyan-light: #e0f2fe;
    --cyan-bg: #f0f9ff;
}

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

body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--cyan-bg); min-height: 100vh; display: flex; flex-direction: column; }
body > form { flex: 1; display: flex; flex-direction: column; }

/* ── Header ── */
.main-header {
    background: var(--navy); height: var(--header-height);
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.logo-wrapper { display: flex; align-items: center; gap: 12px; }
.logo-wrapper img { height: 45px; width: auto; }
.brand-name { font-size: 20px; font-weight: 700; color: #e0f2fe; letter-spacing: -0.3px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.user-info { display: flex; align-items: center; gap: 10px; padding: 6px 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 50px; }
.user-avatar { width: 32px; height: 32px; background: linear-gradient(135deg,#0ea5e9,#38bdf8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 13px; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 13px; color: #bae6fd; }
.user-status { font-size: 10px; color: #4ade80; display: flex; align-items: center; gap: 4px; }
.user-status i { font-size: 8px; }
.user-status.unauthenticated { color: #f87171; }
.btn-logout { display: flex; align-items: center; gap: 7px; padding: 8px 16px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; color: #94a3b8; font-size: 13px; font-weight: 500; text-decoration: none; transition: all 0.25s ease; }
.btn-logout:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.btn-login { display: flex; align-items: center; gap: 7px; padding: 8px 18px; background: linear-gradient(90deg,#0ea5e9,#38bdf8); border: none; border-radius: 8px; color: white; font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.25s ease; box-shadow: 0 4px 14px rgba(14,165,233,0.35); }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,0.45); color: white; }

/* ── Anonymous page ── */
.anon-bg {
    flex: 1;
    margin: -24px -24px 0 -24px;
    background: linear-gradient(135deg, #0f1e3d 0%, #0c3562 55%, #0369a1 100%);
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}

@keyframes floatA {
    0%,100% { transform: translate(0,0) scale(1); }
    40%      { transform: translate(16px,-18px) scale(1.07); }
    70%      { transform: translate(-10px,12px) scale(0.95); }
}
@keyframes floatB {
    0%,100% { transform: translate(0,0) scale(1); }
    35%      { transform: translate(-14px,16px) scale(1.05); }
    70%      { transform: translate(12px,-10px) scale(0.97); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blob { position: absolute; border-radius: 50%; filter: blur(55px); pointer-events: none; }
.blob-1 { width: 320px; height: 320px; background: rgba(14,165,233,0.38); top: -80px; right: -60px; animation: floatA 9s ease-in-out infinite; }
.blob-2 { width: 200px; height: 200px; background: rgba(56,189,248,0.22); bottom: -50px; left: -40px; animation: floatB 11s ease-in-out infinite; }
.blob-3 { width: 150px; height: 150px; background: rgba(3,105,161,0.28); bottom: 80px; right: 100px; animation: floatA 13s ease-in-out infinite 2s; }

.glass-panel {
    background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.16);
    border-radius: 20px; padding: 36px; text-align: center;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    max-width: 360px; width: 90%;
    animation: fadeUp 0.8s ease-out; position: relative; z-index: 2;
}
.lock-ring { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,rgba(14,165,233,0.28),rgba(56,189,248,0.14)); border: 1px solid rgba(14,165,233,0.38); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 26px; color: #7dd3fc; }
.gp-title { font-size: 20px; font-weight: 700; color: #f0f9ff; margin-bottom: 10px; }
.gp-sub   { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-bottom: 24px; }
.gp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: linear-gradient(90deg,#0ea5e9,#38bdf8); color: white; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: 0 6px 20px rgba(14,165,233,0.4); transition: all 0.25s ease; border: none; cursor: pointer; }
.gp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(14,165,233,0.5); color: white; }

/* ── Main content (logged in) ── */
.main-content { flex: 1; margin-top: var(--header-height); padding: 24px; padding-bottom: 0; display: flex; flex-direction: column; }
.welcome-section { background: var(--primary-gradient); border-radius: 16px; padding: 28px 32px; margin-bottom: 20px; color: white; position: relative; overflow: hidden; }
.welcome-section::before { content: ''; position: absolute; top: -50%; right: -10%; width: 280px; height: 280px; background: rgba(255,255,255,0.08); border-radius: 50%; }
.welcome-section::after  { content: ''; position: absolute; bottom: -30%; right: 20%; width: 180px; height: 180px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.welcome-content  { position: relative; z-index: 1; }
.welcome-title    { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.welcome-subtitle { font-size: 15px; opacity: 0.88; }
.welcome-date     { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; opacity: 0.75; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.menu-body-wrapper { background: white; border-radius: 16px; box-shadow: 0 2px 12px rgba(14,165,233,0.08); border: 1px solid var(--cyan-light); animation: fadeIn 0.5s ease-out; padding: 16px; }

/* DevExpress overrides — navy */
.menu-body-wrapper .dxflGroupBox { border: 1px solid #e0f2fe !important; border-radius: 8px !important; background: #f8fcff !important; margin: 4px !important; box-shadow: none !important; }
.menu-body-wrapper .dxflGroupBox:hover { border-color: #bae6fd !important; }
.menu-body-wrapper .dxflCaption,
.menu-body-wrapper .dxflHeadingLine_MetropolisBlue,
.menu-body-wrapper span.dxflCaption_MetropolisBlue { font-family: 'Inter','Segoe UI',sans-serif !important; font-weight: 500 !important; color: #0369a1 !important; font-size: 13px !important; font-style: italic !important; }
.menu-body-wrapper .dxflGroupBoxContent { padding: 8px 4px !important; }
.menu-body-wrapper .dxbButton_Office2010Silver, .menu-body-wrapper .dxb-btn { width: 150px !important; height: 28px !important; background: linear-gradient(180deg,#fefefe 0%,#f0f8ff 100%) !important; border: 1px solid #bae6fd !important; border-radius: 3px !important; cursor: pointer !important; margin: 2px 0 !important; }
.menu-body-wrapper .dxbButton_Office2010Silver:hover, .menu-body-wrapper .dxb-btn:hover { background: linear-gradient(180deg,#f0f9ff 0%,#e0f2fe 100%) !important; border-color: #7dd3fc !important; }
.menu-body-wrapper .dxb table { width: 100% !important; height: 100% !important; border-collapse: collapse !important; }
.menu-body-wrapper .dxb td { padding: 2px 4px !important; vertical-align: middle !important; }
.menu-body-wrapper .dxb img, .menu-body-wrapper .dxb-btn img { width: 16px !important; height: 16px !important; display: inline-block !important; visibility: visible !important; opacity: 1 !important; }
.menu-body-wrapper .dxb .dx-vam, .menu-body-wrapper .dxbButtonText_Office2010Silver { font-family: 'Inter','Segoe UI',sans-serif !important; font-size: 12px !important; color: #1e3a5f !important; display: inline-block !important; visibility: visible !important; opacity: 1 !important; }
.menu-body-wrapper .dxflNestedControlCell { padding: 2px !important; }
.menu-body-wrapper .dxflItem { padding: 1px 0 !important; }
.menu-body-wrapper .dxflItemCaptionCell { display: none !important; }
.menu-body-wrapper .dxflRow { margin: 0 !important; padding: 0 !important; }
.menu-body-wrapper .dxfl { margin: 0 auto !important; }

/* Footer */
.main-footer { background: white; padding: 12px 24px; margin-top: 24px; border-top: 1px solid var(--cyan-light); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #64748b; }
.footer-build { display: flex; align-items: center; gap: 8px; }
.footer-build i { color: var(--primary-color); }

/* Quick Stats */
.quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 6px rgba(14,165,233,0.07); border: 1px solid var(--cyan-light); transition: all 0.25s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14,165,233,0.12); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; }
.stat-icon.purple { background: var(--primary-gradient); } /* class name from HTML markup — kept for compatibility */
.stat-icon.green  { background: linear-gradient(135deg,#059669,#34d399); }
.stat-icon.orange { background: linear-gradient(135deg,#d97706,#fbbf24); }
.stat-icon.blue   { background: linear-gradient(135deg,#2563eb,#60a5fa); }
.stat-info h4 { font-size: 20px; font-weight: 700; color: #0f1e3d; margin: 0; }
.stat-info p  { font-size: 12px; color: #64748b; margin: 0; }

/* Responsive */
@media (max-width: 768px) {
    .main-header { padding: 0 16px; }
    .brand-name  { display: none; }
    .user-details { display: none; }
    .main-content { padding: 16px; }
    .welcome-section { padding: 20px 22px; }
    .welcome-title { font-size: 20px; }
    .glass-panel { padding: 28px 22px; }
}

/* ── LoginError page — navy ── */
.error-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1e3d 0%, #0c3562 55%, #0369a1 100%);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.error-page .blob-1 { width: 260px; height: 260px; background: rgba(239,68,68,0.20); top: -60px; right: -50px; animation: floatA 10s ease-in-out infinite; }
.error-page .blob-2 { width: 160px; height: 160px; background: rgba(14,165,233,0.18); bottom: -40px; left: -30px; animation: floatB 12s ease-in-out infinite; }
.error-logo { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.45); z-index: 2; white-space: nowrap; }
.error-panel { position: relative; z-index: 2; animation: fadeUp 0.8s ease-out; max-width: 380px; width: 90%; }
.error-ring { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,rgba(239,68,68,0.25),rgba(239,68,68,0.10)); border: 1px solid rgba(239,68,68,0.38); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 26px; color: #fca5a5; }
.ep-title { font-size: 18px; font-weight: 700; color: #fecaca; margin-bottom: 10px; }
.ep-sub   { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-bottom: 24px; }
.error-btn { background: linear-gradient(90deg,#0ea5e9,#38bdf8) !important; color: white !important; border: none !important; box-shadow: 0 6px 20px rgba(14,165,233,0.4) !important; border-radius: 10px !important; padding: 10px 24px !important; font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important; }
