/**
 * CSS Frontend Cek Jadwal Tutorial
 * Modern Sky Blue Theme — v2.0
 */

/* ══════════════════════════════════════════════════════════════════
   TOKENS
══════════════════════════════════════════════════════════════════ */
:root {
    --cjt-primary:       #0ea5e9;
    --cjt-primary-hover: #0284c7;
    --cjt-primary-dark:  #0369a1;
    --cjt-primary-light: #e0f2fe;
    --cjt-primary-bg:    #f0f9ff;
    --cjt-gradient:      linear-gradient(135deg, #38bdf8 0%, #0ea5e9 55%, #0284c7 100%);
    --cjt-primary-rgb:   14, 165, 233;
    --cjt-text-main:     #0f172a;
    --cjt-text-sub:      #64748b;
    --cjt-border:        #e2e8f0;
    --cjt-bg-light:      #f8fafc;
    --cjt-bg-card:       #ffffff;
    --cjt-radius:        20px;
    --cjt-radius-sm:     10px;
}

/* ══════════════════════════════════════════════════════════════════
   CONTAINER
══════════════════════════════════════════════════════════════════ */
.cjt-container {
    max-width: 940px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--cjt-text-main);
    background: var(--cjt-bg-card);
    border-radius: var(--cjt-radius);
    overflow: hidden;
    box-shadow:
        0 20px 60px -12px rgba(var(--cjt-primary-rgb), 0.18),
        0 4px 16px  -4px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(var(--cjt-primary-rgb), 0.10);
}

/* ══════════════════════════════════════════════════════════════════
   HERO — gradient + dot pattern + decorative circles
══════════════════════════════════════════════════════════════════ */
.cjt-hero {
    position: relative;
    padding: 42px 36px 48px !important;
    text-align: center !important;
    overflow: hidden;

    /* Single shorthand — !important overrides any theme background rule */
    background:
        radial-gradient(ellipse 70% 90% at 15% 45%, rgba(var(--cjt-primary-rgb), 0.55) 0%, transparent 65%),
        radial-gradient(ellipse 55% 70% at 88% 20%, rgba(var(--cjt-primary-rgb), 0.50) 0%, transparent 65%),
        radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1px) 0 0 / 22px 22px,
        var(--cjt-gradient) !important;
}

/* Decorative circles */
.cjt-hero::before {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    top: -80px; right: -55px;
    pointer-events: none;
}
.cjt-hero::after {
    content: '';
    position: absolute;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    bottom: -55px; left: 18px;
    pointer-events: none;
}

.cjt-hero-title {
    position: relative;
    font-size: 27px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 8px !important;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
}

.cjt-hero-subtitle {
    position: relative;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.86) !important;
    margin: 0 !important;
    font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════════════════════════════════ */
.cjt-content {
    padding: 30px 34px 38px;
}

/* ══════════════════════════════════════════════════════════════════
   FORM
══════════════════════════════════════════════════════════════════ */
.cjt-form {
    margin-bottom: 0;
}

.cjt-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.cjt-input {
    border: 1.5px solid var(--cjt-border);
    border-radius: var(--cjt-radius-sm);
    padding: 11px 16px;
    font-size: 14.5px;
    color: var(--cjt-text-main);
    background: var(--cjt-bg-light);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
}

.cjt-input:focus {
    background: #fff;
    border-color: var(--cjt-primary);
    box-shadow: 0 0 0 3.5px rgba(var(--cjt-primary-rgb), 0.13);
}

.cjt-input::placeholder {
    color: #94a3b8;
}

.cjt-input-nim {
    flex: 1;
    min-width: 200px;
}

/* Select dropdown */
select.cjt-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-color: var(--cjt-bg-light);
    padding-right: 34px;
}

/* Math Captcha Box */
.cjt-math-box {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--cjt-border);
    border-radius: var(--cjt-radius-sm);
    overflow: hidden;
    background: var(--cjt-bg-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cjt-math-box:focus-within {
    border-color: var(--cjt-primary);
    box-shadow: 0 0 0 3.5px rgba(var(--cjt-primary-rgb), 0.13);
    background: #fff;
}

.cjt-math-question {
    padding: 11px 14px;
    background: var(--cjt-primary-light) !important;
    color: var(--cjt-primary-dark) !important;
    font-weight: 700;
    font-size: 14px;
    border-right: 1.5px solid rgba(var(--cjt-primary-rgb), 0.2);
    user-select: none;
    white-space: nowrap !important;
    word-break: keep-all !important;
    letter-spacing: 0.4px;
}

.cjt-input-math {
    width: 58px;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    text-align: center;
    background: transparent !important;
    padding: 11px 8px;
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════ */
.cjt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--cjt-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    border: none;
    line-height: 1;
}

.cjt-btn-reset {
    background-color: transparent;
    color: var(--cjt-text-sub);
    border: 1.5px solid var(--cjt-border) !important;
}

.cjt-btn-reset:hover {
    background-color: var(--cjt-bg-light);
    border-color: #cbd5e1 !important;
    color: var(--cjt-text-main);
}

.cjt-btn-submit {
    background: var(--cjt-gradient);
    color: #ffffff;
    min-width: 148px;
    letter-spacing: 0.1px;
    box-shadow: 0 4px 14px rgba(var(--cjt-primary-rgb), 0.30);
}

.cjt-btn-submit:hover {
    opacity: 0.91;
    transform: translateY(-1.5px);
    box-shadow: 0 7px 20px rgba(var(--cjt-primary-rgb), 0.38);
}

.cjt-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--cjt-primary-rgb), 0.28);
}

