@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --up2-yellow: #F5C518;
    --up2-yellow-hover: #E5B815;
    --up2-black: #0F0F0F;
    --up2-red: #E53935;
    --up2-success: #2E8B57;
    --up2-warning: #E0A526;
    --up2-blue: #3A6EA5;
    --up2-dark-surface: #1E1E1E;
    --up2-light: #F7F7F5;
    --up2-border: #E5E5E5;
    --up2-muted: #6B7280;
    --up2-muted-dark: #B3B3B3;
    --up2-white: #FFFFFF;
    --font-head: 'Montserrat', Arial, Helvetica, sans-serif;
    --font-body: 'Inter', Arial, Helvetica, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-card: 16px;
    --radius-button: 12px;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--up2-light);
    color: var(--up2-black);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--font-head);
    letter-spacing: -0.03em;
}

h1,
.h1 {
    font-weight: 800;
}

h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5 {
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--up2-black);
    font-weight: 600;
    text-decoration-color: rgba(245, 197, 24, 0.7);
    text-underline-offset: 4px;
}

a:hover {
    color: var(--up2-black);
    text-decoration-color: var(--up2-yellow);
}

.app-navbar {
    background: var(--up2-black);
    border-bottom: 3px solid var(--up2-yellow);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--up2-white) !important;
    font-size: 1rem;
    font-weight: 800;
}

.navbar-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
}

.brand-subtitle {
    display: block;
    color: var(--up2-muted-dark);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--up2-yellow);
}

.navbar-dark .navbar-nav .nav-link.active {
    background: rgba(245, 197, 24, 0.14);
    color: var(--up2-yellow);
    font-weight: 800;
}

.app-container {
    max-width: 1480px;
    padding: 32px;
}

.card {
    border: 1px solid var(--up2-border);
    border-radius: var(--radius-card);
    background: var(--up2-white);
    box-shadow: var(--shadow-soft);
}

.card-dark {
    background: var(--up2-dark-surface);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--up2-white);
}

.stat-card {
    min-height: 118px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--up2-yellow);
}

.stat-value {
    color: var(--up2-black);
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
}

.text-muted,
.form-text,
.form-hint {
    color: var(--up2-muted) !important;
}

.form-hint {
    font-size: 0.9rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--up2-black);
    color: var(--up2-yellow);
    border-color: rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
    border-color: var(--up2-border);
}

.btn {
    border-radius: var(--radius-button);
    font-weight: 700;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sm {
    min-height: 34px;
    border-radius: 10px;
}

.btn-primary {
    background: var(--up2-yellow);
    border-color: var(--up2-yellow);
    color: var(--up2-black);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--up2-yellow-hover) !important;
    border-color: var(--up2-yellow-hover) !important;
    color: var(--up2-black) !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--up2-yellow);
    color: var(--up2-black);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--up2-yellow) !important;
    border-color: var(--up2-yellow) !important;
    color: var(--up2-black) !important;
}

.btn-outline-light:hover {
    background: var(--up2-yellow);
    border-color: var(--up2-yellow);
    color: var(--up2-black);
}

.btn-danger,
.btn-outline-danger:hover,
.text-bg-danger {
    background-color: var(--up2-red) !important;
    border-color: var(--up2-red) !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    color: var(--up2-red);
    border-color: var(--up2-red);
}

.btn-outline-secondary {
    border-color: #d1d5db;
    color: #374151;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: var(--up2-black);
    padding: 0;
}

.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px;
    background: radial-gradient(circle at 18% 16%, rgba(245, 197, 24, 0.18), transparent 32%), var(--up2-black);
    color: var(--up2-white);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-panel img {
    width: 188px;
    max-width: 70%;
    height: auto;
    border-radius: 18px;
}

.auth-brand-panel h1 {
    max-width: 520px;
    margin-top: 42px;
    color: var(--up2-yellow);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.08;
}

.auth-brand-panel p {
    max-width: 520px;
    color: var(--up2-muted-dark);
    font-size: 1.06rem;
}

.auth-panel-footer {
    color: var(--up2-muted-dark);
    font-size: 0.9rem;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
    background: var(--up2-light);
}

