/* =============================================
   EKOKEN — Light Theme Design System v4
   ============================================= */

:root {
    --accent:       #6c63ff;
    --accent-2:     #06d6a0;
    --accent-glow:  rgba(108, 99, 255, 0.25);
    --danger:       #ff4d6d;
    --success:      #10b981;

    --glass-bg:     rgba(255, 255, 255, 0.72);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-hover:  rgba(255, 255, 255, 0.90);

    --text-primary:   #1a1a2e;
    --text-secondary: #555770;
    --text-muted:     #9395a5;

    --bar-bg:       rgba(255, 255, 255, 0.85);
    --page-bg:      #f0f2f8;

    --top-h:        64px;
    --bot-h:        72px;
    --radius-card:  24px;
    --radius-btn:   16px;
    --radius-pill:  999px;
    --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-top: var(--top-h);
    padding-bottom: calc(var(--bot-h) + 12px);
}

/* =============================================
   TOAST NOTIFICATION SYSTEM
   ============================================= */
.toast-container {
    position: fixed;
    top: calc(var(--top-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 420px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: toastSlideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toast-item.toast-success { border-left: 4px solid var(--success); }
.toast-item.toast-error   { border-left: 4px solid var(--danger); }
.toast-item.toast-info    { border-left: 4px solid var(--accent); }

.toast-item .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon   { color: var(--danger); }
.toast-info .toast-icon    { color: var(--accent); }

@keyframes toastSlideDown {
    from { opacity: 0; transform: translateY(-16px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* =============================================
   BACKGROUND ORBS
   ============================================= */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 12s ease-in-out infinite alternate;
}
.orb-1 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(108,99,255,0.12), transparent 70%);
    top: -120px; left: -100px;
    animation-duration: 11s;
}
.orb-2 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(6,214,160,0.10), transparent 70%);
    top: 30%; right: -100px;
    animation-duration: 14s;
    animation-delay: -4s;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,77,109,0.06), transparent 70%);
    bottom: 100px;
    left: calc(50% - 150px);
    animation-duration: 16s;
    animation-delay: -8s;
}
@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(20px, 30px) scale(1.05); }
    100% { transform: translate(-15px, 15px) scale(0.97); }
}

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--top-h);
    z-index: 100;
    background: var(--bar-bg);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid var(--glass-border);
    animation: slideDown 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.top-bar-inner {
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-logo img {
    height: 36px;
    object-fit: contain;
    display: block;
    transition: transform var(--transition);
}
.top-logo:hover img { transform: scale(1.04); }

.top-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.icon-btn:hover {
    background: var(--glass-hover);
    border-color: rgba(108,99,255,0.25);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,99,255,0.12);
}
.icon-btn .material-symbols-rounded { font-size: 20px; }

/* =============================================
   VIEW SYSTEM
   ============================================= */
.view {
    display: none;
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}
.view.active {
    display: block;
    animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   CARD & FORMS (Login, Register, Forgot)
   ============================================= */
.login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 20px 60px rgba(108,99,255,0.08),
        0 1px 3px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7);
    animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    overflow: hidden;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card Top Navigation (Back button) */
.card-top-nav {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.card-back-btn {
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.card-back-btn:hover {
    background: #ffffff;
    color: var(--accent);
    transform: translateX(-2px);
}
.card-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Badge Icon for Forgot Password */
.icon-header-badge {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(168,85,247,0.15));
    border: 1px solid rgba(108,99,255,0.2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.icon-header-badge .material-symbols-rounded {
    font-size: 32px;
    color: var(--accent);
}

/* Form Container */
.login-card form {
    width: 100%;
}

/* Logo Wrap */
.login-logo-wrap {
    position: relative;
    margin-bottom: 24px;
}
.login-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
    animation: spinRing 4s linear infinite;
    z-index: 0;
}
@keyframes spinRing { to { transform: rotate(360deg); } }

.login-logo-img {
    position: relative;
    z-index: 1;
    width: 88px; height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--page-bg);
    background: #e8e8f0;
}
.login-logo-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.login-logo-img.img-error {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo-img.img-error::after {
    content: 'E';
    font: 800 2.2rem/1 'Outfit', system-ui, sans-serif;
    color: rgba(255,255,255,0.95);
}

/* Typography */
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    text-align: center;
}
.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.4;
}

