/* ------------------------------------------------
GLOBAL VISUALS
------------------------------------------------ */

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2937;
}

/* ------------------------------------------------
TOP NAV
------------------------------------------------ */

.topbar-custom .nav-link {
    color: #495057;
    border-radius: 0.5rem;
    padding: 0.45rem 0.8rem;
    font-weight: 500;
    transition: 0.18s ease;
}

.topbar-custom .nav-link:hover,
.topbar-custom .nav-link.active {
    background: #eef2ff;
    color: #1d4ed8;
}

/* ------------------------------------------------
SIDEBAR
------------------------------------------------ */

.app-sidebar .sidebar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    text-decoration: none;
}

.app-sidebar .nav-link {
    color: #cfd6e1;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0.7rem 0.9rem;
    font-weight: 500;
    transition: 0.18s ease;
}

.app-sidebar .nav-link:hover {
    background: #2f3a4d;
    color: #fff;
}

.app-sidebar .nav-link.active {
    background: #2a5ac2;
    color: #fff;
}

/* ------------------------------------------------
PAGE TITLES
------------------------------------------------ */

.page-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #111827;
    border-bottom: none;
    padding: 0;
}

/* ------------------------------------------------
CARDS
------------------------------------------------ */

.card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.card.shadow-sm {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
}

/* ------------------------------------------------
BUTTONS
------------------------------------------------ */

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1e4fd6;
    border-color: #1e4fd6;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    border-radius: 8px;
}

/* ------------------------------------------------
FORMS
------------------------------------------------ */

.form-control {
    border-radius: 10px;
}

.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}

/* ------------------------------------------------
TEXT / STATUS
------------------------------------------------ */

.text-medium-emphasis {
    color: #6b7280 !important;
}

#status1 {
    font-weight: 500;
}

/* ------------------------------------------------
ALERTS / BADGES
------------------------------------------------ */

.alert {
    border-radius: 8px;
}

.badge {
    font-weight: 600;
    padding: 0.5em 0.7em;
}

/* ------------------------------------------------
TABLES
------------------------------------------------ */

.table td,
.table th {
    vertical-align: middle;
}

/* ------------------------------------------------
DASHBOARD GRID
------------------------------------------------ */

.row.g-3 > div {
    display: flex;
}

.row.g-3 .card {
    width: 100%;
}

.offcanvas .nav-link.active {
    background: #eef2ff;
    color: #1d4ed8 !important;
    border-radius: 0.5rem;
}

.dashboard-wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0;
}

.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-stat-row {
    margin-bottom: 1.5rem;
}

.dashboard-main-row {
    align-items: flex-start;
}

.dashboard-stat-row > [class*="col-"],
.dashboard-main-row > [class*="col-"] {
    display: flex;
}

.dashboard-stat-row .card,
.dashboard-main-row .card {
    width: 100%;
}

.dashboard-wrap .card-header {
    padding: 0.9rem 1.25rem;
}

.dashboard-wrap .card-body {
    padding: 1.25rem;
}

.dashboard-wrap .table th,
.dashboard-wrap .table td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.upload-main-row {
    align-items: flex-start;
}

.upload-main-row > [class*="col-"] {
    display: flex;
}

.upload-main-row .card {
    width: 100%;
}

.progress {
    border-radius: 999px;
    overflow: hidden;
    background: #e9eef5;
}

.progress-bar {
    font-weight: 600;
}

.top-header {
    height: 80px;
}

.brand-logo {
    width: 120px;
    height: 80px;
}

/* =========================================
   shared saas tool pages
========================================= */

.upload-saas-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.upload-saas-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.upload-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.75rem;
}

