/* Reusable components: cards, buttons, pills, progress, brand */

.ty-icon {
    width: 1.35em;
    height: 1.35em;
    display: inline-block;
    flex: 0 0 auto;
    color: currentColor;
    vertical-align: -0.22em;
}

.ms-icon {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 1.35em;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    vertical-align: -0.18em;
}

.icon-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.error-panel {
    width: min(460px, 100%);
    padding: 40px 32px;
    text-align: center;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.error-panel .mark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    font-weight: 800;
    font-size: 28px;
    animation: glow-pulse 2s ease-in-out infinite;
}

.card {
    background: var(--glass-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* Brand + logo */
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.eyebrow {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--teal-600);
    text-transform: uppercase;
}

.logo {
    --size: 64px;
    width: var(--size);
    height: var(--size);
    flex: 0 0 auto;
    border-radius: 18px;
    object-fit: contain;
    display: block;
    box-shadow: var(--shadow-sm);
}

.logo.sm {
    --size: 44px;
    border-radius: 12px;
}

.logo.lg {
    --size: 86px;
    border-radius: 24px;
    animation: float-soft 6s ease-in-out infinite;
}

/* Buttons */
.btn {
    border: 0;
    border-radius: var(--radius);
    min-height: 52px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    overflow: visible;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.25s var(--ease), opacity 0.2s var(--ease);
    text-decoration: none !important;
}

.btn *,
button,
button * {
    text-decoration: none !important;
}

.btn .arrow,
.btn .ms-icon {
    display: inline-block;
    transition: transform 0.25s var(--ease);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:hover:not(:disabled) .arrow,
.btn:hover:not(:disabled) .ms-icon.icon-forward {
    transform: translateX(-4px);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    color: #fff;
    background: var(--grad-brand);
    box-shadow: 0 16px 30px -12px rgba(37, 130, 168, 0.75);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 22px 38px -12px rgba(37, 130, 168, 0.85);
}

.btn-success {
    color: #fff;
    background: linear-gradient(120deg, var(--success), #14a77a);
    box-shadow: 0 16px 30px -12px rgba(20, 167, 122, 0.7);
}

.btn-ghost {
    background: var(--glass);
    color: var(--teal-600);
    border: 1px solid var(--line-strong);
}

.btn-ghost:hover:not(:disabled) {
    background: #fff;
}

.btn-fill {
    background: linear-gradient(120deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 14px 28px -12px rgba(124, 58, 237, 0.65);
    font-size: 14px;
    min-height: 44px;
    padding: 0 18px;
    align-self: center;
}

.btn-fill:hover:not(:disabled) {
    box-shadow: 0 18px 32px -12px rgba(124, 58, 237, 0.8);
}

/* Pills / chips */
.pill {
    border-radius: var(--radius-full);
    background: rgba(70, 134, 180, 0.1);
    border: 1px solid var(--line);
    color: var(--blue-600);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Progress */
.progress {
    display: grid;
    gap: 10px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.progress-track {
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(70, 134, 180, 0.14);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(21, 60, 82, 0.12);
}

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--blue), var(--teal));
    background-size: 200% 100%;
    animation: shimmer 2.4s linear infinite;
    transition: width 0.45s var(--ease);
}

/* Stage tracker */
.stages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(70, 134, 180, 0.08);
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s var(--ease);
}

.stage .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    background: rgba(70, 134, 180, 0.18);
    color: var(--blue-600);
}

.stage.active {
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 20px -10px rgba(37, 130, 168, 0.8);
}

.stage.active .dot {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.stage.done {
    color: var(--success);
    background: var(--success-soft);
}

.stage.done .dot {
    background: var(--success);
    color: #fff;
}
