/* Project: EIMBox Signature Style (M3-EIM-Floating)
   Version: 2.0 (Consolidated)
   Standards: 8px Radius, Floating Labels, Leading Icons, Android WebView Optimized
*/

:root {
    --m3-surface: #FEF7FF;
    --m3-primary: #6750A4;
    --m3-primary-gradient: linear-gradient(135deg, #6750A4 0%, #4F378B 100%);
    --m3-on-primary: #FFFFFF;
    --m3-tonal-surface: #F7F2FA;
    --m3-tonal-container: #EADDFF;
    --m3-on-tonal-container: #21005D;
    --m3-outline: #CAC4D0;
    --m3-shadow: rgba(103, 80, 164, 0.08);
}

/* --- Global Utilities --- */
.m3-8px {
    border-radius: 8px !important;
}

/* --- Card Styling --- */
.m3-floating-card {
    background-color: #fff;
    border-radius: 8px !important;
    border: 1px solid #E0E0E0;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px var(--m3-shadow);
    overflow: hidden;
}

.m3-header-tonal {
    padding: 16px 20px;
    background-color: var(--m3-tonal-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--m3-tonal-container);
}

.m3-header-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--m3-on-tonal-container);
    margin: 0;
}

/* --- M3-EIM-Floating Input System --- */
.m3-floating-group {
    position: relative;
    margin-bottom: 20px;
}

.m3-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--m3-primary);
    font-size: 1.2rem;
    z-index: 10;
    pointer-events: none;
}

.m3-floating-label {
    position: absolute;
    left: 44px;
    top: 4px;
    padding: 0 6px;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--m3-outline);
    z-index: 15;
    letter-spacing: 1.1px;
}

.m3-select-floating, .m3-input-floating {
    appearance: none;
    width: 100%;
    height: 48px;
    padding: 12px 16px 0px 48px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid var(--m3-outline);
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.m3-select-floating:focus, .m3-input-floating:focus {
    border-color: var(--m3-primary);
    box-shadow: 0 0 0 1px var(--m3-primary);
    outline: none;
}

/* --- Buttons & Icons --- */
.btn-m3-submit {
    background: var(--m3-primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px !important;
    height: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(103, 80, 164, 0.2);
    transition: 0.2s;
}


.btn-m3-primary {
    background: #6750A4;
    color: #fff;
    border-radius: 8px !important;
    padding: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.15s, opacity 0.15s;
}

.btn-m3-submit:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.tonal-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--m3-tonal-container);
    color: var(--m3-on-tonal-container);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}





/* Glassmorphism App Bar */
.m3-app-bar {
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 1060;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-bar-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1C1B1F;
    flex-grow: 1;
}

/* Mesh Gradient Hero Section */
.hero-container {
    margin: 12px;
    padding: 24px 20px;
    border-radius: 8px;
    /* M3 Large Corner */
    /* background: linear-gradient(135deg, #6750A4 0%, #B69DF8 100%); */
    background: linear-gradient(135deg, #6750A4 0%, #4F378B 100%);
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 20px rgba(103, 80, 164, 0.15);
}

.hero-container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Condensed Category Styling */
.m3-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9e99ac;
    margin: 20px 8px 8px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.m3-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #EADDFF;
}

