/* ===================================================================
   KRDT Utility Pro — Custom Design System
   Bootstrap 5.3.0 + Plus Jakarta Sans
   Only project-specific overrides. Bootstrap handles everything else.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ===== Design Tokens ===== */
:root {
    --krdt-orange: #f27a24;
    --krdt-blue: #1e293b;
    --krdt-dark: #1e293b;
    --krdt-light: #f8f9fc;
    --krdt-gradient: linear-gradient(115deg, #f27a24 0%, #d8681b 35%, #4e73df 100%);
}

/* ===== Base ===== */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--krdt-light);
    color: var(--krdt-dark);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main, .flex-fill { flex: 1; }

/* ===== Navbar: enforce consistent sizing across all pages ===== */
.navbar {
    padding: 0.75rem 0 !important;
    min-height: 0 !important;
}
.navbar-brand {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
}

/* ===== Public Pages — Sticky Footer ===== */
body > .container,
body > .container-fluid {
    flex: 1;
}
body > style,
body > script {
    display: none !important;
    flex: 0 !important;
}
footer {
    background: var(--krdt-blue);
    color: #fff;
    flex-shrink: 0;
    margin-top: auto;
}
footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
footer a:hover {
    color: #f27a24 !important;
}

/* ===== Feature Section ===== */
.feature-section {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
}
.feature-icon { font-size: 2.2rem; color: #f27a24; margin-bottom: 1rem; }
.feature-item { text-align: center; padding: 1rem; }
.features-included {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

/* ===== Download Section ===== */
.download-section { background: #f8f9fa; }
.download-stats { margin-top: 2rem; }
.download-stats .stat-item { padding: 1rem; text-align: center; }
.download-stats .stat-item h5 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.download-content { padding-right: 2rem; }
.version-info .alert { border-radius: 1rem; border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.version-info .btn { margin: 0.25rem; border-radius: 0.5rem; transition: all 0.3s ease; }
.version-info .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

/* ===== Requirements Card ===== */
.requirements-card { background: #fff; border-radius: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.07); overflow: hidden; }
.requirements-card .card-header { background: var(--krdt-gradient); color: #fff; padding: 1.5rem; border: none; }
.requirement-list { display: flex; flex-direction: column; gap: 1rem; }
.requirement-item { display: flex; align-items: center; gap: 1rem; }
.requirement-icon {
    width: 40px; height: 40px; background: var(--krdt-light); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #f27a24; font-size: 1.2rem;
}
.requirement-content h6 { margin: 0; font-weight: 600; }
.requirement-content p { margin: 0; color: #666; font-size: 0.9rem; }

/* ===== Social Icons ===== */
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; background: rgba(255,255,255,0.1);
    color: #fff; border-radius: 50%; margin: 0 0.375rem;
    transition: all 0.3s ease; text-decoration: none;
}
.social-icon:hover { background: #f27a24; transform: translateY(-3px); color: #fff; }

/* ===== Bootstrap Overrides — Brand Colors ===== */
/* Buttons: orange gradient primary instead of Bootstrap blue */
.btn-primary {
    background: linear-gradient(135deg, #f27a24 0%, #d8681b 100%);
    border-color: #f27a24;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #d8681b 0%, #c05a15 100%);
    border-color: #c05a15;
    transform: translateY(-1px);
}
.btn-outline-primary { color: #f27a24; border-color: #f27a24; }
.btn-outline-primary:hover { background-color: #f27a24; border-color: #f27a24; color: #fff; }

/* Forms: orange focus ring */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #f27a24;
    box-shadow: 0 0 0 0.2rem rgba(242, 122, 36, 0.25);
}
.form-check-input:checked { background-color: #f27a24; border-color: #f27a24; }
.input-group-text { background-color: var(--krdt-light); color: #f27a24; }

/* Alerts: left-border accent */
.alert { border: none; border-radius: 0.75rem; border-left: 4px solid; }
.alert-success { background-color: #e8f5e8; color: #155724; border-left-color: #28a745; }
.alert-danger { background-color: #f8d7da; color: #721c24; border-left-color: #dc3545; }
.alert-warning { background-color: #fff3e0; color: #856404; border-left-color: #ffc107; }
.alert-info { background-color: #e3f2fd; color: #0c5460; border-left-color: #17a2b8; }

/* Tables: dark header */
.table thead th {
    background-color: var(--krdt-blue);
    color: #fff;
    border: none;
    font-weight: 600;
}

/* Dropdowns: orange hover */
.dropdown-item { padding: 0.6rem 1.2rem; transition: all 0.2s ease; border-radius: 0.25rem; margin: 0.125rem 0.5rem; }
.dropdown-item:hover { color: #f27a24; }
.dropdown-item.active { background: #f27a24; color: #fff; }
@media (max-width: 991.98px) {
    .navbar-collapse { padding: 1rem 0; }
    .dropdown-menu { border: none !important; box-shadow: none !important; padding-left: 1rem; }
}

/* ===== Admin Sidebar ===== */
#wrapper nav.krdt-sidebar,
#wrapper .krdt-sidebar {
    background: #1e293b !important;
    width: 260px !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    overflow-y: auto;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    float: none !important;
}
.krdt-sidebar-brand {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.krdt-sidebar-brand a {
    display: flex; align-items: center; gap: 0.75rem;
    color: #fff !important; text-decoration: none !important;
    font-size: 1.1rem; font-weight: 700;
}
.krdt-sidebar-brand i { font-size: 1.3rem; color: #f27a24; }
.krdt-sidebar-nav { flex: 1; padding: 0.5rem 0; overflow-y: auto; }
.krdt-sidebar-section {
    color: rgba(255,255,255,0.35); font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; padding: 1rem 1.25rem 0.4rem;
}
.krdt-sidebar-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1.25rem; color: rgba(255,255,255,0.65) !important;
    text-decoration: none !important; font-size: 0.875rem; font-weight: 500;
    border-radius: 0; transition: all 0.2s; margin: 1px 0;
    background: transparent; border: 0; list-style: none;
}
.krdt-sidebar-link i { width: 1.2rem; text-align: center; font-size: 0.875rem; opacity: 0.7; }
.krdt-sidebar-link:hover { color: #fff !important; background: rgba(255,255,255,0.08); }
.krdt-sidebar-link.active {
    color: #fff !important; background: rgba(242, 122, 36, 0.15);
    border-left: 3px solid #f27a24;
}
.krdt-sidebar-link.active i { color: #f27a24 !important; opacity: 1; }
.krdt-sidebar-footer { padding: 0.5rem 0; border-top: 1px solid rgba(255,255,255,0.08); }

/* ===== Admin Layout ===== */
#wrapper { display: flex; min-height: 0; }
#content-wrapper {
    margin-left: 260px; flex: 1; display: flex;
    flex-direction: column; background: var(--krdt-light);
}
#content { flex: 1; padding: 1.5rem; }
.topbar {
    background: #fff; border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem; margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ===== Admin Responsive ===== */
@media (max-width: 991.98px) {
    #wrapper .krdt-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    #wrapper .krdt-sidebar.show { transform: translateX(0); }
    #content-wrapper { margin-left: 0 !important; width: 100% !important; }
}

/* ===== Supported Models Page ===== */
.models-hero {
    background: var(--krdt-gradient);
    color: #fff;
    padding: 50px 0 40px;
    text-align: center;
}
.models-hero h1 { font-weight: 800; font-size: 2.2rem; }
.models-hero p { opacity: 0.85; font-size: 1.05rem; }
.models-stats {
    display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem;
}
.models-stats .stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem; border-radius: 0.75rem; text-align: center;
}
.models-stats .stat strong { font-size: 1.5rem; display: block; }
.models-stats .stat span { font-size: 0.85rem; opacity: 0.8; }
.search-bar {
    background: #fff; border-radius: 1rem; padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: -25px; position: relative; z-index: 10;
}
.brand-card {
    background: #fff; border-radius: 0.75rem; border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.2s; overflow: hidden;
}
.brand-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.brand-header {
    padding: 1rem 1.25rem; cursor: pointer; display: flex;
    align-items: center; justify-content: space-between; user-select: none;
}
.brand-header h5 {
    margin: 0; font-weight: 700; font-size: 1rem; color: var(--krdt-dark);
    display: flex; align-items: center; gap: 0.5rem;
}
.brand-header .brand-icon {
    width: 36px; height: 36px; background: var(--krdt-gradient); color: #fff;
    border-radius: 0.5rem; display: flex; align-items: center;
    justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.brand-header .model-count {
    background: var(--krdt-light); color: var(--krdt-dark);
    padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 600;
}
.brand-header .chevron { color: #adb5bd; transition: transform 0.2s; }
.brand-card.collapsed .chevron { transform: rotate(-90deg); }
.brand-body { padding: 0 1.25rem 1rem; }
.model-pill {
    display: inline-block; background: var(--krdt-light); color: var(--krdt-dark);
    padding: 0.35rem 0.75rem; border-radius: 0.5rem; font-size: 0.82rem;
    margin: 0.2rem; border: 1px solid #e9ecef; transition: all 0.15s;
}
.model-pill:hover { background: #fff; border-color: var(--krdt-orange); color: var(--krdt-orange); }
.model-pill .badge-algo {
    background: var(--krdt-orange); color: #fff; font-size: 0.65rem;
    padding: 0.15rem 0.4rem; border-radius: 0.25rem; margin-left: 0.3rem; font-weight: 600;
}
.no-results { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.no-results i { font-size: 3rem; color: #dee2e6; margin-bottom: 1rem; display: block; }

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed var(--krdt-orange); border-radius: 10px; padding: 40px;
    text-align: center; background: #f8f9fa; transition: all 0.3s ease; cursor: pointer;
}
.upload-area:hover { border-color: #d8681b; background: #e9ecef; }
.upload-area.dragover { border-color: #28a745; background: #d4edda; }
.upload-area .file-info {
    background: #e9ecef; border-radius: 8px; padding: 15px; margin: 10px 0;
}

/* ===== Hero Section (Production) ===== */
.hero-section {
    background: linear-gradient(115deg, #f27a24 0%, #d8681b 35%, #4e73df 100%);
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -180px;
    right: -100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.hero-text {
    flex: 1;
    min-width: 0;
}
.hero-text h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 0.8rem;
}
.hero-text h1 span {
    color: rgba(255,255,255,0.85);
}
.hero-text p {
    color: rgba(255,255,255,0.88);
    font-size: 1rem;
    margin-bottom: 1.4rem;
    max-width: 520px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}
.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.hero-btn-primary {
    background: #fff;
    color: #d8681b;
}
.hero-btn-primary:hover {
    color: #d8681b;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.hero-btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
.hero-btn-outline:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-2px);
}
.hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    flex-shrink: 0;
    width: 340px;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    backdrop-filter: blur(3px);
}
.hero-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}
.hero-feature strong {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}
.hero-feature span {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
}

/* ===== Download Section (Production) ===== */
.dl-section {
    padding: 3rem 0 3.5rem;
    background: #f8f9fc;
}
.dl-header {
    text-align: center;
    margin-bottom: 2rem;
}
.dl-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.4rem;
}
.dl-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}
.dl-card {
    background: #fff;
    border: 1px solid rgba(31,41,55,0.08);
    border-radius: 18px;
    padding: 1.8rem;
    height: 100%;
    box-shadow: 0 10px 30px rgba(31,41,55,0.07);
    display: flex;
    flex-direction: column;
}
.dl-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.dl-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(115deg, #f27a24, #d8681b);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.05rem;
}
.dl-version-badge i { font-size: 0.95rem; }
.dl-status-pill {
    background: #e8faf0;
    color: #0ea86d;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}
.dl-release-note {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
    padding: 0.7rem 1rem;
    background: #f0f4ff;
    border-left: 3px solid #4e73df;
    border-radius: 0 8px 8px 0;
}
.dl-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}
.dl-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.dl-btn-primary {
    background: linear-gradient(115deg, #f27a24, #d8681b);
    color: #fff;
}
.dl-btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(242,122,36,0.3);
}
.dl-btn-outline {
    background: transparent;
    border-color: rgba(31,41,55,0.18);
    color: #1f2937;
}
.dl-btn-outline:hover {
    border-color: #f27a24;
    color: #f27a24;
    transform: translateY(-2px);
}
.dl-btn-wa {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.95rem;
    margin-top: auto;
}
.dl-btn-wa:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,211,102,0.35);
}
.dl-stats-row {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(31,41,55,0.08);
}
.dl-stat {
    flex: 1;
    text-align: center;
}
.dl-stat strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2937;
}
.dl-stat span {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
}
.dl-wa-card {
    text-align: center;
    align-items: center;
}
.dl-wa-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 22px rgba(37,211,102,0.25);
}
.dl-wa-icon i {
    font-size: 2.2rem;
    color: #fff;
}
.dl-wa-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.3rem;
}
.dl-wa-desc {
    color: #6b7280;
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
    max-width: 320px;
}
.dl-wa-followers {
    display: inline-block;
    background: #e8faf0;
    color: #0ea86d;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.dl-wa-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.dl-wa-perks span {
    background: #f3f4f6;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b5563;
}
.dl-wa-note {
    display: block;
    margin-top: 0.75rem;
    color: #9ca3af;
    font-size: 0.78rem;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .hero-inner {
        flex-direction: column;
        gap: 2rem;
    }
    .hero-features {
        width: 100%;
        max-width: 400px;
    }
    .hero-section { padding: 2.5rem 0; }
    .dl-section { padding: 2rem 0 2.5rem; }
    .dl-actions { flex-direction: column; }
    .dl-btn { justify-content: center; }
}
@media (max-width: 575.98px) {
    .hero-features {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 767px) {
    .models-hero { padding: 30px 0 25px; }
    .models-hero h1 { font-size: 1.6rem; }
    .models-stats { gap: 1rem; }
    .search-bar { padding: 1rem; }
}