/* Form Groups */
.form-group {
    width: 100%;
    position: relative;
    margin-bottom: 14px;
}
.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}
.form-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-btn);
    background: rgba(255,255,255,0.75);
    font: 400 0.95rem/1.4 'Outfit', sans-serif;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 3.5px rgba(108,99,255,0.12);
}
.form-input:focus ~ .form-icon { color: var(--accent); }

.form-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color var(--transition);
}
.form-eye-btn:hover { color: var(--accent); }

/* Checkbox for Terms */
.checkbox-group {
    margin: 16px 0 20px;
}
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    line-height: 1.35;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0; width: 0;
}
.checkmark {
    width: 18px; height: 18px;
    border-radius: 6px;
    border: 1.5px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.8);
    flex-shrink: 0;
    margin-top: 1px;
    transition: var(--transition);
    position: relative;
}
.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--accent);
}
.custom-checkbox input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px; top: 2px;
    width: 4px; height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark::after { display: block; }

/* Info Alert Box */
.info-alert-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: #065f46;
}
.info-alert-box .alert-icon {
    color: var(--success);
    font-size: 24px;
    flex-shrink: 0;
}

/* Meta Link */
.login-meta {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.forgot-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
.forgot-link:hover { text-decoration: underline; color: #5b52e0; }

/* Action Buttons */
.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-btn);
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: #fff;
    font: 600 0.95rem/1 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(108,99,255,0.3);
    position: relative;
    overflow: hidden;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.4);
}
.btn-login:active { transform: translateY(0) scale(0.98); }
.btn-login .material-symbols-rounded { font-size: 20px; }

.login-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}
.login-divider span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-register {
    width: 100%;
    padding: 13px;
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-btn);
    background: rgba(255,255,255,0.6);
    color: var(--text-primary);
    font: 500 0.92rem/1 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-register:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(108,99,255,0.06);
    transform: translateY(-1px);
}
.btn-register:active { transform: scale(0.98); }

/* =============================================
   TOOLS VIEW — Projects & Shortcuts
   ============================================= */
.tools-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    padding: 28px 24px 24px;
    box-shadow:
        0 20px 60px rgba(108,99,255,0.08),
        0 1px 3px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7);
    animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tools-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.tools-header-icon {
    font-size: 28px;
    color: var(--accent);
    background: rgba(108,99,255,0.1);
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tools-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.tools-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Tools Search Filter */
.tools-search-box {
    position: relative;
    margin-bottom: 20px;
}
.tools-search-box .search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}
.tools-search-box input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.8);
    font: 400 0.85rem 'Outfit', sans-serif;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}
.tools-search-box input:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}

/* Tool Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 8px 14px;
    border-radius: var(--radius-btn);
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: rgba(108,99,255,0.25);
    background: rgba(255,255,255,0.95);
}
.tool-card:active {
    transform: translateY(-1px) scale(0.97);
}

.tool-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--tool-color, #6c63ff) 12%, transparent);
    color: var(--tool-color, #6c63ff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.tool-icon .material-symbols-rounded { font-size: 24px; }

.tool-card:hover .tool-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tool-color, #6c63ff) 25%, transparent);
}

.tool-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tool-url {
    font-size: 0.62rem;
    color: var(--text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Delete button on custom tool cards */
.tool-delete-btn {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255, 77, 109, 0.15);
    color: var(--danger);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}
.tool-delete-btn .material-symbols-rounded { font-size: 14px; }
.tool-card:hover .tool-delete-btn { opacity: 1; }
.tool-delete-btn:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Add tool button */
.tool-add {
    border-style: dashed;
    border-color: rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.35);
}
.tool-add:hover {
    border-color: var(--accent);
    background: rgba(108,99,255,0.06);
}
.tool-add .tool-icon {
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
}
.tool-add:hover .tool-icon {
    color: var(--accent);
    background: rgba(108,99,255,0.12);
}

/* Animation */
.tool-card {
    opacity: 0;
    animation: toolSlideUp 0.4s ease forwards;
}
@keyframes toolSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============================================
   MODAL DIALOG (Add Tool)
   ============================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-title .material-symbols-rounded { color: var(--accent); }