.upload-hero-title {
    font-size: clamp(2rem, 2vw, 3rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.85rem 0;
    color: #111827;
    max-width: 720px;
}

.upload-hero-subtitle {
    font-size: 1rem;
    line-height: 1.65;
    color: #6b7280;
    max-width: 720px;
    margin: 0;
}

.upload-ghost-btn {
    border-radius: 999px;
    padding: 0.7rem 1rem;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
    background: #fff !important;
}

.upload-panel {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.upload-panel-top {
    margin-bottom: 1rem;
}

.upload-panel-title {
    font-size: 1.2rem;
    font-weight: 650;
    color: #111827;
    margin: 0 0 0.35rem 0;
}

.upload-panel-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.upload-status {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.upload-status-ready {
    background: #eef6ff;
    color: #1d4ed8;
}

.upload-status-warning {
    background: #fff7ed;
    color: #c2410c;
}

.upload-status-info {
    background: #eff6ff;
    color: #2563eb;
}

.upload-status-success {
    background: #ecfdf3;
    color: #047857;
}

.upload-status-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 1.5px dashed #d1d5db;
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.06), transparent 35%),
        #fafafa;
    text-align: center;
    padding: 2rem 1.25rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.upload-dropzone:hover {
    border-color: #93c5fd;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 35%),
        #f8fbff;
}

.upload-dropzone-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.upload-dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.35rem;
}

.upload-dropzone-subtitle {
    font-size: 0.92rem;
    color: #6b7280;
}

.upload-input-hidden input[type="file"] {
    display: none;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.upload-primary-btn,
.upload-secondary-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-weight: 600;
    transition: 0.2s ease;
}

.upload-primary-btn {
    background: #111827;
    color: #fff;
}

.upload-primary-btn:hover {
    background: #000;
}

.upload-secondary-btn {
    background: #f3f4f6;
    color: #111827;
}

.upload-secondary-btn:hover {
    background: #e5e7eb;
}

.upload-progress-wrap {
    margin-top: 1.5rem;
}

.upload-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 0.55rem;
}

.upload-progress-bar-shell {
    width: 100%;
    height: 10px;
    background: #eceff3;
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #111827 0%, #2563eb 100%);
    transition: width 0.2s ease;
}

.upload-info-card {
    background: #ffffff;
    border: 1px solid #eceff3;
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.upload-info-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
   /* text-transform: lowercase;  */
}

.upload-info-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #4b5563;
}

.upload-info-list li {
    margin-bottom: 0.55rem;
}

.upload-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    font-size: 0.94rem;
}

.upload-info-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.upload-info-row span:last-child {
    text-align: right;
    font-weight: 600;
    color: #111827;
}

.upload-error {
    color: #b91c1c;
    font-size: 0.92rem;
    font-weight: 500;
}

.upload-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #111827;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-weight: 600;
}

.upload-download-btn:hover {
    color: #fff;
    background: #000;
}

/* ------------------------------------------------
TTS
------------------------------------------------ */

.tts-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.tts-setting-card {
    background: #fbfcfe;
    border: 1px solid #eceff3;
    border-radius: 18px;
    padding: 0.9rem;
}

.tts-setting-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: lowercase;
    color: #6b7280;
    margin-bottom: 0.55rem;
}

.tts-select {
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
    background: #fff;
}

.tts-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.12);
}

.tts-editor-wrap {
    border: 1.5px solid #d1d5db;
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.05), transparent 35%),
        #fafafa;
    padding: 1rem;
    transition: 0.2s ease;
}

.tts-editor-wrap:focus-within {
    border-color: #93c5fd;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 35%),
        #f8fbff;
}

.tts-editor {
    width: 100%;
    min-height: 280px;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: #111827;
    font-size: 1rem;
    line-height: 1.65;
}

.tts-editor::placeholder {
    color: #9ca3af;
}

.tts-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.tts-editor-hint {
    font-size: 0.88rem;
    color: #6b7280;
}

.tts-editor-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #6b7280;
    font-weight: 600;
}

.tts-preview-card {
    background: #ffffff;
    border: 1px solid #eceff3;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.tts-preview-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.tts-audio-player {
    width: 100%;
}

/* ------------------------------------------------
RESPONSIVE
------------------------------------------------ */

@media (max-width: 991.98px) {
    .upload-saas-hero {
        flex-direction: column;
        margin-bottom: 1.5rem;
    }

    .upload-panel,
    .upload-info-card,
    .upload-dropzone,
    .tts-editor-wrap {
        border-radius: 18px;
    }

    .upload-dropzone {
        min-height: 220px;
    }
}

@media (max-width: 767.98px) {
    .tts-settings-grid {
        grid-template-columns: 1fr;
    }

    .tts-editor-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}