
/* =========================================================
   FREDELIN AI VÍDEO
   DASHBOARD.CSS
   Dashboard completo
   Responsivo: Desktop / Tablet / Celular
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f5f7fb;
    color: #1f2937;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    width: 100%;
    min-height: 100vh;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 270px;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #17142f 0%,
            #211b46 100%
        );

    color: #ffffff;

    z-index: 1000;

    overflow-y: auto;
    overflow-x: hidden;

    box-shadow:
        8px 0 30px rgba(15, 23, 42, 0.10);
}


/* =========================================
   LOGO FREDELIN AI VÍDEO
   ========================================= */

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px 24px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.logo-text strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.logo-text span {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, 0.68);
}

@media (max-width: 768px) {
    .sidebar-logo {
        padding-bottom: 20px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .logo-text strong {
        font-size: 17px;
    }
}



/* =========================================================
   USUÁRIO
========================================================= */

.user-box {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 18px 15px;

    padding: 13px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.06);

    border:
        1px solid rgba(255, 255, 255, 0.06);
}

.avatar {
    width: 43px;
    height: 43px;

    min-width: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #6366f1
        );

    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    box-shadow:
        0 5px 15px rgba(99, 91, 255, 0.25);
}

.user-info {
    min-width: 0;
}

.user-info strong {
    display: block;

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info span {
    display: block;

    margin-top: 3px;

    color: #aaa5c3;

    font-size: 10px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   MENU
========================================================= */

.sidebar-menu {
    flex: 1;

    padding: 5px 12px 20px;
}

.menu-title {
    margin: 19px 10px 8px;

    color: #817b9e;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.menu-link {
    display: flex;
    align-items: center;

    gap: 11px;

    min-height: 44px;

    margin: 3px 0;

    padding: 10px 12px;

    border-radius: 11px;

    color: #bcb8cd;

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.menu-link:hover {
    background:
        rgba(255, 255, 255, 0.07);

    color: #ffffff;

    transform: translateX(2px);
}

.menu-link.active {
    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;

    box-shadow:
        0 7px 20px rgba(99, 91, 255, 0.22);
}

.menu-icon {
    width: 25px;
    min-width: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
}

.menu-badge {
    margin-left: auto;

    padding: 3px 7px;

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.12);

    color: #ffffff;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.5px;
}


/* =========================================================
   SIDEBAR BOTTOM
========================================================= */

.sidebar-bottom {
    padding: 15px;

    border-top:
        1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
    width: 100%;

    min-height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.04);

    color: #c5c1d1;

    font-size: 13px;
    font-weight: 600;

    transition: 0.2s ease;
}

.logout-btn:hover {
    background:
        rgba(239, 68, 68, 0.13);

    border-color:
        rgba(239, 68, 68, 0.25);

    color: #ffffff;
}


/* =========================================================
   OVERLAY MOBILE
========================================================= */

.sidebar-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.58);

    backdrop-filter: blur(2px);

    z-index: 900;
}

.sidebar-overlay.show {
    display: block;
}


/* =========================================================
   CONTEÚDO PRINCIPAL
========================================================= */

.main-content {
    width: calc(100% - 270px);

    margin-left: 270px;

    min-height: 100vh;

    background: #f5f7fb;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: sticky;

    top: 0;

    z-index: 500;

    height: 72px;

    display: flex;
    align-items: center;

    padding: 0 30px;

    background: #ffffff;

    border-bottom:
        1px solid #e8eaf0;
}

.topbar-title {
    color: #171923;

    font-size: 17px;
    font-weight: 750;
}

.topbar-actions {
    margin-left: auto;

    display: flex;
    align-items: center;
}

.notification-btn {
    position: relative;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #e5e7eb;

    border-radius: 11px;

    background: #ffffff;

    font-size: 18px;

    transition: 0.2s ease;
}

.notification-btn:hover {
    background: #f7f7ff;

    transform: translateY(-1px);
}

