@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-base: #1a1515;
    /* Fundo mais fosco e escuro avermelhado */
    --bg-surface: #241c1c;
    /* Superfície de cards fosca */
    --bg-surface-hover: #332727;

    --primary: rgb(255, 0, 0);
    /* RGB puro */
    --primary-hover: rgb(220, 20, 20);
    --primary-gradient: linear-gradient(45deg, rgb(255, 0, 0), rgb(255, 60, 0), rgb(220, 20, 60), rgb(255, 0, 0));
    --primary-light: rgba(255, 0, 0, 0.15);

    --accent: rgb(255, 60, 0);

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --text-main: #ffffff;
    /* Textos brancos */
    --text-muted: #d1d5db;

    --border: rgba(255, 255, 255, 0.08);
    /* Bordas mais suaves */
    --ring: rgba(225, 29, 72, 0.5);

    /* Max Radius: 5px */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 5px;
    --radius-xl: 5px;
    --radius-full: 5px;
    /* Tudo quadrado para respeitar o limite de 5px máximo */

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-main);
    text-shadow: 0 0 5px rgba(244, 63, 94, 0.5);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

p.text-muted {
    display: none !important;
}


.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    /* Tamanho reduzido voltando ao padrão sleek */
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--ring);
}

.btn:active {
    transform: scale(0.95);
}

@keyframes rgb-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-primary {
    background: var(--primary-gradient);
    background-size: 300% 300%;
    color: #ffffff;
    border: none;
    height: 45px;
    animation: rgb-shift 3s ease infinite;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.6);
    filter: brightness(1.2);
}

.btn-surface {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-surface:hover {
    background-color: #3f3131;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-icon-only {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-icon-only svg {
    transition: var(--transition);
}

.btn-icon-only:hover svg {
    transform: scale(1.15) rotate(5deg);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    /* Inputs de tamanho normal e slim */
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.4);
    /* Fundo sempre visível */
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Sombra interna para profundidade */
}

.form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.6);
}

.form-control::placeholder {
    color: #888;
}

/* Cards & Layout */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    z-index: 0;
    border-radius: var(--radius-md);
}

.auth-container {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 10;
    background: var(--bg-surface);
    /* Removido o filtro blur agressivo para deixar mais fosco e sólido */
    border: 1px solid rgba(225, 29, 72, 0.3);
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.05);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Material line inputs specifically for Auth */
.auth-container .form-control {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
}

.auth-container .form-control:focus {
    border-bottom-color: var(--primary) !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.auth-container .form-label {
    color: rgba(255, 255, 255, 0.5);
}

body {
    overflow-x: hidden;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 250px;
    height: 100vh;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 50;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    gap: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-gradient);
    background-size: 300% 300%;
    animation: rgb-shift 3s ease infinite;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    transform: translateX(6px);
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 1.25rem 1rem;
    margin-top: auto;
}

.license-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    transition: var(--transition);
}

.license-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.u-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.9;
}

.card-logout {
    color: var(--text-muted);
    transition: var(--transition);
    opacity: 0.5;
}

.card-logout:hover {
    color: var(--danger);
    opacity: 1;
}

.license-info-minimal {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
}

.l-key-icon {
    color: #ef4444;
    /* Vermelho solicitado */
    display: flex;
    align-items: center;
}

.l-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    max-width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.table-responsive::-webkit-scrollbar {
    display: none !important;
    /* Chrome/Safari */
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Garante que a tabela tenha uma largura mínima útil sem quebrar o layout */
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background-color: rgba(0, 0, 0, 0.2);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr {
    transition: var(--transition);
}

.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

.table tr:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-sm);
}

.app-logo-sm {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background-color: var(--bg-base);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 8, 8, 0.8);
    backdrop-filter: none;
    /* Mantendo visual fosco sem glass forte */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 32rem;
    border: 1px solid rgba(225, 29, 72, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-xl {
    max-width: 900px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

/* Custom Confirm Modal specific styles */
.empty-state-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.empty-state-card:hover {
    border-color: var(--primary);
    background: rgba(255, 0, 0, 0.03);
    transform: translateY(-2px);
}

.empty-state-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

.empty-state-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #fff;
}

.empty-state-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .empty-state-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .empty-state-info {
        flex-direction: column;
    }

    .empty-state-card .btn {
        width: 100%;
    }
}

.confirm-card {
    max-width: 400px;
    padding: 1.5rem;
    text-align: center;
}

.confirm-card h3 {
    margin-bottom: 0.75rem;
}

.confirm-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Play Store Like Page */
.store-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid rgba(225, 29, 72, 0.2);
}

.store-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.app-details-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.app-large-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    /* Override radius */
    object-fit: cover;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-base);
    border: 1px solid var(--border);
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.app-publisher {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.app-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rating-stars {
    color: var(--warning);
    display: flex;
    gap: 2px;
}

.rating-stars svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.install-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Pricing Cards */
.pricing-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.03);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(255, 0, 0, 0.03) 0%, transparent 100%);
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.1);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
    white-space: nowrap;
}

.pricing-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.pricing-card:hover .pricing-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

.pricing-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.pricing-price {
    font-size: 2.25rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 8px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    flex-grow: 1;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li svg {
    color: var(--success);
    flex-shrink: 0;
}

.pricing-cta {
    width: 100%;
}

@media (max-width: 768px) {
    .pricing-wrapper {
        padding: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }
}