/* ============================================
   IN.APP - Custom Application Styles
   Professional Blue Theme
   ============================================ */

/* --- Global Overrides --- */
html, body {
    font-family: 'Inter', 'Noto Sans Tamil', 'Roboto', sans-serif;
    scroll-behavior: smooth;
}

/* --- Drawer Branding Header --- */
.drawer-header {
    display: flex;
    align-items: center;
    padding: 16px 16px 8px 16px;
    gap: 12px;
}

.drawer-header .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1565C0, #1E88E5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

.drawer-header .brand-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer-header .brand-text .brand-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-header .brand-text .brand-subtitle {
    font-size: 11px;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- AppBar Enhancements --- */
.app-bar-title {
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

/* --- Dashboard Stat Cards --- */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Welcome Banner --- */
.welcome-banner {
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 50%, #42A5F5 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.welcome-banner-content {
    position: relative;
    z-index: 1;
}

/* --- Auth Layout (Login/Register - separate from MainLayout) --- */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-page-left {
    display: none;
    width: 420px;
    min-height: 100vh;
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1E88E5 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.auth-page-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.auth-page-branding {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.auth-page-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: 2px;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-page-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    min-height: 100vh;
    background: var(--mud-palette-background, #F5F7FA);
}

.auth-page-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
}

.auth-page-footer {
    position: absolute;
    bottom: 24px;
    text-align: center;
}

@media (min-width: 960px) {
    .auth-page-left {
        display: flex;
    }
}

@media (max-width: 600px) {
    .auth-page-right {
        padding: 24px 16px;
    }
}

/* --- Auth Card (Login/Register form) --- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    width: 100%;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    border-radius: 16px !important;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0 8px;
}

.auth-brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1565C0, #1E88E5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.auth-divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--mud-palette-text-secondary);
    font-size: 13px;
}

.auth-divider-text::before,
.auth-divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mud-palette-lines-default);
}

/* --- Quick Action Cards --- */
.quick-action-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border-radius: 12px !important;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

/* --- Manage Layout Enhancement --- */
.manage-nav-card {
    border-radius: 12px !important;
    overflow: hidden;
}

/* --- Page Header --- */
.page-header {
    margin-bottom: 24px;
}

.page-header-title {
    font-weight: 700 !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 960px) {
    .welcome-banner {
        padding: 24px;
    }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* --- Utility Classes --- */
.rounded-lg {
    border-radius: 12px !important;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #1565C0, #42A5F5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Meter Card Styles (Batch Testing) --- */
.meter-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 80px;
    border: 1px solid var(--mud-palette-lines-default);
}

.meter-card-pending {
    border-color: var(--mud-palette-lines-default);
    opacity: 0.6;
}

.meter-card-queued {
    border-color: var(--mud-palette-info);
    opacity: 0.8;
}

.meter-card-connecting {
    border-color: var(--mud-palette-info);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

.meter-card-testing {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 12px rgba(21, 101, 192, 0.35);
}

.meter-card-passed {
    border-color: var(--mud-palette-success);
    background: rgba(46, 125, 50, 0.05);
}

.meter-card-failed {
    border-color: var(--mud-palette-error);
    background: rgba(211, 47, 47, 0.05);
}

.meter-card-error {
    border-color: var(--mud-palette-warning);
    background: rgba(245, 124, 0, 0.05);
}