.notification-dot {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ef4444;

    border:
        2px solid #ffffff;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu-btn {
    display: none;

    width: 42px;
    height: 42px;

    margin-right: 12px;

    align-items: center;
    justify-content: center;

    border:
        1px solid #e5e7eb;

    border-radius: 10px;

    background: #ffffff;

    color: #25283a;

    font-size: 21px;
}


/* =========================================================
   CONTENT
========================================================= */

.content {
    width: 100%;
    max-width: 1450px;

    margin: 0 auto;

    padding: 32px;
}


/* =========================================================
   WELCOME
========================================================= */

.welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    margin-bottom: 28px;

    padding: 30px;

    border:
        1px solid #e9e7f5;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #faf9ff
        );

    box-shadow:
        0 5px 20px rgba(31, 41, 55, 0.04);
}

.welcome h1 {
    color: #171923;

    font-size: 28px;
    line-height: 1.2;

    margin-bottom: 8px;
}

.welcome p {
    color: #6b7280;

    font-size: 14px;
    line-height: 1.6;
}

.welcome-action {
    flex-shrink: 0;
}

.btn-create-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: none;

    padding: 12px 19px;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(99, 91, 255, 0.25);

    transition: 0.2s ease;
}

.btn-create-small:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(99, 91, 255, 0.32);
}


/* =========================================================
   ESTATÍSTICAS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;

    gap: 15px;

    min-width: 0;

    padding: 21px;

    border:
        1px solid #e8eaf0;

    border-radius: 15px;

    background: #ffffff;

    box-shadow:
        0 4px 15px rgba(15, 23, 42, 0.035);

    transition: 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.07);
}

.stat-icon {
    width: 48px;
    height: 48px;

    min-width: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #f3f1ff;

    font-size: 22px;
}

.stat-info {
    min-width: 0;
}

.stat-info span {
    display: block;

    margin-bottom: 5px;

    color: #737784;

    font-size: 12px;
    font-weight: 600;
}

.stat-info strong {
    display: block;

    color: #171923;

    font-size: 23px;
    font-weight: 800;
}


/* =========================================================
   LABELS / TÍTULOS
========================================================= */

.section-label {
    display: block;

    margin-bottom: 7px;

    color: #635bff;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.section-title h2 {
    color: #171923;

    font-size: 21px;
    font-weight: 750;
}

.section-link {
    color: #7c3aed;

    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   CRIAR VÍDEO
========================================================= */

.create-card {
    margin-bottom: 32px;

    padding: 27px;

    border:
        1px solid #e8eaf0;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 5px 20px rgba(15, 23, 42, 0.035);
}

.create-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.create-card-header h2 {
    margin-bottom: 7px;

    color: #171923;

    font-size: 21px;
}

.create-card-header p {
    color: #737784;

    font-size: 13px;
    line-height: 1.6;
}

.create-card-icon {
    width: 50px;
    height: 50px;

    min-width: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #f3f1ff;

    font-size: 23px;
}

.create-area {
    overflow: hidden;

    border:
        1px solid #e1e4ec;

    border-radius: 13px;

    background: #fafbfe;
}

.create-area textarea {
    width: 100%;

    min-height: 130px;

    display: block;

    padding: 17px;

    resize: vertical;

    border: none;
    outline: none;

    background: #fafbfe;

    color: #1f2937;

    font-size: 14px;

    line-height: 1.6;
}

.create-area textarea::placeholder {
    color: #9ca3af;
}

.create-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 12px 14px;

    border-top:
        1px solid #e5e7eb;

    background: #ffffff;
}

#contador {
    color: #8a8f9d;

    font-size: 11px;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: none;

    padding: 11px 18px;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    transition: 0.2s ease;
}

.btn-create:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(99, 91, 255, 0.25);
}


/* =========================================================
   MODELOS
========================================================= */

.models-section {
    margin-bottom: 35px;
}

.models-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}