/* Block Units (Strict 8px Radius) */
.block-unit {
    background: #fff;
    border-radius: 16px !important;
    border: 1px solid #f0f0f0 !important;
    overflow: hidden;
    margin-bottom: 12px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.block-unit:active {
    transform: scale(0.99);
}

/* Quick Stats Pill */
.session-pill {
    font-size: 0.6rem;
    background: #EADDFF;
    color: #21005D;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 900;
    border: 1px solid rgba(103, 80, 164, 0.2);
    cursor: hand;
}

.session-pill-2 {
    font-size: 0.6rem;
    background: #f7d4ee;
    color: #750c70;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 900;
    border: 1px solid rgba(103, 80, 164, 0.2);
    cursor: hand;
}

.session-pill {
    background: #f1f1f1;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
}

.session-pill:hover {
    background: #ddd
}

.session-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.session-item:hover {
    background: #f5f5f5
}

.developer-settings {
    border: 1px dashed red;
}

.developer-setting.icon-box.i {
    color: red;
}

.widget-grid {
    padding: 12px;
}

.avatar-dropdown {
    position: absolute;
    right: 12px;
    top: 60px;
    width: 250px;
    background: #f9f7fa;
    border-radius: 12px;
    display: none;
    overflow: hidden;
    z-index: 2000;
}

.dd-item {
    padding: 11px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1C1B1F;
    cursor: pointer;
}

.dd-item:hover {
    background: #F3EDF7;
}

.dd-divider {
    height: 1px;
    background: #eee;
}

.text-danger {
    color: #B3261E;
}

/* -------------- DARK MODE --------------------- */

.dark-mode {
    background: #121212;
    color: #fff;
}

.dark-mode .avatar-dropdown {
    background: #1E1E1E;
}

.dark-mode .dd-item {
    color: #fff;
}

.dark-mode .dd-item:hover {
    background: #2C2C2C;
}



/* ------------------------------ TOAST ----------------------------- */

.toast-container {
    position: fixed;
    z-index: 9999;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.toast-container.top {
    top: 20px;
}

.toast-container.bottom {
    bottom: 20px;
}

.toast-container.center {
    top: 50%;
    transform: translate(-50%, -50%);
}

.toast {
    min-width: 260px;
    max-width: 90vw;
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    animation: toastIn .3s ease, toastOut .3s ease 2.7s;
    pointer-events: auto;
    font-size: 14px;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-success {
    background: #146C32;
}

.toast-danger {
    background: #B3261E;
}

.toast-primary {
    background: #6750A4;
}

.toast-warning {
    background: #FF9800;
    color: #000;
}

.toast-info {
    background: #0288D1;
}

.toast-dark {
    background: #212121;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.m3-list-item {
    background-color: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    margin: 0 12px 6px;
    display: flex;
    align-items: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease, background-color 0.15s;
    cursor: pointer;
}

.m3-list-item:active {
    transform: scale(0.98);
    background-color: #F7F2FA;
}


.m3-cat-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #6750A4;
    margin: 20px 0 8px 16px;
    letter-spacing: 0.8px;
}



/* Condensed Tool Card (8px Radius) */
.tool-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin: 0 12px 6px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, background 0.15s;
    text-decoration: none !important;
    color: inherit;
}

.tool-card:active {
    transform: scale(0.98);
    background-color: #F3EDF7;
}

/* Tonal Icon Box (8px Radius) */


.tool-info {
    flex-grow: 1;
    overflow: hidden;
}

.tool-name {
    font-weight: 700;
    color: #1C1B1F;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.tool-meta {
    font-size: 0.7rem;
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-indicator {
    font-size: 0.65rem;
    background: #EADDFF;
    color: #21005D;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
}





/* Condensed Category Labels */
.m3-cat-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #6750A4;
    margin: 20px 0 8px 16px;
    letter-spacing: 0.8px;
}

/* M3 Setting Card (8px Radius) */
.m3-setting-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin: 0 12px 6px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease, background 0.15s;
    text-decoration: none !important;
    color: inherit;
}

.m3-setting-card:active {
    transform: scale(0.98);
    background-color: #F3EDF7;
}



/* Category Specific Tonal Colors */
.c-inst {
    background: #F3EDF7;
    color: #6750A4;
}

.c-acad {
    background: #E3F2FD;
    color: #1976D2;
}

.c-fina {
    background: #E8F5E9;
    color: #2E7D32;
}

.c-user {
    background: #FFF3E0;
    color: #E65100;
}

.setting-info {
    flex-grow: 1;
    overflow: hidden;
}

