:root {
    --store-green-dark: #14532d;
    --store-green: #65a30d;
    --store-lime: #84cc16;
    --store-lime-soft: #ecfccb;
    --store-yellow: #facc15;
    --store-yellow-soft: #fef9c3;
}

body {
    color: #1f2937;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 14%, rgba(250, 204, 21, 0.26), transparent 34%),
        radial-gradient(circle at 88% 22%, rgba(132, 204, 22, 0.22), transparent 36%),
        radial-gradient(circle at 50% 78%, rgba(250, 204, 21, 0.16), transparent 40%),
        linear-gradient(155deg, #e8f7c4 0%, #f6efaa 45%, #d6f39f 100%);
    background-attachment: fixed;
}

.store-navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #d9f99d;
    backdrop-filter: blur(8px);
}

.app-shell {
    isolation: isolate;
}

.app-content-wrap {
    position: relative;
}

.app-wave {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    min-width: 100vw;
    pointer-events: none;
    z-index: -1;
}

.app-wave-back {
    bottom: -20px;
    opacity: 0.8;
}

.app-wave-front {
    bottom: -52px;
    opacity: 0.9;
}

.app-wave-track {
    display: block;
    width: 220%;
    height: 185px;
    animation: appWaveDrift 20s linear infinite;
    will-change: transform;
}

.app-wave-front .app-wave-track {
    animation-duration: 28s;
    animation-direction: reverse;
}

.welcome-toast {
    min-width: 320px;
    background: rgba(20, 83, 45, 0.92);
    border: 1px solid rgba(190, 242, 100, 0.5) !important;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(20, 83, 45, 0.3);
    backdrop-filter: blur(8px);
}

.welcome-toast .welcome-toast-inner {
    position: relative;
    padding: 0.85rem 0.95rem;
    padding-right: 2.5rem;
}

.welcome-toast-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(145deg, #84cc16, #65a30d);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(132, 204, 22, 0.35);
}

.welcome-toast-title {
    color: #ecfccb;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.welcome-toast-message {
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.25;
}

.welcome-toast-message #welcomeToastUser {
    color: #facc15;
    font-weight: 800;
}

.welcome-toast-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(236, 252, 203, 0.92);
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.welcome-toast-close:hover,
.welcome-toast-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.04);
}

.welcome-toast.showing,
.welcome-toast.show {
    animation: toastSlideIn 0.34s ease-out;
}

