/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   DocVoz Pro â TuAdministrativo Edition v26
   Brand: tuadministrativo.com | Light Cream Â· Bordeaux Â· Editorial
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,700;1,800;1,900&family=Inter:wght@300;400;500;600&display=swap');

/* ââ Design Tokens âââââââââââââââââââââââââââââââââââââââââââââââ */
:root {
    --brand:          #7A1521;
    --brand-hover:    #9B1C2B;
    --brand-light:    rgba(122, 21, 33, 0.08);
    --brand-border:   rgba(122, 21, 33, 0.2);
    --brand-glow:     rgba(122, 21, 33, 0.18);

    --bg:             #F5EFE6;
    --bg-2:           #EDE6DC;
    --surface:        #FFFFFF;
    --surface-2:      #FAF7F3;

    --text:           #111111;
    --text-secondary: #4A4A4A;
    --text-muted:     #888888;
    --text-dim:       #BBBBBB;

    --border:         rgba(0, 0, 0, 0.10);
    --border-dark:    rgba(0, 0, 0, 0.18);

    --success:        #1A7A45;
    --success-bg:     rgba(26, 122, 69, 0.08);
    --success-border: rgba(26, 122, 69, 0.25);
    --error:          #C0392B;

    --radius-sm:      8px;
    --radius-md:      14px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --radius-pill:    999px;

    --shadow-sm:      0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.06);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.12), 0 20px 60px rgba(0,0,0,0.08);
    --shadow-brand:   0 4px 20px rgba(122, 21, 33, 0.22);

    --transition:     all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ââ Reset & Base ââââââââââââââââââââââââââââââââââââââââââââââââ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    padding: 24px 16px 60px;
    overflow-x: hidden;
}

/* ââ Wrapper âââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-wrapper {
    width: 100%;
    max-width: 580px;
    animation: fadeSlideIn 0.5s ease-out both;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ââ Header ââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-header {
    text-align: center;
    padding: 32px 0 28px;
}

.dvp-logo-wrap {
    display: inline-block;
    margin-bottom: 24px;
}

.dvp-logo-wrap img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.dvp-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dvp-eyebrow::before,
.dvp-eyebrow::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--brand);
    opacity: 0.5;
}

.dvp-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 8px;
}

.dvp-title em {
    font-style: italic;
    color: var(--brand);
}

.dvp-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 360px;
    margin: 0 auto;
}

/* ââ Badge âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-top: 14px;
}

.dvp-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 50%;
    animation: pulse-brand 2s ease-in-out infinite;
}

@keyframes pulse-brand {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.65); }
}

/* ââ Card ââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* ââ Tab Bar âââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-tabs {
    display: flex;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 5px;
    margin-bottom: 28px;
    gap: 4px;
}

.dvp-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 8px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.dvp-tab:hover { color: var(--text); background: rgba(0,0,0,0.04); }

.dvp-tab.active {
    background: var(--brand);
    color: white;
    box-shadow: var(--shadow-brand);
}

.dvp-tab .tab-icon { font-size: 1rem; }

/* ââ Upload Zone âââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-drop-zone {
    position: relative;
    border: 2px dashed var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface-2);
    overflow: hidden;
    margin-bottom: 24px;
}

.dvp-drop-zone:hover,
.dvp-drop-zone.dragover {
    border-color: var(--brand);
    border-style: solid;
    background: var(--brand-light);
}

.dvp-drop-zone.has-file {
    border-color: var(--success);
    border-style: solid;
    background: var(--success-bg);
}

.drop-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 12px;
    transition: var(--transition);
}

.dvp-drop-zone:hover .drop-icon { transform: scale(1.08) translateY(-2px); }

.drop-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    transition: var(--transition);
}

.drop-label strong {
    color: var(--text);
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.drop-label.success-label { color: var(--success); font-weight: 600; }

.drop-types {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.drop-type-badge {
    background: rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ââ Section Label âââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dvp-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--brand-border);
}

/* ââ Voice Grid ââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-voice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 26px;
}

.dvp-voice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dvp-voice-card:hover {
    border-color: var(--brand-border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.dvp-voice-card.selected {
    border-color: var(--brand);
    background: var(--brand-light);
    box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm);
}

.voice-avatar {
    font-size: 1.8rem;
    display: block;
}

.voice-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.voice-lang {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    padding: 2px 8px;
}

.dvp-voice-card.selected .voice-name { color: var(--brand); }
.dvp-voice-card.selected .voice-lang {
    background: var(--brand-light);
    color: var(--brand);
}

/* ââ Lang Cards (for AudioâText) âââââââââââââââââââââââââââââââââ */
.dvp-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 26px;
}

.dvp-lang-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.dvp-lang-card:hover {
    border-color: var(--brand-border);
    background: var(--surface);
}

.dvp-lang-card.selected {
    border-color: var(--brand);
    background: var(--brand-light);
    box-shadow: 0 0 0 1px var(--brand);
}

.lang-flag { font-size: 1.4rem; }
.lang-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}
.dvp-lang-card.selected .lang-text { color: var(--brand); }

