/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { -webkit-text-size-adjust: 100%; }

:root {
    --rosa: #db2777;
    --rosa-claro: #fbcfe8;
    --rosa-fundo: #fdf2f8;
    --rosa-medio: #f472b6;
    --rosa-escuro: #be185d;
    --texto: #1f2937;
    --texto-claro: #6b7280;
    --texto-mais-claro: #9ca3af;
    --branco: #fff;
    --cinza-claro: #f3f4f6;
    --cinza-borda: #e5e7eb;
    --verde: #10b981;
    --vermelho: #ef4444;
    --azul: #3b82f6;
    --sombra-sm: 0 2px 6px rgba(219, 39, 119, 0.08);
    --sombra: 0 4px 14px rgba(219, 39, 119, 0.1);
    --sombra-lg: 0 12px 30px rgba(219, 39, 119, 0.15);
}

body {
    font-family: 'Poppins', -apple-system, system-ui, sans-serif;
    background: linear-gradient(180deg, var(--rosa-fundo) 0%, #fff5f9 100%);
    color: var(--texto);
    min-height: 100vh;
    line-height: 1.5;
    padding-bottom: 80px;
}

/* === TOPBAR === */
.topbar {
    background: linear-gradient(135deg, var(--rosa) 0%, var(--rosa-escuro) 100%);
    color: white;
    padding: 22px 16px;
    box-shadow: 0 4px 14px rgba(219, 39, 119, 0.25);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.brand-icon {
    font-size: 32px;
    line-height: 1;
}
.brand h1 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.brand h1 .cursive {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 20px;
    margin-right: 4px;
    opacity: 0.95;
}
.brand p {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}
.stats { display: flex; gap: 8px; }
.stat {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 8px 14px;
    border-radius: 12px;
    text-align: center;
    line-height: 1.1;
}
.stat strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
}
.stat span {
    font-size: 10px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === LAYOUT === */
.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* === CARD === */
.card {
    background: var(--branco);
    border-radius: 18px;
    box-shadow: var(--sombra);
    overflow: hidden;
}
.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--cinza-borda);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--texto);
}
.badge {
    background: var(--rosa-claro);
    color: var(--rosa-escuro);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* === FORM === */
.form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--texto-claro);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.field input[type="text"] {
    padding: 14px 16px;
    border: 2px solid var(--cinza-borda);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: var(--branco);
    color: var(--texto);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field input[type="text"]:focus {
    outline: none;
    border-color: var(--rosa);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
}

/* File drop */
.file-drop {
    position: relative;
    border: 2px dashed var(--rosa-claro);
    border-radius: 12px;
    background: var(--rosa-fundo);
    transition: all 0.2s;
}
.file-drop:hover, .file-drop.has-file {
    border-color: var(--rosa);
    background: #fff;
}
.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-drop-content {
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
.file-icon { font-size: 36px; line-height: 1; }
.file-text {
    font-weight: 600;
    color: var(--texto);
    font-size: 15px;
    word-break: break-all;
}
.file-drop small { color: var(--texto-mais-claro); font-size: 12px; }

/* Progress */
.progress {
    height: 8px;
    background: var(--cinza-claro);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rosa-medio), var(--rosa));
    transition: width 0.2s;
}

/* === BOTÕES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
    min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--rosa) 0%, var(--rosa-escuro) 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(219, 39, 119, 0.3);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(219, 39, 119, 0.4); }
.btn-pdf {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    margin: 16px 20px 8px;
    width: calc(100% - 40px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}
.btn-block { width: 100%; }

/* === BUSCA === */
.search { padding: 12px 20px 8px; }
.search input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--cinza-borda);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: var(--cinza-claro);
}
.search input:focus {
    outline: none;
    border-color: var(--rosa);
    background: white;
}

/* === LISTA === */
.videos {
    padding: 8px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.video {
    background: var(--branco);
    border: 1.5px solid var(--cinza-borda);
    border-radius: 14px;
    padding: 14px;
    transition: all 0.2s;
}
.video:hover {
    border-color: var(--rosa-claro);
    box-shadow: var(--sombra-sm);
}

.video-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--cinza-borda);
}
.video-info { min-width: 0; flex: 1; }
.video-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--texto);
    margin-bottom: 2px;
    word-break: break-word;
}
.video-info p {
    font-size: 13px;
    color: var(--texto-claro);
    margin-bottom: 6px;
}
.video-info p strong { color: var(--rosa); font-weight: 600; }
.date {
    font-size: 11px;
    color: var(--texto-mais-claro);
    font-weight: 500;
}

.status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.status-ativo { background: #d1fae5; color: #065f46; }
.status-inativo { background: #fee2e2; color: #991b1b; }

/* === AÇÕES === */
.video-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    min-height: 44px;
    background: var(--cinza-claro);
    color: var(--texto);
}
.action:active { transform: scale(0.96); }
.action span { font-size: 14px; line-height: 1; }
.action-view { background: #dbeafe; color: #1e40af; }
.action-copy { background: #fef3c7; color: #92400e; }
.action-card { background: #d1fae5; color: #065f46; }
.action-delete { background: #fee2e2; color: #991b1b; }

/* === EMPTY === */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--texto-claro);
}
.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}
.empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 4px;
}
.empty small { color: var(--texto-mais-claro); }
.hidden { display: none !important; }

/* === FAB === */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rosa) 0%, var(--rosa-escuro) 100%);
    color: white;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(219, 39, 119, 0.4);
    z-index: 40;
    transition: transform 0.2s;
}
.fab:active { transform: scale(0.92); }

/* === NOTIFICAÇÃO === */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--sombra-lg);
    z-index: 100;
    display: none;
    max-width: 90vw;
}
.notification.show {
    display: block;
    animation: slideDown 0.3s ease;
}
.notification.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.notification.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* === DESKTOP === */
@media (min-width: 900px) {
    .content {
        grid-template-columns: 380px 1fr;
        align-items: start;
        padding: 24px;
        gap: 24px;
    }
    .upload-card {
        position: sticky;
        top: 92px;
    }
    .videos {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
        gap: 14px;
    }
    .fab { display: none; }
    .brand h1 { font-size: 26px; }
    .brand h1 .cursive { font-size: 24px; }
    .stat strong { font-size: 26px; }
}

/* === IPHONE NOTCH === */
@supports (padding: max(0px)) {
    .topbar { padding-top: max(22px, env(safe-area-inset-top) + 8px); }
    .fab { bottom: max(20px, env(safe-area-inset-bottom) + 12px); }
}