/* ══════════════════════════════════════════════════════════════════
   LOADING STATE
══════════════════════════════════════════════════════════════════ */
#cjt-loading {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--cjt-primary);
    font-weight: 500;
    font-size: 14px;
}

#cjt-loading::after {
    content: '';
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid var(--cjt-primary-light);
    border-top-color: var(--cjt-primary);
    border-radius: 50%;
    animation: cjt-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ══════════════════════════════════════════════════════════════════
   ERROR STATE
══════════════════════════════════════════════════════════════════ */
#cjt-error {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--cjt-radius-sm);
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 14px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   RESULT SECTION
══════════════════════════════════════════════════════════════════ */
#cjt-result-container {
    margin-top: 26px;
    border-top: 1.5px solid var(--cjt-border);
    padding-top: 24px;
    animation: cjt-fadein 0.35s ease;
}

@keyframes cjt-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ══════════════════════════════════════════════════════════════════
   PROFILE CARD
══════════════════════════════════════════════════════════════════ */
.cjt-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px 20px;
    background: var(--cjt-primary-bg);
    border: 1px solid rgba(var(--cjt-primary-rgb), 0.18);
    border-left: 4px solid var(--cjt-primary);
    border-radius: var(--cjt-radius-sm);
}

.cjt-profile-avatar {
    flex-shrink: 0;
    width: 46px; height: 46px;
    background: var(--cjt-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(var(--cjt-primary-rgb), 0.28);
}

.cjt-profile-avatar svg {
    width: 22px; height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cjt-profile-info {
    flex: 1;
    min-width: 0;
}

.cjt-profile-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 3px;
    color: var(--cjt-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cjt-profile-prodi {
    font-size: 13px;
    color: var(--cjt-text-sub);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════════════════════════ */
.cjt-table-responsive {
    overflow-x: auto;
    border-radius: var(--cjt-radius-sm);
    border: 1px solid var(--cjt-border);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.cjt-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 13.5px;
    min-width: 600px;
}

/* Gradient header */
.cjt-table thead tr {
    background: var(--cjt-gradient);
}

.cjt-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: rgba(255, 255, 255, 0.95);
    border: none;
}

.cjt-table th:last-child {
    text-align: center;
}

.cjt-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--cjt-border);
    vertical-align: top;
    line-height: 1.55;
}

.cjt-table tbody tr:last-child td {
    border-bottom: none;
}

.cjt-table tbody tr:nth-child(even) td {
    background-color: var(--cjt-bg-light);
}

.cjt-table tbody tr:hover td {
    background-color: var(--cjt-primary-bg) !important;
    transition: background-color 0.15s ease;
}

.cjt-sub-text {
    color: var(--cjt-text-sub);
    font-size: 12px;
    margin-top: 4px;
}

/* Status badge */
.cjt-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    background: var(--cjt-primary-light);
    color: var(--cjt-primary-dark);
    border: 1px solid rgba(var(--cjt-primary-rgb), 0.22);
    max-width: 220px;
    word-break: break-word;
    white-space: normal;
}

/* Empty / no-data row */
.cjt-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--cjt-text-sub);
    font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   LINK BUTTON (in table)
══════════════════════════════════════════════════════════════════ */
.cjt-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cjt-gradient);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(var(--cjt-primary-rgb), 0.25);
}

.cjt-btn-link:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(var(--cjt-primary-rgb), 0.36);
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cjt-hero {
        padding: 30px 20px 38px;
    }
    .cjt-hero-title {
        font-size: 22px;
    }
    .cjt-content {
        padding: 20px 18px 28px;
    }
    .cjt-search-row {
        flex-direction: column;
    }
    .cjt-btn {
        width: 100%;
    }
    .cjt-math-box {
        justify-content: center;
    }
    .cjt-profile-header {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--cjt-primary);
    }
    .cjt-profile-name,
    .cjt-profile-prodi {
        white-space: normal;
    }
}
