:root {
    --tt-bg: #f5f7fb;
    --tt-card: #ffffff;
    --tt-text: #1f2a37;
    --tt-muted: #5b6777;
    --tt-line: #d9e1ea;
    --tt-primary: #173b67;
    --tt-primary-hover: #102b4b;
    --tt-accent: #8fb7d8;
    --tt-radius: 18px;
    --tt-shadow: 0 10px 30px rgba(23, 59, 103, 0.08);
    --tt-danger: #c62828;
}

/* BASE */

html,
body {
    background: linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%);
    color: var(--tt-text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
}

.tt-page {
    min-height: 100vh;
    padding: 56px 28px 72px;
}

.tt-page-center {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 72px;
}

.tt-wrap {
    max-width: 920px;
    margin: 0 auto;
}

.tt-wrap-narrow {
    max-width: 520px;
    margin: 0 auto;
}

.tt-card {
    background: var(--tt-card);
    border: 1px solid rgba(23, 59, 103, 0.08);
    border-radius: var(--tt-radius);
    box-shadow: var(--tt-shadow);
    overflow: hidden;
}

/* HERO */

.tt-hero {
    padding: 40px 38px 26px;
    background:
        radial-gradient(circle at top right, rgba(143, 183, 216, 0.18), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.tt-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(23, 59, 103, 0.08);
    color: var(--tt-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tt-title {
    margin: 0 0 12px;
    font-size: 2.6rem;
    line-height: 1.08;
    font-weight: 700;
    color: var(--tt-primary);
    letter-spacing: -0.03em;
}

.tt-title-sm {
    font-size: 1.5rem;
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.tt-subtitle {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: var(--tt-primary);
    line-height: 1.55;
}

.tt-description {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--tt-muted);
}

.tt-description-center {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* CONTENT */

.tt-content-block {
    padding: 0 38px 28px;
}

.tt-content-block--soft {
    padding-top: 8px;
}

.tt-section-title {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tt-primary);
}

.tt-content-text {
    color: var(--tt-muted);
    line-height: 1.75;
    font-size: 1rem;
}

/* META */

.tt-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 0 38px 28px;
}

.tt-meta-center {
    padding: 0;
    margin: 18px 0 18px;
    grid-template-columns: 1fr;
    gap: 10px;
}

.tt-meta-center-compact {
    max-width: 360px;
}

.tt-meta-box {
    padding: 14px 16px;
    background: #f8fbff;
    border: 1px solid rgba(23, 59, 103, 0.08);
    border-radius: 14px;
}

.tt-meta-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--tt-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.tt-meta-value {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--tt-text);
}

.tt-meta-link {
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    color: inherit;
}

.tt-meta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(23, 59, 103, 0.12);
    color: inherit;
}

/* INSTRUCTOR */

.tt-instructor {
    margin-top: 4px;
}

.tt-instructor-name {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tt-text);
}

.tt-instructor-title {
    margin: 0 0 14px;
    color: var(--tt-muted);
    font-weight: 600;
}

/* FORM */

.tt-form-block {
    padding: 32px 38px 40px;
    border-top: 1px solid var(--tt-line);
}

.tt-form-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tt-primary);
}

.tt-form-subtitle {
    margin: 0 0 28px;
    color: var(--tt-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.tt-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--tt-text);
}

.tt-required {
    color: var(--tt-danger);
    margin-left: 4px;
    font-weight: 700;
}

.tt-input,
.tt-select,
textarea.tt-input {
    min-height: 50px;
    border-radius: 12px;
    border: 1px solid #cfd8e3;
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    background: #fff;
    color: var(--tt-text);
    transition: all 0.2s ease;
}

textarea.tt-input {
    min-height: 120px;
    resize: vertical;
}

.tt-input:focus,
.tt-select:focus,
textarea.tt-input:focus {
    border-color: var(--tt-accent);
    box-shadow: 0 0 0 0.2rem rgba(143, 183, 216, 0.2);
    outline: none;
}