.login-card,
.register-card {
    width: 100%;
    border: 1px solid var(--up2-border);
    border-radius: 22px;
    background: var(--up2-white);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.login-card {
    max-width: 440px;
}

.register-card {
    max-width: 760px;
}

.form-label {
    font-weight: 700;
    color: var(--up2-black);
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: #d1d5db;
    border-radius: 12px;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--up2-yellow);
    box-shadow: 0 0 0 0.2rem rgba(245, 197, 24, 0.22);
}

.role-card {
    display: block;
    height: 100%;
    padding: 18px;
    border: 2px solid var(--up2-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--up2-black);
    background: var(--up2-white);
    transition: 0.15s ease;
}

.role-card:hover {
    border-color: var(--up2-yellow);
    transform: translateY(-1px);
}

.role-card span {
    display: block;
    color: var(--up2-muted);
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 500;
}

.role-card.active {
    border-color: var(--up2-yellow);
    box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.2);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 3px solid rgba(245, 197, 24, 0.55);
}

.page-header h1 {
    color: var(--up2-black);
}

.code-pill,
.code-box {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--up2-black);
    border: 1px solid rgba(245, 197, 24, 0.45);
    color: var(--up2-yellow);
    font-family: var(--font-mono);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.code-box {
    display: block;
    text-align: center;
    font-size: 1.25rem;
    border-radius: 14px;
    padding: 14px;
}

.sticky-card {
    position: sticky;
    top: 96px;
}

.empty-state {
    border: 1px dashed #d1d5db;
    border-radius: 18px;
    background: #ffffff;
    padding: 28px;
    text-align: center;
    color: var(--up2-muted);
}

.empty-state h1,
.empty-state h2,
.empty-state h3 {
    color: var(--up2-black);
}

.small-state {
    padding: 18px;
    text-align: left;
}

.project-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge {
    font-weight: 800;
    border-radius: 999px;
    padding: 0.45em 0.7em;
}

.text-bg-primary {
    background-color: var(--up2-blue) !important;
}

.text-bg-secondary {
    background-color: #6b7280 !important;
}

.text-bg-warning {
    background-color: var(--up2-warning) !important;
    color: var(--up2-black) !important;
}

.text-bg-success {
    background-color: var(--up2-success) !important;
}

.text-bg-info {
    background-color: var(--up2-blue) !important;
    color: #ffffff !important;
}

.alert-info {
    background: rgba(58, 110, 165, 0.12);
    color: #14365a;
    border-color: rgba(58, 110, 165, 0.24);
}

.alert-success {
    background: rgba(46, 139, 87, 0.13);
    color: #14532d;
    border-color: rgba(46, 139, 87, 0.24);
}

.alert-danger {
    background: rgba(229, 57, 53, 0.12);
    color: #8f1f1b;
    border-color: rgba(229, 57, 53, 0.24);
}

.list-group-item {
    border-color: var(--up2-border);
}

.modal-content {
    background: #ffffff;
    color: #111827;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal-backdrop.show {
    opacity: 0.45;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    background: #ffffff;
    color: #111827;
}

.up2-footer {
    margin-top: 48px;
    padding: 24px 32px;
    border-top: 1px solid var(--up2-border);
    color: var(--up2-muted);
    font-size: 0.9rem;
}

.up2-footer img {
    width: 110px;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 991px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 32px 24px;
    }

    .auth-brand-panel h1 {
        margin-top: 28px;
    }

    .sticky-card {
        position: static;
    }

    .app-container {
        padding: 18px;
    }

    .stat-value {
        font-size: 1.45rem;
    }

    .page-header {
        align-items: flex-start;
    }
}

.task-title-link {
    color: var(--up2-black);
    text-decoration: none;
}

.task-title-link:hover {
    color: var(--up2-yellow-hover);
    text-decoration: underline;
}

.mini-metric {
    border: 1px solid var(--up2-border);
    border-radius: 14px;
    padding: 14px;
    background: var(--up2-light);
    height: 100%;
}

.mini-metric span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 4px;
}

.mini-metric strong {
    color: var(--up2-black);
    font-family: var(--font-head);
}

