@import url('/assets/css/universities.css');

:root {
    --tvet-primary: #0f4fb7;
    --tvet-primary-2: #12357d;
    --tvet-accent: #12b886;
    --tvet-bg: #f3f7fd;
    --tvet-surface: #ffffff;
    --tvet-text: #14283f;
    --tvet-muted: #637a95;
    --tvet-border: #d6e0ec;
    --tvet-warning: #e8a317;
    --tvet-danger: #d74a64;
    --tvet-radius-sm: 10px;
    --tvet-radius-md: 14px;
    --tvet-radius-lg: 20px;
    --tvet-shadow-soft: 0 8px 24px rgba(17, 40, 73, 0.09);
    --tvet-shadow-card: 0 18px 36px rgba(17, 40, 73, 0.14);
    --tvet-space-1: 4px;
    --tvet-space-2: 8px;
    --tvet-space-3: 12px;
    --tvet-space-4: 16px;
    --tvet-space-5: 20px;
    --tvet-space-6: 24px;
    --tvet-space-7: 32px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --tvet-bg: #0f1722;
        --tvet-surface: #182434;
        --tvet-text: #eef3fb;
        --tvet-muted: #a5bbd3;
        --tvet-border: #2a3d55;
        --tvet-primary: #86aeff;
        --tvet-primary-2: #9cc0ff;
        --tvet-accent: #66e8cb;
        --tvet-warning: #ffd36f;
        --tvet-danger: #ff849f;
    }
}

.tvet-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(15, 79, 183, 0.11), transparent 32%), var(--tvet-bg);
    color: var(--tvet-text);
}

.tvet-wrap {
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--tvet-space-7) var(--tvet-space-4);
}

.tvet-hero {
    display: flex;
    justify-content: space-between;
    gap: var(--tvet-space-5);
    align-items: flex-start;
    margin-bottom: var(--tvet-space-6);
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-lg);
    box-shadow: var(--tvet-shadow-soft);
    background: linear-gradient(140deg, rgba(15, 79, 183, 0.12), rgba(18, 184, 134, 0.08));
    padding: var(--tvet-space-6);
}

.tvet-hero__head {
    display: flex;
    gap: var(--tvet-space-4);
    align-items: flex-start;
}

.tvet-hero__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--tvet-primary), var(--tvet-primary-2));
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(15, 79, 183, 0.28);
}

.tvet-hero h1 {
    margin: 0 0 var(--tvet-space-2);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-size: clamp(1.55rem, 2.9vw, 2.2rem);
}

.tvet-hero p {
    margin: 0;
    color: var(--tvet-muted);
    max-width: 760px;
}

.tvet-last-updated {
    display: inline-flex;
    align-items: center;
    gap: var(--tvet-space-2);
    border: 1px solid var(--tvet-border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
    color: var(--tvet-muted);
    background: var(--tvet-surface);
}

.tvet-note {
    margin-bottom: var(--tvet-space-6);
    border: 1px solid rgba(15, 79, 183, 0.22);
    border-radius: var(--tvet-radius-md);
    background: linear-gradient(150deg, rgba(15, 79, 183, 0.1), rgba(18, 184, 134, 0.07));
    padding: var(--tvet-space-4);
    display: flex;
    gap: var(--tvet-space-3);
    align-items: flex-start;
}

.tvet-controls {
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-lg);
    box-shadow: var(--tvet-shadow-soft);
    background: var(--tvet-surface);
    padding: var(--tvet-space-5);
    margin-bottom: var(--tvet-space-6);
}

.tvet-controls__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: var(--tvet-space-4);
    align-items: end;
}

.tvet-field label {
    display: block;
    font-size: 0.84rem;
    color: var(--tvet-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.tvet-input-wrap {
    position: relative;
}

.tvet-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--tvet-muted);
}

.tvet-input,
.tvet-select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--tvet-border);
    border-radius: 999px;
    background: #f8fbff;
    color: var(--tvet-text);
    padding: 0 14px 0 36px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tvet-input:focus,
.tvet-select:focus,
.tvet-btn:focus,
.tvet-icon-btn:focus,
.tvet-pagination button:focus {
    outline: 0;
    border-color: var(--tvet-primary);
    box-shadow: 0 0 0 3px rgba(15, 79, 183, 0.2);
}

.tvet-btn {
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--tvet-border);
    background: var(--tvet-surface);
    color: var(--tvet-text);
    font-weight: 600;
    cursor: pointer;
    padding: 0 18px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.tvet-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--tvet-shadow-soft);
}

.tvet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tvet-space-5);
}

.tvet-card {
    position: relative;
    border-radius: var(--tvet-radius-lg);
    border: 1px solid var(--tvet-border);
    background: var(--tvet-surface);
    box-shadow: var(--tvet-shadow-soft);
    padding: var(--tvet-space-5);
    overflow: hidden;
    animation: tvetFadeIn 0.35s ease forwards;
    opacity: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tvet-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--tvet-primary), var(--tvet-accent));
}