.st-title {
    font-weight: 700;
    color: #1C1B1F;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.st-desc {
    font-size: 0.7rem;
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dev Console Grid */
.dev-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 12px;
}

.btn-dev {
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 10px;
    border: 1px solid #F9DEDC;
    background: #fff;
    color: #B3261E;
    text-decoration: none;
    text-align: center;
}

.btn-dev:active {
    background: #FFEBEE;
}





/* Profile Hero Card (8px Radius) */
.account-hero {
    background-color: #F3EDF7;
    border-radius: 8px;
    padding: 16px;
    margin: 12px;
    display: flex;
    align-items: center;
    border: 1px solid #EADDFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    /* গাইডলাইন অনুযায়ী ৮ পিক্সেল */
    background-color: #EADDFF;
    color: #21005D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 14px;
    flex-shrink: 0;
}

/* Condensed Setting Item (8px Radius) */


/* Icon Tonal Box (8px Radius) */


/* Category Specific Tonal Colors */
.c-info {
    background: #F3EDF7;
    color: #6750A4;
}

.c-util {
    background: #E8F5E9;
    color: #146C32;
}

.c-secu {
    background: #FFF3E0;
    color: #E46C0A;
}

.c-exit {
    background: #FFEBEE;
    color: #B3261E;
}

.item-info {
    flex-grow: 1;
    overflow: hidden;
}

.st-title {
    font-weight: 700;
    color: #1C1B1F;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.st-desc {
    font-size: 0.7rem;
    color: #49454F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-lbl {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #6750A4;
    margin: 20px 0 8px 16px;
    letter-spacing: 0.8px;
}


.m3-category-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #95919e;
    margin: 20px 0 10px 16px;
    letter-spacing: 0.8px;
    text-shadow:

        2px 1px 2px 1px rgba(102, 100, 100, 0.9);
}

/* Condensed Icon Grid (3 Columns for Mobile) */
.m3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 12px;
}

/* M3 Report Card (8px Radius) */
.m3-report-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, background 0.15s;
    text-decoration: none !important;
    aspect-ratio: 1 / 1;
}

.m3-report-card:active {
    transform: scale(0.95);
    background-color: #F3EDF7;
    border-color: #EADDFF;
}

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #F7F2FA;
    color: #6750A4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    margin-right: 10px;
}

.report-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #1D1B20;
    text-align: center;
    line-height: 1.2;
}

.session-chip {
    font-size: 0.65rem;
    background: #EADDFF;
    color: #21005D;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 800;
}



/* Loading Container */
.m3-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

/* Material 3 Circular Spinner */
.m3-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--m3-primary-tonal);
    border-top: 4px solid var(--m3-primary);
    border-radius: 50%;
    animation: m3-spin 0.8s linear infinite;
}

@keyframes m3-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Pulse Animation for Text */
.m3-loading-text {
    margin-top: 16px;
    font-weight: 800;
    color: var(--m3-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.75rem;
    animation: m3-pulse 1.5s ease-in-out infinite;
}

@keyframes m3-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* Skeleton Shimmer (For cards) */
.m3-skeleton {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 8px;
    background-size: 200% 100%;
    animation: 1.5s m3-shimmer linear infinite;
}

@keyframes m3-shimmer {
    to {
        background-position-x: -200%;
    }
}


/* ব্যাজ কন্টেইনার পজিশনিং */
.card-wrapper {
    position: relative; /* যাতে ব্যাজটি কার্ডের ভেতরে থাকতে পারে */
}

/* ১. টেক্সট ব্যাজ স্টাইল (NEW লেখা) */
.m3-badge-new {
    position: absolute;
    top: -8px; /* কার্ডের একটু বাইরে ভেসে থাকবে */
    right: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 900;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ২. স্টাইলিশ আইকন ইন্ডিকেটর (Sparkle Icon) */
.m3-sparkle {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #0f8663;
    font-size: 1.5rem;
    animation: pulse-sparkle 2s infinite;
}

@keyframes pulse-sparkle {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}