/* Temsilci Panel */
.temsilci-panel {
    --tp-bg: #140f10;
    --tp-card: #1f1719;
    --tp-line: rgba(255, 255, 255, 0.12);
    --tp-text: #ffffff;
    --tp-muted: #e8dede;
    --tp-gold: #ffd27a;
    --tp-red: #9b1010;
    min-height: 70vh;
    padding: 1.5rem 0 3.5rem;
    background:
        radial-gradient(ellipse at top, rgba(155, 16, 16, 0.22), transparent 50%),
        linear-gradient(180deg, #120d0e 0%, #1a1214 100%);
    color: var(--tp-text);
}

.tp-wrap {
    width: min(1040px, calc(100% - 1.75rem));
    margin: 0 auto;
}

.tp-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tp-line);
    border-radius: 14px;
}

.tp-identity {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tp-identity strong,
.tp-title {
    color: #ffffff !important;
    font-weight: 800;
}

.tp-identity strong {
    font-size: 1.08rem;
    letter-spacing: 0.02em;
}

.tp-identity span {
    color: var(--tp-gold) !important;
    font-size: 0.92rem;
    font-weight: 600;
}

.tp-logout {
    color: #fff;
    background: var(--tp-red);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-logout:hover {
    filter: brightness(1.08);
}

.tp-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0 0.85rem;
    margin-bottom: 0.85rem;
    scrollbar-width: thin;
}

.tp-nav-link {
    flex: 0 0 auto;
    text-decoration: none;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--tp-line);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.tp-nav-link.active,
.tp-nav-link:hover {
    background: var(--tp-red);
    border-color: #c12828;
    color: #fff !important;
}

.tp-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin: 0 0 1.15rem;
    font-weight: 800;
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

.tp-stat {
    background: var(--tp-card);
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    padding: 1.1rem 1rem;
    text-align: center;
}

.tp-stat .n {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--tp-gold);
    line-height: 1.1;
}

.tp-stat .l {
    margin-top: 0.4rem;
    color: #f2f2f2 !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.tp-card {
    background: var(--tp-card);
    border: 1px solid var(--tp-line);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.tp-card h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: #ffffff !important;
    font-weight: 800;
}

.tp-card p {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.6;
    color: #f3f3f3 !important;
}

.tp-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
}

.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--tp-red);
    color: #fff !important;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}

.tp-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tp-btn:hover {
    filter: brightness(1.07);
}

.tp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tp-form .form-group {
    margin-bottom: 1rem;
}

.tp-form label,
.temsilci-panel .tp-form label,
.tp-login-box .tp-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.98rem;
    color: #ffffff !important;
}

.tp-form input,
.tp-form select,
.tp-form textarea,
.temsilci-panel .tp-form input,
.temsilci-panel .tp-form select,
.temsilci-panel .tp-form textarea,
.tp-login-box .tp-form input,
.tp-login-box .tp-form select,
.tp-login-box .tp-form textarea {
    width: 100%;
    background: #151012 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    font-size: 1rem;
    -webkit-text-fill-color: #ffffff;
}

.tp-form input:focus,
.tp-form select:focus,
.tp-form textarea:focus,
.tp-login-box .tp-form input:focus {
    outline: none;
    border-color: var(--tp-gold) !important;
    box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.15);
}

.tp-form input::placeholder,
.tp-form textarea::placeholder,
.tp-login-box .tp-form input::placeholder,
.tp-login-box .tp-form textarea::placeholder {
    color: #cfcfcf !important;
    opacity: 1;
}

.tp-form select option {
    background: #151012;
    color: #ffffff;
}

.tp-form input[type="file"] {
    color: #ffffff !important;
    background: #151012 !important;
    padding: 0.7rem;
}

.tp-form input[type="file"]::file-selector-button {
    background: #ffffff;
    color: #111;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    margin-right: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-form small,
.temsilci-panel .tp-form small,
.tp-login-box .tp-form small {
    display: block;
    margin-top: 0.35rem;
    color: #ececec !important;
    font-size: 0.88rem;
}

.tp-alert {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    color: #ffffff !important;
    font-weight: 700;
}

.tp-alert.ok {
    background: rgba(40, 167, 69, 0.28);
    border: 1px solid rgba(90, 210, 120, 0.7);
    color: #d8ffe4 !important;
}

.tp-alert.err {
    background: rgba(220, 53, 69, 0.28);
    border: 1px solid rgba(255, 120, 130, 0.7);
    color: #ffd6da !important;
}

.tp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.tp-table th,
.tp-table td {
    text-align: left;
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    vertical-align: top;
    font-size: 0.95rem;
    color: #ffffff !important;
}

.tp-table th {
    color: var(--tp-gold) !important;
    font-weight: 800;
}

.tp-badge {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.tp-badge.beklemede { background: #f0ad4e; color: #222; }
.tp-badge.onaylandi { background: #28a745; color: #fff; }
.tp-badge.reddedildi { background: #dc3545; color: #fff; }

.tp-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}

.tp-list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tp-list-item a {
    color: var(--tp-gold) !important;
    text-decoration: none;
    font-weight: 700;
}

.tp-list-item strong {
    color: #ffffff !important;
}

.tp-list-item span {
    color: var(--tp-muted) !important;
}

.tp-login-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at top, rgba(155, 16, 16, 0.25), transparent 52%),
        #100c0d;
}

.tp-login-box {
    width: min(420px, 100%);
    background: #1f1719;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 1.7rem;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.tp-login-box h1 {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    color: #ffffff !important;
    font-weight: 800;
}

.tp-login-box > p {
    margin: 0 0 1.35rem;
    color: #f0f0f0 !important;
    font-size: 0.98rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .tp-grid,
    .tp-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tp-grid,
    .tp-actions {
        grid-template-columns: 1fr;
    }
    .tp-table {
        min-width: 520px;
    }
    .tp-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