.model-card {
    min-height: 150px;

    padding: 19px;

    border:
        1px solid #e7e9ef;

    border-radius: 15px;

    background: #ffffff;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.model-card:hover {
    transform: translateY(-3px);

    border-color:
        #c9c4ff;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.07);
}

.model-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 13px;

    border-radius: 11px;

    background: #f3f1ff;

    font-size: 20px;
}

.model-card h3 {
    margin-bottom: 5px;

    color: #202230;

    font-size: 14px;
}

.model-card p {
    color: #7a7f8d;

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   ÚLTIMOS VÍDEOS
========================================================= */

.recent-section {
    margin-bottom: 40px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 280px;

    padding: 35px;

    border:
        1px dashed #d9dce5;

    border-radius: 16px;

    background: #ffffff;

    text-align: center;
}

.empty-icon {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    border-radius: 18px;

    background: #f3f1ff;

    font-size: 30px;
}

.empty-state h3 {
    margin-bottom: 7px;

    color: #252936;

    font-size: 16px;
}

.empty-state p {
    margin-bottom: 18px;

    color: #858995;

    font-size: 13px;
}


/* =========================================================
   NOTIFICAÇÃO
========================================================= */

.app-notification {
    position: fixed;

    top: 85px;
    right: 25px;

    z-index: 5000;

    max-width: 380px;

    padding: 14px 18px;

    border:
        1px solid #dddafc;

    border-radius: 11px;

    background: #ffffff;

    color: #292b39;

    box-shadow:
        0 15px 40px rgba(15, 23, 42, 0.15);

    font-size: 13px;
    font-weight: 600;

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.app-notification.show {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}


/* =========================================================
   PAINÉIS / MODAIS
========================================================= */

.app-panel {
    position: fixed;

    inset: 0;

    z-index: 3000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;
}

.app-panel-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.58);

    backdrop-filter: blur(3px);
}

.app-panel-modal {
    position: relative;

    width: 100%;
    max-width: 850px;

    max-height: calc(100vh - 50px);

    overflow-y: auto;

    padding: 27px;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, 0.25);

    z-index: 1;
}


/* =========================================================
   CABEÇALHO DOS PAINÉIS
========================================================= */

.app-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}

.app-panel-header h2 {
    margin-bottom: 6px;

    color: #171923;

    font-size: 21px;
}

.app-panel-header p {
    color: #737784;

    font-size: 13px;

    line-height: 1.5;
}

.app-close {
    width: 38px;
    height: 38px;

    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #e5e7eb;

    border-radius: 9px;

    background: #ffffff;

    color: #555b68;

    font-size: 16px;

    transition: 0.2s ease;
}

.app-close:hover {
    background: #f5f6fa;

    color: #111827;
}


/* =========================================================
   FORMULÁRIOS DOS PAINÉIS
========================================================= */

.app-grid-2 {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 16px;
}

.app-form-group {
    margin-bottom: 17px;
}

.app-form-group label {
    display: block;

    margin-bottom: 7px;

    color: #343846;

    font-size: 12px;
    font-weight: 700;
}

.app-form-group input,
.app-form-group textarea,
.app-form-group select {
    width: 100%;

    border:
        1px solid #dfe3eb;

    border-radius: 9px;

    background: #ffffff;

    color: #252936;

    outline: none;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.app-form-group input,
.app-form-group select {
    min-height: 44px;

    padding: 10px 12px;
}

.app-form-group textarea {
    min-height: 125px;

    padding: 12px;

    resize: vertical;

    line-height: 1.6;
}

.app-form-group input:focus,
.app-form-group textarea:focus,
.app-form-group select:focus {
    border-color: #635bff;

    box-shadow:
        0 0 0 3px rgba(99, 91, 255, 0.10);
}


/* =========================================================
   AÇÕES
========================================================= */

.app-actions {
    display: flex;
    flex-wrap: wrap;

    align-items: center;

    gap: 10px;

    margin-top: 18px;
}

.app-btn {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 16px;

    border-radius: 9px;

    font-size: 12px;
    font-weight: 700;

    transition: 0.2s ease;
}

.app-btn-primary {
    border: none;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;
}

.app-btn-primary:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(99, 91, 255, 0.24);
}