.practice-progress {
    height: 14px;
    background: #e9e5d8;
    border-radius: 999px;
    overflow: hidden;
}

.practice-progress .progress-bar {
    background: var(--up2-yellow);
}

.small-progress {
    height: 8px;
    min-width: 120px;
}

.file-list .list-group-item {
    border-color: var(--up2-border);
}

/* V11 modal javítás: a modalt nem tesszük táblázaton belülre, és biztosítjuk a rendes kattinthatóságot. */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

.modal-dialog {
    pointer-events: auto;
}

.modal-content {
    position: relative;
    z-index: 1060;
    background: #ffffff;
    color: #111827;
    opacity: 1;
}

.modal-content .form-control,
.modal-content .form-select,
.modal-content textarea,
.modal-content input {
    pointer-events: auto;
}


.subtask-create-panel > summary {
    list-style: none;
    cursor: pointer;
}

.subtask-create-panel > summary::-webkit-details-marker {
    display: none;
}

.mini-metric small {
    display: block;
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 500;
}

.feedback-list {
    display: grid;
    gap: 12px;
}

.feedback-item {
    border: 1px solid var(--up2-border);
    border-radius: 14px;
    background: #fff;
    padding: 14px 16px;
}

.feedback-employer {
    border-left: 4px solid var(--up2-yellow);
}

.feedback-intern {
    border-left: 4px solid #d1d5db;
}

/* V26: átláthatóbb feladatlista, kattintható statisztikai kártyák és kompakt táblázat. */
.stat-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-link:hover,
.stat-link:focus {
    color: inherit;
    border-color: rgba(245, 197, 24, 0.72);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

.stat-link small {
    color: var(--up2-muted);
    font-weight: 600;
}

.task-table-wrap {
    width: 100%;
    overflow-x: visible;
}

.task-table {
    table-layout: fixed;
    width: 100%;
}

.task-table th,
.task-table td {
    white-space: normal;
}

.task-table thead a {
    color: var(--up2-yellow);
    text-decoration: none;
}

.task-table thead a:hover {
    text-decoration: underline;
}

.task-table th:nth-child(1),
.task-table td:nth-child(1) {
    width: 120px;
}

.task-table th:nth-child(3),
.task-table td:nth-child(3) {
    width: 140px;
}

.task-table th:nth-child(4),
.task-table td:nth-child(4) {
    width: 150px;
}

.task-table th:nth-child(5),
.task-table td:nth-child(5) {
    width: 140px;
}

.task-main-cell {
    min-width: 0;
}

.task-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-meta-line span {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 700;
}

.task-time-cell strong {
    font-family: var(--font-head);
}

.deadline-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
}

@media (max-width: 1199px) {
    .task-table {
        table-layout: auto;
    }

    .task-table-wrap {
        overflow-x: auto;
    }
}

/* v28: Feladatok oldal kártyák és időoszlop finomítása */
.task-summary-row .col-md-6,
.task-summary-row .col-xl-2 {
    display: flex;
}

.task-summary-card {
    width: 100%;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.task-summary-card .stat-label {
    display: block;
    color: var(--up2-muted);
    font-weight: 700;
    line-height: 1.2;
}

.task-summary-card .stat-value {
    display: block;
    white-space: nowrap;
    font-size: clamp(1.55rem, 2vw, 1.9rem);
    line-height: 1.08;
}

.task-summary-card .stat-caption,
.task-summary-card .stat-action {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 3px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
}

.task-summary-card .stat-caption {
    color: var(--up2-muted);
}

.task-summary-card .stat-action {
    color: var(--up2-black);
    background: rgba(245, 197, 24, 0.22);
    border: 1px solid rgba(245, 197, 24, 0.55);
    border-radius: 999px;
    padding: 4px 9px;
}

.stat-link.task-summary-card:hover .stat-action,
.stat-link.task-summary-card:focus .stat-action {
    background: var(--up2-yellow);
}

.task-time-cell {
    min-width: 150px;
}

.task-time-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.92rem;
    line-height: 1.35;
}

.task-time-line span {
    color: var(--up2-muted);
    font-size: 0.84rem;
}

.task-time-line strong {
    white-space: nowrap;
}
