:root {
    --ubaya-blue:       #003DA5;
    --ubaya-blue-dark:  #002E7A;
    --ubaya-blue-light: #EEF3FF;
    --ubaya-accent:     #E8B000;
    --surface:          #F4F7FF;
    --card-bg:          #FFFFFF;
    --border:           #DDE3F0;
    --text-primary:     #0D1B3E;
    --text-muted:       #6B7CA4;
    --live-red:         #DC2626;
    --live-bg:          #FFF0F0;
    --info-blue:        #1D4ED8;
    --info-bg:          #EFF6FF;
    --success:          #059669;
    --success-bg:       #ECFDF5;
    --radius:           14px;
    --radius-sm:        8px;
    --font:             'Plus Jakarta Sans', sans-serif;
}


*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--surface);
    color: var(--text-primary);
    padding-top: 110px; 
}

@media (max-width: 576px) {
    body { padding-top: 80px; }
}


:focus-visible {
    outline: 3px solid var(--ubaya-blue) !important;
    outline-offset: 2px;
}

.navbar {
    background: #fff !important;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px rgba(0, 61, 165, .07);
}

.form-label {
    font-weight: 600;
    font-size: .875rem;
    color: var(--text-primary);
    margin-bottom: .45rem;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .65rem .9rem;
    font-family: var(--font);
    font-size: .9rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ubaya-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, .12);
    outline: none;
}

.form-control::placeholder { color: #b0bcd4; }

.form-text {
    font-size: .8rem;
    color: var(--text-muted);
}

.input-group-text {
    border: 1.5px solid var(--border);
    background: var(--ubaya-blue-light);
    color: var(--ubaya-blue);
    font-weight: 600;
    font-size: .82rem;
}

.input-group .input-group-text + .form-control,
.input-group .input-group-text + .form-select {
    border-left: none;
}
.input-group .form-control:not(:last-child),
.input-group .form-select:not(:last-child) {
    border-right: none;
}
.input-group .input-group-text:first-child {
    border-right: none;
}

.btn-primary,
.btn-ubaya {
    background: linear-gradient(135deg, var(--ubaya-blue), #1A56DB) !important;
    border-color: transparent !important;
    color: #fff !important;
    font-weight: 700;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    transition: opacity .2s, transform .15s;
}
.btn-primary:hover,
.btn-ubaya:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff !important;
}
.btn-primary:active,
.btn-ubaya:active { transform: translateY(0); }

.btn-success {
    font-weight: 700;
    font-family: var(--font);
    transition: opacity .2s, transform .15s;
}
.btn-success:hover { transform: translateY(-1px); }

.btn-outline-danger {
    font-weight: 600;
    font-family: var(--font);
}

.btn-suggest {
    font-size: .78rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: #fff;
    border-radius: 20px;
    padding: .3rem .75rem;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.btn-suggest:hover {
    border-color: var(--ubaya-blue);
    color: var(--ubaya-blue);
    background: var(--ubaya-blue-light);
}
.btn-suggest:disabled,
.btn-suggest[style*="pointer-events: none"] {
    opacity: .45;
    cursor: not-allowed;
}

.btn-submit {
    background: linear-gradient(135deg, var(--ubaya-blue), #1A56DB);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: .9rem;
    width: 100%;
    font-family: var(--font);
    letter-spacing: .03em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: opacity .2s, transform .15s;
}
.btn-submit:hover { opacity: .92; transform: translateY(-1px); color: #fff; }
.btn-submit:active { transform: translateY(0); }

.card,
.main-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: 0 4px 24px rgba(0, 61, 165, .08);
}

.form-hero {
    background: linear-gradient(135deg, var(--ubaya-blue) 0%, #1A56DB 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 2.2rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}
.form-hero::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    pointer-events: none;
}
.form-hero::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 40px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}
.form-hero .badge-tag {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 20px;
    padding: .28rem .8rem;
    display: inline-block;
    margin-bottom: .8rem;
}
.form-hero h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    line-height: 1.3;
    margin: 0;
}
.form-hero p {
    color: rgba(255, 255, 255, .75);
    font-size: .85rem;
    margin: .5rem 0 0;
}

.section-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ubaya-blue);
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1.25rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--ubaya-blue-light);
}

.step-indicator {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.75rem;
}
.step-dot {
    height: 4px;
    border-radius: 4px;
    flex: 1;
    background: var(--border);
    transition: background .3s;
}
.step-dot.active { background: var(--ubaya-blue); }

.kebutuhan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
}
.kebutuhan-card:hover { border-color: var(--ubaya-blue); background: var(--ubaya-blue-light); }
.kebutuhan-card.selected { border-color: var(--ubaya-blue); background: var(--ubaya-blue-light); }
.kebutuhan-card .keb-icon {
    width: 40px; height: 40px;
    background: var(--ubaya-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background .2s;
}
.kebutuhan-card.selected .keb-icon { background: var(--ubaya-blue-dark); }
.kebutuhan-card h6 { font-weight: 700; margin: 0; font-size: .9rem; }
.kebutuhan-card small { color: var(--text-muted); font-size: .78rem; }
.kebutuhan-card input[type="radio"] { display: none; }

.info-box {
    background: #FFF8E1;
    border: 1.5px solid #FFD54F;
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    font-size: .82rem;
    color: #7A5800;
}

.canvas-wrap {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #fafbff;
    overflow: hidden;
    position: relative;
    transition: border-color .2s;
}
.canvas-wrap:hover { border-color: var(--ubaya-blue); }
.canvas-wrap canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
}
.canvas-label-top {
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    font-size: .7rem;
    color: #b0bcd4;
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--font);
}