.app-btn-secondary {
    border:
        1px solid #dfe3eb;

    background: #ffffff;

    color: #414654;
}

.app-btn-secondary:hover {
    background: #f7f8fa;
}

.app-btn-dark {
    border: none;

    background: #252936;

    color: #ffffff;
}

.app-btn-dark:hover {
    background: #171923;
}

.app-btn-danger {
    border:
        1px solid #fecaca;

    background: #fff5f5;

    color: #dc2626;
}

.app-btn-danger:hover {
    background: #fee2e2;
}


/* =========================================================
   LOADING
========================================================= */

.app-loading {
    margin-top: 18px;

    padding: 14px;

    border-radius: 10px;

    background: #f5f3ff;

    color: #635bff;

    font-size: 13px;
    font-weight: 600;

    text-align: center;
}


/* =========================================================
   RESULTADOS
========================================================= */

.app-result {
    margin-top: 22px;

    padding: 18px;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    background: #fafbfe;
}

.app-result h3 {
    margin-bottom: 12px;

    color: #252936;

    font-size: 15px;
}

.app-result textarea {
    width: 100%;

    min-height: 230px;

    padding: 13px;

    resize: vertical;

    border:
        1px solid #dfe3eb;

    border-radius: 9px;

    background: #ffffff;

    color: #343846;

    font-size: 13px;

    line-height: 1.6;

    outline: none;
}


/* =========================================================
   LISTAS
========================================================= */

.app-card-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.app-list-item {
    padding: 17px;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    background: #ffffff;

    transition: 0.2s ease;
}

.app-list-item:hover {
    border-color: #d8d5fa;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.04);
}

.app-list-item h3 {
    margin-bottom: 6px;

    color: #252936;

    font-size: 14px;
}

.app-list-item p {
    margin-bottom: 7px;

    color: #737784;

    font-size: 12px;

    line-height: 1.6;
}

.app-list-item small {
    color: #969ba7;

    font-size: 10px;
}

.app-list-item-footer {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 13px;
}

.app-list-item-footer .app-btn {
    min-height: 36px;

    padding: 8px 12px;
}


/* =========================================================
   ESTADO VAZIO DOS PAINÉIS
========================================================= */

.app-empty {
    padding: 35px 20px;

    border:
        1px dashed #d9dce5;

    border-radius: 13px;

    background: #fafbfe;

    text-align: center;
}

.app-empty-icon {
    margin-bottom: 10px;

    font-size: 34px;
}

.app-empty strong {
    display: block;

    margin-bottom: 5px;

    color: #343846;

    font-size: 14px;
}

.app-empty h3 {
    margin-bottom: 7px;

    color: #343846;

    font-size: 15px;
}

.app-empty p {
    color: #858995;

    font-size: 12px;
}


/* =========================================================
   FREDELIN AI VÍDEO — IMAGENS IA
   ========================================================= */

.imagens-ia-modal {
    width: min(1180px, calc(100vw - 40px));
    max-width: 1180px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
}

/* Área de criação */

.imagens-ia-create {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
}

.imagens-ia-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.imagens-ia-section-title > span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.14);
    font-size: 21px;
}

.imagens-ia-section-title > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.imagens-ia-section-title strong {
    font-size: 17px;
    font-weight: 800;
}

.imagens-ia-section-title small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
}

/* Textarea */

#imagemPrompt {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    box-sizing: border-box;
}

/* Dica */

.imagens-ia-hint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.52);
}

/* Opções */

.imagens-ia-options {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 20px;
    align-items: end;
}