.action-toast-success .welcome-toast-icon {
    background: linear-gradient(145deg, #84cc16, #65a30d);
    box-shadow: 0 6px 16px rgba(132, 204, 22, 0.35);
}

.action-toast-success .welcome-toast-title {
    color: #dcfce7;
}

.action-toast-danger {
    background: rgba(127, 29, 29, 0.92);
    border-color: rgba(252, 165, 165, 0.52) !important;
    box-shadow: 0 14px 34px rgba(127, 29, 29, 0.34);
}

.action-toast-danger .welcome-toast-icon {
    background: linear-gradient(145deg, #f87171, #dc2626);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.action-toast-danger .welcome-toast-title {
    color: #fee2e2;
}

.action-toast-danger .welcome-toast-message {
    color: #fff1f2;
}

.action-toast-danger .welcome-toast-close {
    color: rgba(255, 228, 230, 0.92);
    background: rgba(255, 255, 255, 0.1);
}

.action-toast-danger .welcome-toast-close:hover,
.action-toast-danger .welcome-toast-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
}

.swal2-popup.store-swal-popup {
    border-radius: 16px;
    border: 1px solid #d9f99d;
    padding: 1.35rem 1.2rem 1.15rem;
    box-shadow: 0 18px 40px rgba(20, 83, 45, 0.18);
}

.swal2-title.store-swal-title {
    color: #14532d;
    font-size: 1.2rem;
    font-weight: 800;
}

.swal2-html-container.store-swal-text {
    color: #475569;
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.swal2-confirm.store-swal-confirm {
    border-radius: 10px !important;
    font-weight: 700 !important;
    min-height: 42px;
    line-height: 1;
    padding: 0.58rem 1.2rem !important;
}

.swal2-cancel.store-swal-cancel {
    border-radius: 10px !important;
    font-weight: 700 !important;
    min-height: 42px;
    line-height: 1;
    padding: 0.58rem 1.2rem !important;
}

.permission-pill-item {
    position: relative;
}

.permission-pill-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permission-pill-label {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.62rem 0.75rem;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.permission-pill-check:checked + .permission-pill-label {
    border-color: #84cc16;
    background: #ecfccb;
    color: #14532d;
    box-shadow: 0 6px 16px rgba(132, 204, 22, 0.22);
}

.permission-pill-check:focus-visible + .permission-pill-label {
    outline: 0;
    box-shadow: 0 0 0 0.22rem rgba(132, 204, 22, 0.24);
}

.permission-pill-label.permission-pill-animate {
    animation: permissionPillPop 0.18s ease;
}

.app-upload-progress {
    border: 1px solid #d9f99d;
    border-radius: 12px;
    background: rgba(247, 254, 231, 0.78);
    padding: 0.85rem 0.9rem;
}

.app-upload-progress-track {
    height: 14px;
    background: #dcfce7;
    border-radius: 999px;
    overflow: hidden;
}

.app-upload-progress-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

@keyframes permissionPillPop {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.download-modal {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d9f99d;
    border-radius: 16px;
}

.download-modal-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.download-status-row {
    color: #14532d;
}

.download-progress-wrap {
    height: 20px;
    background: #e0f2fe;
    border-radius: 999px;
    overflow: hidden;
}

.download-progress-wrap .progress-bar {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.download-meta-card {
    border: 1px solid #d9f99d;
    border-radius: 10px;
    background: #f7fee7;
    padding: 0.45rem 0.5rem;
    min-height: 60px;
}

.store-card,
.store-panel-soft {
    background: rgba(255, 253, 240, 0.96);
    border: 1px solid #d9f99d;
    border-radius: 1rem;
}

.auth-shell {
    isolation: isolate;
}

.auth-shell-full {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.auth-content-wrap {
    position: relative;
    z-index: 3;
}

.auth-wave {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    min-width: 100vw;
    pointer-events: none;
    z-index: -2;
}

.auth-wave-back {
    bottom: -18px;
    opacity: 0.9;
}

.auth-wave-front {
    bottom: -48px;
    opacity: 0.95;
}

.auth-wave-track {
    display: block;
    width: 220%;
    height: 190px;
    animation: waveDrift 18s linear infinite;
    will-change: transform;
}

.auth-wave-front .auth-wave-track {
    animation-duration: 24s;
    animation-direction: reverse;
}

.login-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 22px 55px rgba(20, 83, 45, 0.16) !important;
    animation: cardEnter 0.65s ease-out both;
}

.login-card::before {
    content: "";
    position: absolute;
    top: -36%;
    right: -18%;
    width: 230px;
    height: 230px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(250, 204, 21, 0.28), rgba(132, 204, 22, 0.08) 55%, transparent 70%);
    pointer-events: none;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    z-index: -1;
    filter: blur(0.2px);
    animation: floatOrb 6s ease-in-out infinite;
}

.auth-orb-left {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: 6%;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.34) 0%, rgba(132, 204, 22, 0) 68%);
}

.auth-orb-right {
    width: 280px;
    height: 280px;
    right: -80px;
    top: 8%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.4) 0%, rgba(250, 204, 21, 0) 68%);
    animation-delay: 1.2s;
}

.auth-logo {
    height: 56px;
    width: auto;
    animation: logoPulse 4s ease-in-out infinite;
}

.auth-kicker {
    letter-spacing: 0.09em;
}

.store-panel-soft {
    padding: 1.25rem;
    box-shadow: 0 6px 20px rgba(20, 83, 45, 0.06);
}

.login-btn-primary {
    background: #16a34a;
    color: #ffffff;
    border: 2px solid #15803d;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 15px rgba(22, 163, 74, 0.3),
        0 0 24px rgba(21, 128, 61, 0.18) inset;
    position: relative;
}

.login-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-btn-primary:hover,
.login-btn-primary:focus {
    background: #15803d;
    color: #ffffff;
    border-color: #166534;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 28px rgba(22, 163, 74, 0.42),
        0 0 40px rgba(21, 128, 61, 0.28) inset,
        0 0 48px rgba(22, 163, 74, 0.2);
}

.login-btn-primary:hover::before {
    opacity: 1;
}

.login-btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 15px rgba(132, 204, 22, 0.3),
        0 0 30px rgba(132, 204, 22, 0.15) inset;
}

