﻿/* Cards */
.tf-card {
    border: 1px solid var(--tf-border);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-soft);
}

.tf-card-body {
    padding: 18px;
}

.tf-card-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px;
}

.tf-card-subtitle {
    margin: 0;
    color: var(--tf-muted);
}

/* Buttons */
.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--tf-border);
    background: rgba(255,255,255,0.05);
    color: var(--tf-text);
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
    user-select: none;
}

    .tf-btn:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.16);
    }

    .tf-btn:active {
        transform: translateY(0px);
    }

.tf-btn-primary {
    border-color: rgba(34,197,94,0.35);
    background: linear-gradient(180deg, rgba(34,197,94,0.22), rgba(34,197,94,0.12));
}

    .tf-btn-primary:hover {
        border-color: rgba(34,197,94,0.55);
        background: linear-gradient(180deg, rgba(34,197,94,0.28), rgba(34,197,94,0.16));
    }

.tf-btn-ghost {
    background: transparent;
    border-color: transparent;
}

    .tf-btn-ghost:hover {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.10);
    }

.tf-btn-disabled, .tf-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Badges */
.tf-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--tf-border);
    background: rgba(255,255,255,0.05);
    color: var(--tf-muted);
    font-size: 12px;
    font-weight: 700;
}

.tf-badge-ok {
    border-color: rgba(34,197,94,0.35);
    color: rgba(34,197,94,0.95);
    background: rgba(34,197,94,0.10);
}

.tf-badge-warn {
    border-color: rgba(245,158,11,0.35);
    color: rgba(245,158,11,0.95);
    background: rgba(245,158,11,0.10);
}

.tf-badge-bad {
    border-color: rgba(239,68,68,0.35);
    color: rgba(239,68,68,0.95);
    background: rgba(239,68,68,0.10);
}

/* Alerts */
.tf-alert {
    border-radius: var(--tf-radius-sm);
    border: 1px solid var(--tf-border);
    background: rgba(255,255,255,0.05);
    padding: 12px 14px;
}

.tf-alert-ok {
    border-color: rgba(34,197,94,0.35);
    background: rgba(34,197,94,0.10);
}

.tf-alert-warn {
    border-color: rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.10);
}

.tf-alert-bad {
    border-color: rgba(239,68,68,0.35);
    background: rgba(239,68,68,0.10);
}

/* Forms */
.tf-input, .tf-select, .tf-textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--tf-border);
    background: rgba(255,255,255,0.04);
    padding: 12px 12px;
    color: var(--tf-text);
}

    .tf-input:focus, .tf-select:focus, .tf-textarea:focus {
        outline: none;
        border-color: rgba(34,197,94,0.4);
        box-shadow: var(--tf-ring);
    }


/* Button loader */
.tf-btn .tf-btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.22);
    border-top-color: rgba(255,255,255,0.88);
    animation: tfspin 0.9s linear infinite;
}

.tf-btn[aria-busy="true"] {
    cursor: wait;
}

    .tf-btn[aria-busy="true"] .tf-btn-label {
        opacity: 0.9;
    }


/* Better selects */
.tf-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 14px center;
    background-size: auto, 18px 18px;
}

    .tf-select::-ms-expand {
        display: none;
    }

    /* Dropdown list colors (Chrome/Edge usually respects this) */
    .tf-select option {
        background: var(--tf-bg);
        color: var(--tf-text);
    }

    /* When open, keep it dark (some browsers still control this natively) */
    .tf-select:focus {
        outline: none;
    }

/* Select: lepsza wysokość i czytelność */
.tf-select {
    min-height: 46px;
    line-height: 1.2;
    padding-top: 12px;
    padding-bottom: 12px;
}

    /* Żeby w Windows nie waliło białą czcionką na białym tle po zaznaczeniu */
    .tf-select:focus {
        background-color: rgba(255,255,255,0.06);
    }

/* Spróbuj wymusić dark dropdown w nowszych przeglądarkach */
.tf-select, .tf-input, .tf-textarea {
    color-scheme: dark;
}

    /* Opcje: jeśli przeglądarka respektuje */
    .tf-select option {
        padding: 10px;
    }


.tf-field-label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,0.86);
    margin-bottom: 6px;
}