.imagens-ia-format-info {
    min-height: 72px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.imagens-ia-format-info strong {
    font-size: 13px;
    margin-bottom: 3px;
}

.imagens-ia-format-info span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

/* Botão gerar */

.imagens-ia-generate-btn {
    min-width: 220px;
    min-height: 46px;
    font-weight: 800;
}

/* Loading */

#imagemLoading {
    margin-top: 18px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

.imagens-ia-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: imagensIASpin 0.8s linear infinite;
}

@keyframes imagensIASpin {
    to {
        transform: rotate(360deg);
    }
}

/* Resultado */

.imagens-ia-result-section {
    margin-bottom: 28px;
}

.imagens-ia-result {
    min-height: 20px;
}

/* Histórico */

.imagens-ia-history-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.imagens-ia-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.imagens-ia-history-header .imagens-ia-section-title {
    margin-bottom: 0;
}

.imagens-ia-refresh-btn {
    white-space: nowrap;
}

/* Grid */

.imagens-ia-history-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* Card */

.imagens-ia-card {
    min-width: 0;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.imagens-ia-card:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

/* Imagem do card */

.imagens-ia-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.imagens-ia-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: zoom-in;

    transition: transform 0.3s ease;
}

.imagens-ia-card:hover .imagens-ia-card-image img {
    transform: scale(1.035);
}

/* Formato */

.imagens-ia-card-format {
    position: absolute;
    top: 10px;
    right: 10px;

    padding: 5px 9px;
    border-radius: 8px;

    background: rgba(0, 0, 0, 0.68);
    color: #fff;

    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

/* Conteúdo */

.imagens-ia-card-content {
    padding: 14px;
}

.imagens-ia-card-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 7px;
}

.imagens-ia-card-prompt {
    color: #4b5060;
    line-height: 1.5;
    max-height: 4.5em;
    overflow: hidden;
}

/* Ações */

.imagens-ia-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.imagens-ia-card-actions .app-btn {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
}

/* Estado vazio */

.imagens-ia-empty {
    grid-column: 1 / -1;

    min-height: 230px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.02);

    text-align: center;
}

.imagens-ia-empty-icon {
    width: 58px;
    height: 58px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(124, 58, 237, 0.12);

    font-size: 27px;

    margin-bottom: 5px;
}

.imagens-ia-empty strong {
    font-size: 15px;
}

.imagens-ia-empty span {
    color: rgba(255, 255, 255, 0.48);
    font-size: 13px;
}

/* =========================================================
   VISUALIZAÇÃO DA IMAGEM EM TAMANHO GRANDE
   ========================================================= */

.imagem-grande-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;
}

.imagem-grande-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);

    cursor: zoom-out;
}

.imagem-grande-content {
    position: relative;
    z-index: 2;

    max-width: min(1000px, 94vw);
    max-height: 94vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.imagem-grande-content img {
    display: block;

    max-width: 100%;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 14px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);
}

.imagem-grande-close {
    position: absolute;

    top: -14px;
    right: -14px;

    z-index: 3;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(20, 20, 25, 0.92);
    color: #fff;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 1100px) {

    .imagens-ia-history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 850px) {

    .imagens-ia-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 20px;
    }

    .imagens-ia-options {
        grid-template-columns: 1fr;
    }

    .imagens-ia-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .imagens-ia-modal {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        padding: 16px;
        border-radius: 16px;
    }

    .imagens-ia-create {
        padding: 16px;
    }

    .imagens-ia-history-grid {
        grid-template-columns: 1fr;
    }

    .imagens-ia-history-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .imagens-ia-refresh-btn {
        width: 100%;
    }

    .imagens-ia-card-actions {
        grid-template-columns: 1fr 1fr;
    }

    .imagens-ia-section-title > span {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .imagens-ia-section-title strong {
        font-size: 15px;
    }

    .imagens-ia-section-title small {
        font-size: 12px;
    }

    .imagens-ia-generate-btn {
        width: 100%;
    }

    .imagem-grande-modal {
        padding: 12px;
    }

    .imagem-grande-content img {
        max-height: 85vh;
        border-radius: 10px;
    }

    .imagem-grande-close {
        top: -8px;
        right: -8px;
    }

}