/* ââ Main Button âââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-btn {
    width: 100%;
    padding: 17px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-brand);
}

.dvp-btn:hover:not(:disabled) {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(122, 21, 33, 0.32);
}

.dvp-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-brand);
}

.dvp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ââ Subtext âââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-subtext {
    text-align: center;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    min-height: 1.2em;
    transition: var(--transition);
}

/* ââ Processing State ââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-processing {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 10px;
    gap: 16px;
}

.dvp-processing.visible { display: flex; }

.dvp-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
}

.wv-bar {
    width: 4px;
    background: var(--brand);
    border-radius: var(--radius-pill);
    animation: waveAnim 1.2s ease-in-out infinite;
    opacity: 0.8;
}

.wv-bar:nth-child(1) { height: 14px; animation-delay: 0s;    }
.wv-bar:nth-child(2) { height: 28px; animation-delay: 0.1s;  }
.wv-bar:nth-child(3) { height: 40px; animation-delay: 0.2s;  }
.wv-bar:nth-child(4) { height: 32px; animation-delay: 0.3s;  }
.wv-bar:nth-child(5) { height: 20px; animation-delay: 0.4s;  }
.wv-bar:nth-child(6) { height: 36px; animation-delay: 0.15s; }
.wv-bar:nth-child(7) { height: 26px; animation-delay: 0.25s; }
.wv-bar:nth-child(8) { height: 16px; animation-delay: 0.35s; }

@keyframes waveAnim {
    0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
    50%       { transform: scaleY(1);   opacity: 1;   }
}

.dvp-processing-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* ââ Steps âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.dvp-step {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: var(--transition);
}

.dvp-step.active { color: var(--brand); font-weight: 600; }
.dvp-step.done   { color: var(--success); }

.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.dvp-step.active .step-dot { animation: pulse-step 1s ease-in-out infinite; }

@keyframes pulse-step {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.5); }
}

.step-divider { color: var(--text-dim); }

/* ââ Result Area âââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-result {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    animation: fadeSlideIn 0.4s ease-out both;
}

.dvp-result-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--success);
    margin-bottom: 20px;
}

.dvp-result-title::before {
    content: 'â';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--success);
    flex-shrink: 0;
}

/* ââ Audio Player ââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-player-wrap {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    margin-bottom: 16px;
}

.dvp-player-wrap audio {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-sm);
    outline: none;
}

/* ââ Download Buttons ââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.dvp-dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 10px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    text-align: center;
}

.dvp-dl-btn:hover {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.dvp-dl-btn .dl-icon { font-size: 1.4rem; }
.dvp-dl-btn .dl-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.dvp-dl-btn:hover .dl-label { color: var(--brand); }

/* ââ Transcript Preview ââââââââââââââââââââââââââââââââââââââââââ */
.dvp-transcript-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
    scrollbar-width: thin;
    scrollbar-color: var(--brand) transparent;
    white-space: pre-wrap;
    word-break: break-word;
}

.dvp-transcript-box::-webkit-scrollbar { width: 4px; }
.dvp-transcript-box::-webkit-scrollbar-track { background: transparent; }
.dvp-transcript-box::-webkit-scrollbar-thumb { background: var(--brand); border-radius: var(--radius-pill); }

.dvp-copy-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
}

.dvp-copy-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-light);
}

.dvp-copy-btn.copied {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
}

/* ââ Privacy Notice ââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.dvp-privacy .priv-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.dvp-privacy strong { color: var(--text-secondary); }

/* ââ Footer ââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dvp-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.dvp-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
}

.dvp-footer-links a:hover { color: var(--brand); }

.dvp-copyright {
    font-size: 0.68rem;
    color: var(--text-dim);
}

/* ââ Toast System ââââââââââââââââââââââââââââââââââââââââââââââââ */
#dvp-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.dvp-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text);
    min-width: 240px;
    max-width: 340px;
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: var(--transition-slow);
}

.dvp-toast.removing { animation: toastOut 0.3s ease-in both; }

.dvp-toast.toast-success { border-left: 3px solid var(--success); }
.dvp-toast.toast-error   { border-left: 3px solid var(--error); }
.dvp-toast.toast-info    { border-left: 3px solid var(--brand); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}

/* ââ Loader Spinner ââââââââââââââââââââââââââââââââââââââââââââââ */
.dvp-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ââ Helpers âââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.hidden { display: none !important; }

/* ââ Responsive ââââââââââââââââââââââââââââââââââââââââââââââââââ */
@media (max-width: 600px) {
    body { padding: 12px 10px 50px; }

    .dvp-card { padding: 22px 18px; border-radius: var(--radius-lg); }

    .dvp-title { font-size: 2rem; }

    .dvp-tab { font-size: 0.72rem; padding: 10px 5px; }
    .dvp-tab .tab-label { display: none; }
    .dvp-tab .tab-icon { font-size: 1.2rem; }

    .dvp-voice-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .dvp-voice-card { padding: 13px 6px; }
    .voice-avatar { font-size: 1.5rem; }
    .voice-name { font-size: 0.75rem; }

    .dvp-btn { padding: 15px; font-size: 0.88rem; }

    .dvp-downloads { grid-template-columns: repeat(3, 1fr); }
    .dvp-dl-btn { padding: 11px 6px; font-size: 0.72rem; }

    #dvp-toast-container { top: 10px; right: 10px; left: 10px; }
    .dvp-toast { min-width: unset; max-width: unset; width: 100%; }

    .dvp-steps { flex-wrap: wrap; justify-content: center; }
    .step-divider { display: none; }
}