.login-btn-primary:disabled {
    background: linear-gradient(135deg, #cbd5e1 0%, #e2e8f0 100%);
    color: #94a3b8;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: none;
}

.login-icon {
    animation: slideInRight 0.5s ease-out both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translate3d(14px, -10px, 0) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.store-btn-primary {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    border: 1px solid #15803d;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.store-btn-primary:hover,
.store-btn-primary:focus {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border-color: #166534;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.25);
}

.btn-admin-gradient {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    color: #ffffff;
    border: 1px solid #059669;
    font-weight: 700;
}

.btn-admin-gradient:hover,
.btn-admin-gradient:focus {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #047857;
}

.btn-download-gradient {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    color: #ffffff;
    border: 1px solid #2563eb;
    font-weight: 700;
}

.btn-download-gradient:hover,
.btn-download-gradient:focus {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-color: #1d4ed8;
}

.btn-logout-gradient {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
    color: #ffffff;
    border: 1px solid #dc2626;
    font-weight: 700;
}

.btn-logout-gradient:hover,
.btn-logout-gradient:focus {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border-color: #b91c1c;
}

.store-btn-soft {
    background: #d9f99d;
    border: 1px solid #bef264;
    color: var(--store-green-dark);
    font-weight: 700;
}

.store-btn-soft:hover,
.store-btn-soft:focus {
    background: #bef264;
    color: var(--store-green-dark);
}

.store-input {
    border-color: #bef264;
    background-color: #f7fee7;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.store-input:focus {
    border-color: #84cc16;
    box-shadow: 0 0 0 0.25rem rgba(132, 204, 22, 0.25);
    background-color: #ffffff;
    transform: translateY(-1px);
}

.input-icon-wrapper {
    width: 100%;
}

.input-icon-wrapper .store-input {
    width: 100%;
}

.store-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 0.9rem;
    border: 1px solid #d9f99d;
    padding: 0.25rem;
    background: #f7fee7;
    object-fit: contain;
}

.apk-card {
    border-top: 3px solid rgba(22, 163, 74, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(20, 83, 45, 0.12) !important;
}

.apk-title {
    line-height: 1.2;
    word-break: break-word;
}

.apk-meta {
    line-height: 1.35;
}

.container-app .app-item {
    border: 1px solid #d9f99d;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
    background: #f7fee7;
}

.table thead th {
    background-color: var(--store-lime-soft);
    color: var(--store-green-dark);
    border-bottom: 1px solid #bef264;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #bef264;
    background: #f7fee7;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .paginate_button.current {
    background: var(--store-lime) !important;
    border-color: var(--store-lime) !important;
    color: #1f2937 !important;
}

.form-group-animated {
    animation: fieldEnter 0.5s ease-out both;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--store-green);
    opacity: 0.8;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-icon-wrapper .store-input {
    padding-left: 42px;
}

.input-icon-wrapper.has-password-toggle .store-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #4d7c0f;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    background: rgba(132, 204, 22, 0.15);
    color: #166534;
}

.input-icon-wrapper:focus-within .input-icon {
    opacity: 1;
    transform: translateY(-2px);
}

.login-btn {
    position: relative;
}

.login-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    pointer-events: none;
}

.login-btn:hover::before {
    left: 100%;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    display: none;
}

.login-btn.ripple-active .btn-ripple {
    display: block;
}

@keyframes cardEnter {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fieldEnter {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes logoPulse {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

@keyframes ripple {
    from {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes waveDrift {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes appWaveDrift {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .auth-logo,
    .auth-orb,
    .auth-wave-track,
    .app-wave-track {
        animation: none !important;
    }

    .store-btn-primary,
    .store-input {
        transition: none;
    }
}

@media (max-width: 768px) {
    .input-icon-wrapper .store-input {
        font-size: 16px;
    }

    .welcome-toast {
        min-width: 280px;
    }
}

@media (max-width: 576px) {
    .store-panel-soft {
        padding: 1rem;
    }

    .auth-shell {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .login-card {
        max-width: 100% !important;
    }

    .login-card .card-body {
        padding: 1.5rem !important;
    }

    .auth-logo {
        height: 44px;
    }

    .form-group-animated {
        margin-bottom: 0.9rem !important;
    }

    .form-group-animated:last-of-type {
        margin-bottom: 1.1rem !important;
    }

    .store-input,
    .form-control-lg {
        font-size: 16px !important;
    }

    .input-icon-wrapper .store-input,
    .form-control-lg {
        font-size: 16px !important;
        padding: 0.6rem 0.75rem 0.6rem 2.3rem !important;
    }

    .login-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.95rem;
    }

    .auth-orb-left,
    .auth-orb-right {
        width: 200px;
        height: 200px;
    }

    .auth-orb-left {
        left: -100px;
    }

    .auth-orb-right {
        right: -100px;
    }

    .auth-wave-track {
        width: 250%;
        height: 120px;
    }

    .app-wave-track {
        width: 250%;
        height: 110px;
    }
}