/* =========================================================
   PERFIL
========================================================= */

.app-profile-avatar {
    width: 78px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 25px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;

    font-size: 28px;
    font-weight: 800;

    box-shadow:
        0 10px 25px rgba(99, 91, 255, 0.25);
}


/* =========================================================
   PLANOS
========================================================= */

.planos-modal {
    max-width: 1180px;
}

.creditos-atual {
    margin-top: 6px;

    color: #635bff !important;

    font-weight: 600;
}

.planos-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-top: 20px;
}

.plano-card {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 22px 18px;

    border:
        1px solid #e3e5eb;

    border-radius: 15px;

    background: #ffffff;

    transition: 0.2s ease;
}

.plano-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.08);
}

.plano-atual {
    border:
        2px solid #635bff;

    box-shadow:
        0 8px 25px rgba(99, 91, 255, 0.10);
}

.plano-icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 13px;

    border-radius: 11px;

    background: #f3f1ff;

    font-size: 21px;
}

.plano-card h3 {
    margin-bottom: 10px;

    color: #242734;

    font-size: 17px;
}

.plano-preco {
    margin-bottom: 10px;

    color: #171923;

    font-size: 25px;
    font-weight: 800;
}

.plano-preco small {
    color: #858995;

    font-size: 11px;
    font-weight: 500;
}

.plano-descricao {
    min-height: 42px;

    margin-bottom: 15px;

    color: #737784;

    font-size: 11px;

    line-height: 1.5;
}

.plano-creditos,
.plano-videos {
    margin-bottom: 8px;

    color: #4b5060;

    font-size: 11px;
    font-weight: 600;
}

.plano-card ul {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin: 15px 0 20px;
    padding: 0;

    list-style: none;
}

.plano-card li {
    color: #5f6470;

    font-size: 11px;

    line-height: 1.4;
}

.plano-btn {
    width: 100%;

    min-height: 42px;

    margin-top: auto;

    border:
        1px solid #dfe3eb;

    border-radius: 9px;

    background: #ffffff;

    color: #4b5060;

    font-size: 11px;
    font-weight: 800;
}

.plano-btn-primary,
.plano-btn-pro {
    border: none;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #635bff
        );

    color: #ffffff;
}

.plano-btn-atual {
    border:
        1px solid #c9c4ff;

    background: #f5f3ff;

    color: #635bff;
}

.plano-popular {
    position: absolute;

    top: -10px;
    right: 15px;

    padding: 4px 8px;

    border-radius: 6px;

    background: #635bff;

    color: #ffffff;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.5px;
}

.plano-pro {
    border-color: #c9c4ff;
}

.planos-info {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;

    gap: 18px;

    margin-top: 25px;
    padding-top: 18px;

    border-top:
        1px solid #e5e7eb;

    color: #737784;

    font-size: 10px;

    text-align: center;
}

.planos-info a {
    color: #635bff;

    font-weight: 600;
}


/* =========================================================
   SCROLLBARS
========================================================= */

.sidebar::-webkit-scrollbar,
.app-panel-modal::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track,
.app-panel-modal::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background:
        rgba(255, 255, 255, 0.14);

    border-radius: 20px;
}

.app-panel-modal::-webkit-scrollbar-thumb {
    background: #d5d8e0;

    border-radius: 20px;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    width: calc(100% - 270px);

    margin-left: 270px;

    padding: 25px 30px 30px;

    border-top:
        1px solid #e5e7eb;

    background: #ffffff;

    text-align: center;
}

.footer-links {
    margin-bottom: 8px;
}

