/* YOXKarma — public site dark theme (no Bootstrap) */

:root{
    --bg: #0b1120;
    --surface: #161f36;
    --surface2: #223050;
    --border: #2a3854;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #475569;
    --secondary-hover: #334155;
    --dark: #05070d;
    --dark-hover: #1f2937;
    --success: #22c55e;
    --info: #38bdf8;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --radius: 12px;
    --shadow: 0 12px 32px rgba(0,0,0,.35);
}

*{
    box-sizing: border-box;
}

html, body{
    height: 100%;
}

body{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top, #101b34 0%, var(--bg) 55%);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
}

a{
    color: var(--primary);
}

h1, h2, h3, h4, h5{
    font-weight: 600;
}

.h3{
    font-size: 1.5rem;
}

.font-weight-normal{
    font-weight: 400;
}

.text-center{
    text-align: center;
}

.text-muted{
    color: var(--muted) !important;
}

.text-dark{
    color: var(--text);
}

.mx-auto{
    margin-left: auto;
    margin-right: auto;
}

.mb-3{ margin-bottom: 1rem; }
.mb-4{ margin-bottom: 1.5rem; }
.mt-5{ margin-top: 3rem; }

.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Layout ------------------------------------------------------------- */

.container{
    max-width: 1100px;
    margin: 90px auto 40px;
    padding: 0 20px;
}

.col-xl-12{
    width: 100%;
}

/* Navbar ------------------------------------------------------------- */

.navbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.navbar-brand{
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.navbar-toggler{
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.navbar-toggler-icon{
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    position: relative;
}

.navbar-toggler-icon::before, .navbar-toggler-icon::after{
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--text);
}

.navbar-toggler-icon::before{ top: -6px; }
.navbar-toggler-icon::after{ top: 6px; }

.navbar-collapse{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 16px;
    flex-wrap: wrap;
}

.navbar-nav{
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-right{
    margin-left: auto;
}

.nav-item{
    list-style: none;
}

.nav-link{
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background-color .15s ease, color .15s ease;
}

.nav-link:hover{
    color: var(--text);
    background: var(--surface2);
}

.nav-item.active .nav-link{
    background: var(--primary);
    color: white;
}

.btn-nav{
    display: flex;
}

@media (max-width: 860px){
    .navbar-toggler{
        display: inline-flex;
    }

    .navbar-collapse{
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 10px 20px 16px;
    }

    .navbar-collapse.show{
        display: flex;
    }

    .navbar-nav{
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .navbar-right{
        margin-left: 0;
    }
}

/* Buttons -------------------------------------------------------------- */

.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}

.btn:hover{
    background: var(--primary-hover);
    color: white;
}

.btn:active{
    transform: translateY(1px);
}

.btn-primary{ background: var(--primary); }
.btn-primary:hover{ background: var(--primary-hover); }

.btn-secondary{ background: var(--secondary); }
.btn-secondary:hover{ background: var(--secondary-hover); }

.btn-dark{ background: var(--dark); }
.btn-dark:hover{ background: var(--dark-hover); }

.btn-light{ background: var(--surface2); color: var(--text); }
.btn-light:hover{ background: var(--border); }

.btn-info{ background: var(--info); color: #04202e; }
.btn-info:hover{ filter: brightness(1.1); }

.btn-warning{ background: var(--warning); color: #2b1900; }
.btn-warning:hover{ filter: brightness(1.1); }

.btn-danger{ background: var(--danger); }
.btn-danger:hover{ background: var(--danger-hover); }

.btn-success{ background: var(--success); color: #04220f; }
.btn-success:hover{ filter: brightness(1.1); }

.btn-lg{ padding: 13px 20px; font-size: 1rem; }
.btn-sm, .btn-small{ padding: 6px 12px; font-size: 0.85rem; }
.btn-block{ display: flex; width: 100%; }

.navbar-btn{
    padding: 8px 14px;
}

/* Forms ------------------------------------------------------------------ */

.form-control{
    display: block;
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus{
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .25);
}

.checkbox{
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.form-check-input{
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-check-label{
    color: var(--muted);
    font-size: 0.9rem;
}

.form-signin{
    width: 100%;
    max-width: 360px;
    padding: 30px;
    margin: 90px auto 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-signin .form-control{
    margin-bottom: 12px;
}

.form-signin .btn{
    margin-bottom: 10px;
}

.form-row{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-group{
    margin-bottom: 14px;
}

.input-group{
    display: flex;
    align-items: stretch;
}

.input-group .form-control{
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-prepend{
    display: flex;
}

.input-group-text{
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-right: none;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    color: var(--muted);
}

.card{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header{
    padding: 14px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-body{
    padding: 18px;
}

/* Alerts ------------------------------------------------------------------ */

.alert{
    padding: 14px 16px;
    border-radius: 10px;
    margin: 14px 0;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.alert.fixed-top{
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    max-width: 480px;
    box-shadow: var(--shadow);
}

.alert-danger{
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .4);
    color: #fca5a5;
}

.alert-success{
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .4);
    color: #86efac;
}

.alert-info{
    background: rgba(56, 189, 248, .12);
    border-color: rgba(56, 189, 248, .4);
    color: #7dd3fc;
}

/* Tables ------------------------------------------------------------------ */

.table-responsive{
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.table{
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.table th, .table td{
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table thead th, .table-light{
    background: var(--bg) !important;
    color: var(--muted) !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
}

.table-dark tbody tr:nth-child(even){
    background: rgba(255,255,255,.02);
}

.table-striped tbody tr:hover{
    background: var(--surface2);
}

/* Pagination ---------------------------------------------------------------- */

nav[aria-label] .pagination{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.page-item{
    list-style: none;
}

.page-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background-color .15s ease;
}

.page-link:hover{
    background: var(--surface2);
}

.page-item.active .page-link{
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-item.disabled .page-link{
    opacity: .4;
    pointer-events: none;
}

/* Progress ------------------------------------------------------------------ */

.progress{
    position: relative;
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: width .3s ease;
}

.progress-bar.bg-danger{ background: var(--danger); }
.progress-bar.bg-warning{ background: var(--warning); }
.progress-bar.bg-success{ background: var(--success); }

.progress-label{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
    pointer-events: none;
}

/* Hero / stats ------------------------------------------------------------------ */

.hero{
    text-align: center;
    padding: 46px 30px;
}

.hero h1{
    margin: 0 0 8px;
    font-size: 2rem;
}

.hero .lead{
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 28px;
}

.stats-row{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.stat{
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 28px;
    min-width: 140px;
}

.stat-value{
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label{
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 4px;
}

.button-row{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Misc ------------------------------------------------------------------ */

#myBtn{
    position: fixed;
    bottom: 20px;
    right: 24px;
    z-index: 999;
    border: none;
    border-radius: 10px;
    display: none;
}