.tvet-card:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 79, 183, 0.35);
    box-shadow: var(--tvet-shadow-card);
}

.tvet-card__top {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--tvet-space-4);
}

.tvet-brand {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    border: 1px solid var(--tvet-border);
    background: #f8fbff;
    box-shadow: 0 4px 12px rgba(15, 79, 183, 0.15);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.tvet-brand img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.tvet-brand__placeholder {
    width: 84%;
    height: 84%;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--tvet-primary), var(--tvet-primary-2));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.tvet-card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.tvet-province {
    margin-top: 5px;
    color: var(--tvet-muted);
    font-size: 0.9rem;
}

.tvet-badge {
    display: inline-flex;
    margin: var(--tvet-space-2) 0 var(--tvet-space-4);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.77rem;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: var(--tvet-primary-2);
    background: rgba(15, 79, 183, 0.12);
}

.tvet-status {
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-md);
    background: #f8fbff;
    padding: var(--tvet-space-3);
    margin-bottom: var(--tvet-space-4);
}

.tvet-status__label {
    margin: 0 0 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tvet-muted);
    font-weight: 700;
}

.tvet-status__text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--tvet-text);
}

.tvet-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tvet-space-3);
}

.tvet-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid rgba(15, 79, 183, 0.35);
    background: linear-gradient(145deg, var(--tvet-primary), var(--tvet-primary-2));
    color: #fff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 10px 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tvet-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--tvet-shadow-card);
}

.tvet-icon-btn-wrap {
    position: relative;
}

.tvet-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--tvet-border);
    background: #f8fbff;
    color: var(--tvet-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tvet-icon-btn:hover {
    transform: translateY(-1px) scale(1.03);
    color: var(--tvet-warning);
    border-color: var(--tvet-warning);
}

.tvet-icon-btn[data-saved="true"] {
    color: var(--tvet-warning);
    border-color: var(--tvet-warning);
    animation: tvetPulse 0.4s ease;
}

.tvet-tooltip {
    position: absolute;
    right: 0;
    top: -34px;
    background: var(--tvet-text);
    color: #fff;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tvet-icon-btn-wrap:hover .tvet-tooltip,
.tvet-icon-btn-wrap:focus-within .tvet-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.tvet-skeleton {
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-lg);
    background: var(--tvet-surface);
    padding: var(--tvet-space-5);
}

.tvet-shimmer {
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(209, 222, 238, 0.55) 25%, rgba(190, 210, 232, 0.85) 37%, rgba(209, 222, 238, 0.55) 63%);
    background-size: 400% 100%;
    animation: tvetShimmer 1.25s ease infinite;
}

.tvet-empty,
.tvet-error {
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-lg);
    background: var(--tvet-surface);
    box-shadow: var(--tvet-shadow-soft);
    text-align: center;
    padding: var(--tvet-space-7) var(--tvet-space-5);
}

.tvet-error {
    border-color: rgba(215, 74, 100, 0.22);
}

.tvet-error p {
    color: var(--tvet-danger);
}

.tvet-pagination {
    margin-top: var(--tvet-space-6);
    border: 1px solid var(--tvet-border);
    border-radius: var(--tvet-radius-md);
    background: var(--tvet-surface);
    box-shadow: var(--tvet-shadow-soft);
    padding: var(--tvet-space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--tvet-space-4);
    flex-wrap: wrap;
}

.tvet-pagination__meta {
    color: var(--tvet-muted);
    font-size: 0.9rem;
}

.tvet-pagination__controls {
    display: flex;
    align-items: center;
    gap: var(--tvet-space-2);
}

.tvet-pagination button {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--tvet-border);
    background: #f8fbff;
    color: var(--tvet-text);
    font-weight: 600;
    padding: 0 14px;
    cursor: pointer;
}

.tvet-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tvet-hidden {
    display: none !important;
}

.tvet-footer {
    margin-top: var(--tvet-space-7);
    padding: var(--tvet-space-6) var(--tvet-space-4);
    background: #0b1424;
    color: #eef3fb;
}

.tvet-footer__inner {
    max-width: 1220px;
    margin: 0 auto;
    text-align: center;
}

.tvet-footer__sub {
    margin-top: 8px;
    color: #9fb2c9;
}

@keyframes tvetFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tvetShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes tvetPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@media (max-width: 1024px) {
    .tvet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tvet-controls__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .tvet-wrap { padding: var(--tvet-space-5) var(--tvet-space-3); }
    .tvet-grid { grid-template-columns: 1fr; }
    .tvet-controls__grid { grid-template-columns: 1fr; }
    .tvet-hero { flex-direction: column; }
    .tvet-hero__icon { width: 46px; height: 46px; }
}