.footer-links a {
    color: #635bff;

    font-size: 11px;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.site-footer p {
    color: #9ca3af;

    font-size: 10px;
}


/* =========================================================
   ACESSIBILIDADE
========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline:
        3px solid rgba(99, 91, 255, 0.25);

    outline-offset: 2px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {

    .sidebar {
        width: 245px;
    }

    .main-content {
        width: calc(100% - 245px);

        margin-left: 245px;
    }

    .site-footer {
        width: calc(100% - 245px);

        margin-left: 245px;
    }

    .models-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .planos-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   TABLET PEQUENO
========================================================= */

@media (max-width: 900px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .models-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .content {
        padding: 24px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .sidebar {
        width: 280px;

        transform:
            translateX(-100%);

        transition:
            transform 0.25s ease;
    }

    .sidebar.open {
        transform:
            translateX(0);
    }

    .main-content {
        width: 100%;

        margin-left: 0;
    }

    .site-footer {
        width: 100%;

        margin-left: 0;

        padding:
            22px 15px 28px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .topbar {
        height: 64px;

        padding: 0 16px;
    }

    .topbar-title {
        font-size: 15px;
    }

    .content {
        padding: 18px 15px 30px;
    }

    .welcome {
        flex-direction: column;

        align-items: flex-start;

        padding: 23px;

        margin-bottom: 20px;
    }

    .welcome h1 {
        font-size: 23px;
    }

    .welcome-action {
        width: 100%;
    }

    .btn-create-small {
        width: 100%;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 16px;

        gap: 11px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;

        min-width: 40px;

        font-size: 18px;
    }

    .stat-info span {
        font-size: 10px;
    }

    .stat-info strong {
        font-size: 19px;
    }

    .create-card {
        padding: 20px;

        border-radius: 15px;
    }

    .create-card-header h2 {
        font-size: 19px;
    }

    .models-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .model-card {
        min-height: 140px;

        padding: 16px;
    }

    .app-panel {
        padding: 12px;
    }

    .app-panel-modal {
        max-height: calc(100vh - 24px);

        padding: 20px;

        border-radius: 15px;
    }

    .app-grid-2 {
        grid-template-columns: 1fr;
    }

    .planos-grid {
        grid-template-columns: 1fr;
    }

    .planos-info {
        flex-direction: column;

        gap: 8px;
    }
}


/* =========================================================
   CELULAR PEQUENO
========================================================= */

@media (max-width: 480px) {

    .topbar {
        padding: 0 12px;
    }

    .mobile-menu-btn {
        width: 38px;
        height: 38px;

        font-size: 19px;
    }

    .notification-btn {
        width: 38px;
        height: 38px;
    }

    .content {
        padding:
            14px 12px 25px;
    }

    .welcome {
        padding: 19px;

        border-radius: 14px;
    }

    .welcome h1 {
        font-size: 21px;
    }

    .welcome p {
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 70px;
    }

    .create-card {
        padding: 16px;
    }

    .create-card-header {
        gap: 10px;
    }

    .create-card-icon {
        width: 43px;
        height: 43px;

        min-width: 43px;
    }

    .create-area textarea {
        min-height: 120px;

        font-size: 13px;
    }

    .create-footer {
        align-items: stretch;

        flex-direction: column;
    }

    .btn-create {
        width: 100%;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .section-title h2 {
        font-size: 19px;
    }

    .app-panel-header h2 {
        font-size: 18px;
    }

    .app-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .app-actions .app-btn {
        width: 100%;
    }

    .app-list-item-footer {
        flex-direction: column;
    }

    .app-list-item-footer .app-btn {
        width: 100%;
    }

    .app-notification {
        top: 75px;
        left: 12px;
        right: 12px;

        max-width: none;
    }
}


/* =========================================================
   ANIMAÇÃO
========================================================= */

@keyframes dashboardFadeIn {

    from {
        opacity: 0;

        transform:
            translateY(5px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}

.content {
    animation:
        dashboardFadeIn 0.35s ease;
}


/* =========================================================
   UTILITÁRIOS
========================================================= */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #737784;
}