.field-warn {
    font-size: .78rem;
    color: #DC2626;
    display: none;
    margin-top: .3rem;
    align-items: center;
    gap: .3rem;
}
.field-warn.show { display: flex; }

.styled-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 2rem 0;
}
.styled-divider::before,
.styled-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0, 61, 165, .1); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.blue  { background: var(--ubaya-blue-light); color: var(--ubaya-blue); }
.stat-icon.red   { background: var(--live-bg);          color: var(--live-red); }
.stat-icon.green { background: var(--success-bg);       color: var(--success); }

.stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.search-bar {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    overflow: hidden;
    transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--ubaya-blue); }
.search-bar input {
    border: none;
    outline: none;
    padding: .6rem .9rem;
    font-family: var(--font);
    font-size: .9rem;
    flex: 1;
    min-width: 0;
    background: transparent;
}
.search-bar button {
    background: var(--ubaya-blue);
    color: #fff;
    border: none;
    padding: .6rem 1.1rem;
    font-weight: 600;
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s;
}
.search-bar button:hover { background: var(--ubaya-blue-dark); }

.sub-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.sub-card:hover {
    box-shadow: 0 6px 24px rgba(0, 61, 165, .1);
    transform: translateY(-2px);
}
.sub-card .card-top {
    padding: 1.1rem 1.25rem .75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}
.sub-card .card-body-inner { padding: 1rem 1.25rem 1.25rem; }

.badge-live {
    background: var(--live-bg);
    color: var(--live-red);
    font-weight: 700;
    font-size: .72rem;
    border-radius: 20px;
    padding: .25rem .7rem;
    font-family: var(--font);
    white-space: nowrap;
}
.badge-pengumuman {
    background: var(--info-bg);
    color: var(--info-blue);
    font-weight: 700;
    font-size: .72rem;
    border-radius: 20px;
    padding: .25rem .7rem;
    font-family: var(--font);
    white-space: nowrap;
}

.submitter-name { font-weight: 800; font-size: 1rem; color: var(--text-primary); margin-bottom: .15rem; }
.submitter-meta { font-size: .8rem; color: var(--text-muted); }

.section-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-muted);
    margin-bottom: .6rem;
}

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: .3rem 0; font-size: .84rem; vertical-align: top; }
.detail-table td:first-child {
    color: var(--text-muted);
    width: 38%;
    font-weight: 500;
    padding-right: .5rem;
    white-space: nowrap;
}
.detail-table td:last-child { color: var(--text-primary); font-weight: 600; }

.col-divider { border-left: 1px solid var(--border); }
@media (max-width: 767px) {
    .col-divider {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-top: .75rem;
        margin-top: .75rem;
    }
}

.ttd-wrap { text-align: center; }
.ttd-wrap img {
    height: 52px;
    width: 100%;
    object-fit: contain;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: #fafbff;
    padding: 4px;
}
.ttd-wrap small {
    display: block;
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: .3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ttd-wrap a { font-size: .72rem; font-weight: 600; }

.btn-video {
    font-size: .8rem;
    font-weight: 600;
    border-radius: 6px;
    padding: .3rem .75rem;
    border: 1.5px solid var(--ubaya-blue);
    color: var(--ubaya-blue);
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: background .15s, color .15s;
    font-family: var(--font);
}
.btn-video:hover { background: var(--ubaya-blue); color: #fff; }
.btn-no-video { font-size: .8rem; color: var(--text-muted); font-style: italic; }

.timestamp-badge {
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.empty-state {
    background: #fff;
    border-radius: var(--radius);
    border: 1.5px dashed var(--border);
    padding: 3rem;
    text-align: center;
}
.empty-state i { font-size: 2.5rem; color: var(--border); }

.login-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--ubaya-blue), #1A56DB);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 61, 165, .3);
}
.text-ubaya { color: var(--ubaya-blue) !important; }

.toggle-pw {
    cursor: pointer;
    border: 1.5px solid var(--border);
    border-left: none;
    background: var(--ubaya-blue-light);
    color: var(--ubaya-blue);
    transition: background .15s;
}
.toggle-pw:hover { background: var(--border); }

.result-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}
.result-icon.success { background: var(--success-bg); color: var(--success); }
.result-icon.error   { background: var(--live-bg);    color: var(--live-red); }

.summary-box {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: .85rem;
}
.summary-box .row-item {
    display: flex;
    justify-content: space-between;
    padding: .3rem 0;
    border-bottom: 1px solid var(--border);
}
.summary-box .row-item:last-child { border-bottom: none; }
.summary-box .lbl { color: var(--text-muted); font-weight: 500; }
.summary-box .val { font-weight: 700; color: var(--text-primary); text-align: right; }

footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 3rem;
}

@media (max-width: 576px) {
    .card-body,
    .sub-card .card-body-inner { padding: 1.1rem; }
    .form-hero { padding: 1.5rem 1.25rem; }
    .kebutuhan-row { flex-direction: column; }
}

.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card-custom {
    max-width: 400px;
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 61, 165, .1);
    text-align: center;
}