/* ArtisanHub design overrides for Tailwind base */
:root {
    --brand: #f05a28;
}

.al-backend-body {
    background: #f3f2ef;
    color: #1f2937;
}

.al-backend-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.al-backend-topbar-inner {
    max-width: 1128px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.al-backend-brand {
    font-weight: 800;
    color: #0a66c2;
    text-decoration: none;
    font-size: 1.25rem;
}

.al-backend-search-wrap {
    min-width: 180px;
    flex: 1;
}

.al-backend-search {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.45rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    background: #eef3f8;
}

.al-backend-topnav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.al-backend-topnav-link {
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
    text-decoration: none;
}

.al-backend-topnav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.al-backend-shell {
    max-width: 1128px;
    margin: 1.25rem auto 0;
    padding: 0 1rem 2rem;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 260px;
    gap: 1rem;
}

.al-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.al-side-link {
    display: block;
    border-radius: 0.5rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
}

.al-side-link:hover {
    background: #f1f5f9;
}

.al-side-link.active {
    background: #e8f3ff;
    color: #0a66c2;
}

.al-backend-main > section {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
}

@media (max-width: 1023px) {
    .al-backend-shell {
        grid-template-columns: 1fr;
    }

    .al-backend-right {
        order: 3;
    }

    .al-backend-left {
        order: 1;
    }
}

html,
body {
    min-height: 100%;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

main {
    padding-bottom: 5.5rem;
}

@media (min-width: 768px) {
    main {
        padding-bottom: 2rem;
    }
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tiktok-shell {
    margin: 0 auto;
    max-width: 1200px;
    padding: 1rem 0.75rem 6rem;
}

@media (min-width: 768px) {
    .tiktok-shell {
        padding: 1.5rem 1.5rem 3rem;
    }
}

.tiktok-feed {
    display: grid;
    gap: 1.5rem;
}

.tiktok-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #1e293b;
}

@media (min-width: 1024px) {
    .tiktok-card {
        grid-template-columns: minmax(0, 1fr) 320px;
        min-height: 520px;
    }
}

.tiktok-video {
    position: relative;
    background: #0b1220;
    min-height: 60vh;
}

.tiktok-video video,
.tiktok-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tiktok-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    color: #f8fafc;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.85) 100%);
}

.tiktok-meta {
    font-size: 0.9rem;
}

.tiktok-meta h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.tiktok-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.tiktok-actions button {
    border: 1px solid #334155;
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tiktok-actions button.active {
    background: #f97316;
    border-color: #f97316;
    color: #0f172a;
}

.tiktok-side {
    background: #ffffff;
    color: #0f172a;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tiktok-side h4 {
    font-size: 1rem;
    font-weight: 700;
}

.tiktok-side .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
}

.tiktok-side .cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.75rem;
    background: #0f172a;
    color: #fff;
    padding: 0.7rem 1rem;
    font-weight: 700;
    text-decoration: none;
}

.tiktok-empty {
    margin-top: 2rem;
    text-align: center;
    color: #64748b;
}

.tiktok-comments {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 60;
    padding: 1rem;
}

.tiktok-comments-card {
    background: #fff;
    border-radius: 1rem;
    width: min(720px, 100%);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tiktok-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tiktok-comments-list {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tiktok-comments-item {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
}

.tiktok-comments-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
}

.tiktok-comments-form input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
}

.tiktok-comments-form button {
    border: none;
    background: #f97316;
    color: #0f172a;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
}

@media (max-width: 640px) {
    .tiktok-shell {
        padding: 0.75rem 0.5rem 7rem;
    }

    .tiktok-card {
        border-radius: 1rem;
    }

    .tiktok-video {
        min-height: 70vh;
    }

    .tiktok-overlay {
        padding: 0.9rem;
    }

    .tiktok-meta h3 {
        font-size: 1rem;
    }

    .tiktok-actions {
        gap: 0.5rem;
    }

    .tiktok-actions button {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .tiktok-side {
        padding: 1rem;
        gap: 0.75rem;
    }

    .tiktok-side .cta {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .tiktok-comments-card {
        max-height: 85vh;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .tiktok-card {
        grid-template-columns: 1fr;
    }

    .tiktok-video {
        min-height: 60vh;
    }

    .tiktok-side {
        border-top: 1px solid #e2e8f0;
    }
}