.tt-checkbox-wrap {
    padding: 14px 16px;
    border: 1px solid rgba(23, 59, 103, 0.08);
    border-radius: 14px;
    background: #fbfcfe;
}

.tt-checkbox-wrap .form-check-label {
    color: var(--tt-text);
    line-height: 1.5;
}

/* BUTTONS */

.tt-btn {
    min-width: 160px;
    height: 46px;
    border-radius: 999px;
    background: var(--tt-primary);
    color: #ffffff;
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 22px rgba(23, 59, 103, 0.18);
}

.tt-btn:hover {
    background: var(--tt-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.tt-btn-link {
    background: transparent;
    color: var(--tt-primary);
    border: 1px solid rgba(23, 59, 103, 0.2);
    box-shadow: none;
}

.tt-btn-link:hover {
    background: rgba(23, 59, 103, 0.08);
    color: var(--tt-primary);
    transform: translateY(-1px);
}

/* ALERTS */

.tt-alert {
    padding: 12px 14px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.tt-alert-error {
    background: #fff4f4;
    border: 1px solid #efcaca;
    color: #8a2f2f;
}

/* NOTES */

.tt-note {
    margin-top: 18px;
    font-size: 0.92rem;
    color: var(--tt-muted);
    line-height: 1.6;
}

.tt-note-lg {
    font-size: 0.98rem;
    line-height: 1.65;
    max-width: 100%;
    margin: 8px 0 0;
}

/* SUCCESS / LOGIN / SMALL PANELS */

.tt-success-card {
    padding: 28px 26px;
    text-align: left;
}

.tt-success-mark {
    width: 60px;
    height: 60px;
    background: rgba(23, 59, 103, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 16px;
    font-size: 1.5rem;
    color: var(--tt-primary);
    font-weight: 700;
}

.tt-success-mark-soft {
    font-size: 2rem;
}

/* COURSES */

.tt-course-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tt-course-card {
    border: 1px solid rgba(23, 59, 103, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(23, 59, 103, 0.06);
    overflow: hidden;
    height: 100%;
}

.tt-course-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.tt-course-card__title {
    margin: 0;
    font-weight: 700;
    color: var(--tt-primary);
    font-size: 1.15rem;
    line-height: 1.3;
}

.tt-course-card__subtitle {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tt-text);
    line-height: 1.45;
}

.tt-course-card__text {
    margin: 0;
    color: var(--tt-muted);
    line-height: 1.65;
    font-size: 0.96rem;
    flex-grow: 1;
}

/* CHIPS */

.tt-chip-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tt-chip {
    background: rgba(23, 59, 103, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--tt-primary);
    font-weight: 600;
}

/* SCHEDULE */

.tt-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tt-schedule-item {
    background: #f8fbff;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 59, 103, 0.08);
}

.tt-schedule-item__title {
    margin: 0 0 8px;
    color: var(--tt-primary);
    font-size: 1.02rem;
    font-weight: 700;
}

.tt-schedule-item__text {
    margin: 0 0 6px;
    color: var(--tt-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tt-schedule-item__text:last-child {
    margin-bottom: 0;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .tt-page {
        padding: 28px 16px 40px;
    }

    .tt-page-center {
        padding-top: 28px;
    }

    .tt-wrap,
    .tt-wrap-narrow {
        max-width: 100%;
    }

    .tt-hero,
    .tt-content-block,
    .tt-form-block,
    .tt-meta {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tt-title {
        font-size: 2.1rem;
    }

    .tt-title-sm {
        font-size: 1.35rem;
    }

    .tt-subtitle {
        font-size: 1.02rem;
    }

    .tt-description {
        font-size: 1rem;
    }

    .tt-btn {
        width: 100%;
    }

    .tt-course-grid {
        grid-template-columns: 1fr;
    }

    .tt-success-card {
        padding: 24px 20px;
    }
}

/* ============================= */
/* ADMIN LAYOUT (SIDEBAR) */
/* ============================= */

.tt-admin-shell {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.tt-sidebar {
    width: 260px;
    background: #0f2a4a;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
}

.tt-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.tt-sidebar__logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    color: #0f2a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.tt-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.tt-sidebar__brand-text span {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* NAV */

.tt-sidebar__nav {
    flex: 1;
}

.tt-sidebar__group {
    margin-bottom: 18px;
}

.tt-sidebar__group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 8px;
    padding-left: 6px;
}

.tt-sidebar__link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.tt-sidebar__link:hover {
    background: rgba(255,255,255,0.1);
}

.tt-sidebar__link--disabled {
    opacity: 0.4;
    cursor: default;
}

.tt-sidebar__link--disabled:hover {
    background: transparent;
}

/* FOOTER */

.tt-sidebar__footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
}

.tt-sidebar__user {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.tt-sidebar__user span {
    display: block;
    opacity: 0.6;
    font-size: 0.75rem;
}

.tt-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tt-sidebar__action {
    font-size: 0.8rem;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
}

.tt-sidebar__action:hover {
    opacity: 1;
}

/* MAIN */

.tt-admin-main {
    flex: 1;
    background: var(--tt-bg);
    display: flex;
    flex-direction: column;
}

.tt-admin-topbar {
    padding: 20px 28px 10px;
}

.tt-admin-topbar__title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tt-primary);
}

.tt-admin-content {
    padding: 20px 28px 40px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .tt-sidebar {
        display: none;
    }

    .tt-admin-content,
    .tt-admin-topbar {
        padding: 20px;
    }
}

.tt-admin-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tt-admin-row {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr 0.5fr;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(23, 59, 103, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    align-items: center;
}

.tt-admin-cell {
    font-size: 0.95rem;
}

.tt-admin-sub {
    font-size: 0.85rem;
    color: var(--tt-muted);
    margin-top: 2px;
}

.tt-admin-actions-cell {
    text-align: right;
}

.tt-admin-action {
    color: var(--tt-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.tt-admin-action:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .tt-admin-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .tt-admin-actions-cell {
        text-align: left;
    }

    /* SIDEBAR ACCORDION */

    .tt-sidebar__toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        margin: 0 0 6px;
        border: 0;
        background: transparent;
        color: rgba(255,255,255,0.72);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: left;
        cursor: pointer;
    }

    .tt-sidebar__toggle:hover {
        color: #ffffff;
    }

    .tt-sidebar__caret {
        font-size: 0.9rem;
        transition: transform 0.2s ease;
    }

    .tt-sidebar__toggle.is-open .tt-sidebar__caret {
        transform: rotate(180deg);
    }

    .tt-sidebar__submenu {
        display: none;
        margin-bottom: 10px;
    }

    .tt-sidebar__submenu.is-open {
        display: block;
    }

    .tt-sidebar__link.is-active {
        background: rgba(255,255,255,0.12);
        font-weight: 700;
    }

    .tt-sidebar__group {
        margin-bottom: 8px;
    }

    /* SIDEBAR COLLAPSIBLE WITH DETAILS */

    .tt-sidebar__group {
        margin-bottom: 8px;
    }

    .tt-sidebar__group summary {
        list-style: none;
    }

    .tt-sidebar__group summary::-webkit-details-marker {
        display: none;
    }

    .tt-sidebar__summary {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        margin: 0 0 6px;
        color: rgba(255,255,255,0.72);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        cursor: pointer;
        border-radius: 8px;
    }

    .tt-sidebar__summary:hover {
        color: #ffffff;
        background: rgba(255,255,255,0.06);
    }

    .tt-sidebar__summary::after {
        content: "⌄";
        font-size: 0.9rem;
        transition: transform 0.2s ease;
    }

    .tt-sidebar__group[open] .tt-sidebar__summary::after {
        transform: rotate(180deg);
    }

    .tt-sidebar__submenu {
        margin-bottom: 10px;
    }


}