.modal-close-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.modal-close-btn:hover { background: rgba(0,0,0,0.1); color: var(--text-primary); }

.icon-selector-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 16px 0 8px;
}

.icon-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.icon-opt {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.02);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.icon-opt:hover { background: rgba(108,99,255,0.08); color: var(--accent); }
.icon-opt.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.modal-actions button { flex: 1; }

/* =============================================
   IFRAME VIEW (Magaza / Tools)
   ============================================= */
.iframe-view {
    padding: 0 !important;
    max-width: 100% !important;
    height: calc(100vh - var(--top-h) - var(--bot-h));
    display: none;
    flex-direction: column;
}
.iframe-view.active {
    display: flex !important;
}

.iframe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.iframe-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.iframe-title .material-symbols-rounded { font-size: 20px; color: var(--accent); }

.iframe-ctrl-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.iframe-ctrl-btn:hover { background: var(--glass-hover); color: var(--accent); }

#magaza-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* Loading bar */
.iframe-view.loading::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% 100%;
    animation: iframeLoad 1.2s linear infinite;
    z-index: 5;
}
@keyframes iframeLoad {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* =============================================
   BOTTOM NAVIGATION
   ============================================= */
.bottom-bar {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: var(--bot-h);
    z-index: 100;
    background: var(--bar-bg);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 24px;
    animation: slideUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s both;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-bar.bar-hidden {
    transform: translateY(100%);
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 14px;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    position: relative;
}
.nav-btn .material-symbols-rounded {
    font-size: 22px;
    transition: var(--transition);
}
.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
}
.nav-btn:hover {
    color: var(--text-secondary);
    background: rgba(108,99,255,0.06);
}
.nav-btn.active {
    color: var(--accent);
}
.nav-btn.active .material-symbols-rounded {
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transform: scale(1.1);
}

/* Center button */
.nav-center-btn {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    flex: 0 0 60px;
    width: 60px; height: 60px;
    border-radius: 50% !important;
    color: #fff !important;
    box-shadow: 0 4px 20px var(--accent-glow), 0 0 0 3px rgba(108,99,255,0.1);
    margin-top: -24px;
    padding: 0;
    animation: navGlow 2.5s ease-in-out infinite;
}
.nav-center-btn .material-symbols-rounded { font-size: 26px; }
.nav-center-btn:hover {
    background: linear-gradient(135deg, #7c75ff, #b870ff);
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 8px 28px var(--accent-glow);
    animation-play-state: paused;
}
.nav-center-btn.active {
    color: #fff !important;
    box-shadow: 0 6px 28px rgba(108,99,255,0.5), 0 0 0 5px rgba(108,99,255,0.15);
}
.nav-center-btn .nav-label { display: none; }

@keyframes navGlow {
    0%, 100% { box-shadow: 0 4px 20px var(--accent-glow), 0 0 0 3px rgba(108,99,255,0.1); }
    50%      { box-shadow: 0 6px 32px rgba(108,99,255,0.45), 0 0 0 7px rgba(108,99,255,0.15); }
}

/* Sliding indicator */
.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 10px var(--accent-glow);
    transition: left 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

/* =============================================
   ANIMATIONS & FORM ERRORS
   ============================================= */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.form-group.error .form-input {
    border-color: var(--danger);
    background: rgba(255, 77, 109, 0.04);
}
.form-group.error .form-icon { color: var(--danger); }
.form-error {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--danger);
    margin-top: 4px;
    padding-left: 14px;
    animation: errorFade 0.3s ease both;
}
@keyframes errorFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-login.loading { pointer-events: none; opacity: 0.85; }
.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    right: 20px; top: 50%;
    transform: translateY(-50%);
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Ripple */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.25);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleAnim 0.6s linear forwards;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
    .login-card { padding: 28px 18px; border-radius: 20px; }
    .tools-card { padding: 24px 16px 20px; border-radius: 20px; }
    .login-title { font-size: 1.35rem; }
    .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .modal-card { padding: 22px 18px; border-radius: 20px; }
}
@media (max-width: 360px) {
    .nav-label { display: none; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   FONT-DISPLAY
   ============================================= */
@font-face {
    font-family: 'Material Symbols Rounded';
    font-display: swap;
}