/* ──────────────────────────────────────────────
   UGTT Digital — Front-end styles (forum, library, dashboard)
   ────────────────────────────────────────────── */

/* ─── Auth pages (login / register) ─── */
.ugtt-auth-wrap {
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: #f0f4f8;
}

.ugtt-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.ugtt-auth-card-lg {
    max-width: 640px;
}

.ugtt-auth-header {
    background: linear-gradient(135deg, #c8102e, #9b0d23);
    color: #fff;
    padding: 32px 28px;
    text-align: center;
}

.ugtt-auth-logo {
    width: 56px;
    height: 56px;
    background: #fff;
    color: #c8102e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    margin: 0 auto 12px;
}

.ugtt-auth-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #fff;
}

.ugtt-auth-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

.ugtt-auth-form {
    padding: 28px;
}

.ugtt-auth-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.ugtt-auth-footer a {
    color: #c8102e;
    text-decoration: none;
}

.ugtt-auth-footer a:hover {
    text-decoration: underline;
}

/* ─── Alerts ─── */
.ugtt-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 28px 16px;
    font-size: 14px;
    line-height: 1.4;
}

.ugtt-alert-error {
    background: #fce4e4;
    color: #dc2626;
    border: 1px solid #f5c6c6;
}

.ugtt-alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.ugtt-alert-warning {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde047;
}

/* ─── Form fields ─── */
.ugtt-field {
    margin-bottom: 16px;
}

.ugtt-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}

.ugtt-field input[type="text"],
.ugtt-field input[type="email"],
.ugtt-field input[type="password"],
.ugtt-field input[type="tel"],
.ugtt-field input[type="url"],
.ugtt-field select,
.ugtt-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ugtt-field input:focus,
.ugtt-field select:focus,
.ugtt-field textarea:focus {
    border-color: #c8102e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}

.ugtt-field input[disabled] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.ugtt-field small {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.ugtt-row {
    display: flex;
    gap: 16px;
}

.ugtt-col {
    flex: 1;
}

/* ─── Buttons ─── */
.ugtt-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
}

.ugtt-btn-primary {
    background: #c8102e;
    color: #fff;
}

.ugtt-btn-primary:hover {
    background: #a50d25;
    color: #fff;
}

.ugtt-btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.ugtt-btn-secondary:hover {
    background: #cbd5e1;
}

.ugtt-btn-full {
    width: 100%;
    text-align: center;
}

.ugtt-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.ugtt-btn-danger {
    background: #ef4444;
    color: #fff;
}
.ugtt-btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

/* ─── Dashboard ─── */
.ugtt-dashboard-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ugtt-dash-layout {
    display: flex;
    gap: 24px;
}

.ugtt-dash-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.ugtt-dash-content {
    flex: 1;
    min-width: 0;
}

.ugtt-dash-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.ugtt-dash-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    transition: all 0.15s;
}

.ugtt-dash-menu a:last-child {
    border-bottom: none;
}

.ugtt-dash-menu a:hover,
.ugtt-dash-menu a.active {
    background: #c8102e;
    color: #fff;
}

.ugtt-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.ugtt-dash-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ugtt-dash-avatar img {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.ugtt-dash-user h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
}

.ugtt-dash-user p {
    margin: 2px 0 0;
    font-size: 14px;
    color: #64748b;
}

.ugtt-dash-actions {
    display: flex;
    gap: 8px;
}

/* ─── Stats cards ─── */
.ugtt-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ugtt-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 14px;
}

.ugtt-stat-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
}

.ugtt-stat-card strong {
    display: block;
    font-size: 16px;
    color: #1e293b;
}

.ugtt-stat-card small {
    font-size: 12px;
    color: #94a3b8;
}

/* ─── Sections ─── */
.ugtt-dash-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
}

.ugtt-dash-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #1e293b;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* ─── Table ─── */
.ugtt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ugtt-table th,
.ugtt-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ugtt-table th {
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ugtt-table td {
    color: #1e293b;
}

.ugtt-empty {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ─── Events list ─── */
.ugtt-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ugtt-event-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.ugtt-event-date {
    text-align: center;
    min-width: 48px;
}

.ugtt-event-date strong {
    display: block;
    font-size: 20px;
    color: #c8102e;
    line-height: 1.2;
}

.ugtt-event-date small {
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
}

.ugtt-event-info strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
}

.ugtt-event-info small {
    font-size: 12px;
    color: #94a3b8;
}

/* ─── Card page ─── */
.ugtt-card-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ugtt-card-actions-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.ugtt-card-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.ugtt-card-info {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ugtt-card-info h3 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 8px;
}

.ugtt-card-info ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 20px;
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
}

.ugtt-copy-field {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ugtt-copy-field input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
}

/* ─── Profile form ─── */
.ugtt-profile-form {
    max-width: 600px;
}

/* ─── FORUM ─── */
.ugtt-forum-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ugtt-forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ugtt-forum-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
}

.ugtt-forum-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ugtt-forum-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.ugtt-forum-search input:focus {
    border-color: #c8102e;
    outline: none;
}

.ugtt-forum-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ugtt-cat-btn {
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.ugtt-cat-btn:hover,
.ugtt-cat-btn.active {
    background: #c8102e;
    color: #fff;
    border-color: #c8102e;
}

.ugtt-forum-topics {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.ugtt-topic-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.ugtt-topic-item:last-child {
    border-bottom: none;
}

.ugtt-topic-item:hover {
    background: #f8fafc;
}

.ugtt-topic-icon {
    font-size: 20px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.ugtt-topic-info {
    flex: 1;
    min-width: 0;
}

.ugtt-topic-info strong {
    display: block;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 4px;
}

.ugtt-topic-meta {
    font-size: 12px;
    color: #94a3b8;
}

.ugtt-topic-meta span {
    margin-right: 12px;
}

.ugtt-topic-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.ugtt-topic-badge.pinned {
    background: #fef3c7;
    color: #b45309;
}

.ugtt-topic-badge.closed {
    background: #fce4e4;
    color: #dc2626;
}

.ugtt-topic-stats {
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.ugtt-topic-stats strong {
    display: block;
    font-size: 16px;
    color: #1e293b;
}

.ugtt-topic-stats small {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* ─── Topic detail ─── */
.ugtt-topic-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ugtt-topic-title {
    font-size: 22px;
    color: #1e293b;
    margin: 0 0 8px;
}

.ugtt-topic-meta-bar {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.ugtt-reply {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 16px;
}

.ugtt-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.ugtt-reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ugtt-reply-author img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.ugtt-reply-author strong {
    font-size: 14px;
    color: #1e293b;
}

.ugtt-reply-author small {
    font-size: 12px;
    color: #94a3b8;
}

.ugtt-reply-content {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

.ugtt-reply-expert {
    display: inline-block;
    background: #c8102e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

/* ─── New topic form ─── */
.ugtt-new-topic-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-top: 24px;
}

.ugtt-new-topic-form h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

/* ─── LIBRARY ─── */
.ugtt-library-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ugtt-library-header {
    margin-bottom: 24px;
}

.ugtt-library-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1e293b;
}

.ugtt-library-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.ugtt-library-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ugtt-library-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.ugtt-library-search input:focus {
    border-color: #c8102e;
    outline: none;
}

.ugtt-library-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ugtt-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ugtt-doc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    transition: box-shadow 0.2s;
}

.ugtt-doc-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.ugtt-doc-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.ugtt-doc-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1e293b;
}

.ugtt-doc-card p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ugtt-doc-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.ugtt-doc-meta span {
    margin-right: 12px;
}

.ugtt-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.ugtt-doc-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 11px;
    color: #64748b;
}

.ugtt-doc-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #c8102e;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.ugtt-doc-download:hover {
    background: #a50d25;
    color: #fff;
}

/* ─── Pagination ─── */
.ugtt-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.ugtt-pagination a,
.ugtt-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}

.ugtt-pagination a:hover {
    background: #f1f5f9;
}

.ugtt-pagination .current {
    background: #c8102e;
    color: #fff;
    border-color: #c8102e;
}

/* ─── Profile update message ─── */
.ugtt-profile-updated {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ─── Print styles ─── */
@media print {
    body * {
        visibility: hidden;
    }
    .ugtt-card-page,
    .ugtt-card-page *,
    .ugtt-card-wrapper,
    .ugtt-card-wrapper *,
    .ugtt-card-preview,
    .ugtt-card-preview *,
    .ugtt-card,
    .ugtt-card * {
        visibility: visible;
    }
    .ugtt-card-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    .ugtt-card-actions-top,
    .ugtt-card-info {
        display: none !important;
    }
    .ugtt-card-preview {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        margin: 0;
        padding: 20px;
    }
    .ugtt-card-wrapper {
        margin: 0 auto;
    }
    @page {
        margin: 0;
    }
}

/* ─── Empty state ─── */
.ugtt-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ugtt-empty-state p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

/* ─── Filter row (shared forum / library) ─── */
.ugtt-filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.ugtt-filter-field {
    flex: 1;
    min-width: 200px;
}
.ugtt-filter-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}
.ugtt-filter-field select,
.ugtt-filter-field input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ugtt-filter-field select:focus,
.ugtt-filter-field input[type="text"]:focus {
    border-color: #c8102e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.ugtt-search-group {
    display: flex;
    gap: 8px;
}
.ugtt-search-group input {
    flex: 1;
}

/* ─── Tag ─── */
.ugtt-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 11px;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* ─── No file ─── */
.ugtt-no-file {
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* ─── LIBRARY ─── */
.ugtt-library-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}
.ugtt-library-title {
    font-size: 26px;
    color: #1e293b;
    margin: 0 0 24px;
}
.ugtt-library-filters {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 24px;
}
.ugtt-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.ugtt-library-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e2e8f0;
}
.ugtt-library-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.ugtt-library-card-header {
    padding: 14px 20px;
    background: linear-gradient(135deg, #c8102e, #a50d25);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ugtt-library-category {
    display: inline-block;
    background: rgba(255,255,255,0.20);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ugtt-library-card-body {
    padding: 20px;
    flex: 1;
}
.ugtt-library-card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #1e293b;
    line-height: 1.4;
}
.ugtt-library-card-body p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ugtt-library-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ugtt-library-card-footer {
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
}
.ugtt-library-card-footer .ugtt-btn {
    width: 100%;
    text-align: center;
}

/* ─── FORUM ─── */
.ugtt-forum-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
}
.ugtt-forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.ugtt-forum-title {
    font-size: 26px;
    color: #1e293b;
    margin: 0;
}
.ugtt-forum-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}
.ugtt-forum-header p a {
    color: #c8102e;
    font-weight: 600;
    text-decoration: none;
}
.ugtt-forum-header p a:hover {
    text-decoration: underline;
}

/* ─── New topic form ─── */
.ugtt-forum-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
}
.ugtt-forum-form h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

/* ─── Forum filters ─── */
.ugtt-forum-filters {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 24px;
}

/* ─── Topic list ─── */
.ugtt-forum-topics {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}
.ugtt-forum-topic {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
}
.ugtt-forum-topic:last-child {
    border-bottom: none;
}
.ugtt-forum-topic:hover {
    background: #f8fafc;
}
.ugtt-forum-topic.ugtt-pinned {
    background: #fffbeb;
}
.ugtt-forum-topic.ugtt-pinned:hover {
    background: #fef3c7;
}
.ugtt-topic-main {
    flex: 1;
    min-width: 0;
}
.ugtt-topic-main h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.ugtt-topic-main h3 a {
    color: #1e293b;
    text-decoration: none;
}
.ugtt-topic-main h3 a:hover {
    color: #c8102e;
}
.ugtt-pin-badge,
.ugtt-closed-badge {
    margin-right: 4px;
    font-size: 14px;
}
.ugtt-topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}
.ugtt-topic-category {
    display: inline-block;
    padding: 1px 10px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 11px;
    color: #475569;
    font-weight: 500;
}
.ugtt-topic-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    flex-shrink: 0;
}
.ugtt-topic-stats span {
    min-width: 40px;
}

/* ─── Single topic ─── */
.ugtt-forum-breadcrumb {
    margin-bottom: 20px;
}
.ugtt-forum-breadcrumb a {
    color: #c8102e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.ugtt-forum-breadcrumb a:hover {
    text-decoration: underline;
}
.ugtt-topic-full {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
}
.ugtt-topic-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.ugtt-topic-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1e293b;
}
.ugtt-topic-content {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
}
.ugtt-topic-content p {
    margin: 0 0 12px;
}
.ugtt-topic-content p:last-child {
    margin-bottom: 0;
}

/* ─── Replies section ─── */
.ugtt-replies-section {
    margin-bottom: 24px;
}
.ugtt-replies-section h3 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 16px;
}
.ugtt-reply {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 12px;
}
.ugtt-reply.ugtt-expert-reply {
    border-left: 4px solid #c8102e;
}
.ugtt-reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.ugtt-reply-author strong {
    font-size: 14px;
    color: #1e293b;
}
.ugtt-reply-author small {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}
.ugtt-expert-badge {
    display: inline-block;
    background: #c8102e;
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ugtt-reply-content {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

/* ─── Reply form ─── */
.ugtt-reply-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
}
.ugtt-reply-form h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

/* ─── Info message ─── */
.ugtt-info {
    font-size: 14px;
    color: #64748b;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ugtt-info a {
    color: #c8102e;
    font-weight: 600;
    text-decoration: none;
}
.ugtt-info a:hover {
    text-decoration: underline;
}

/* ─── PDF Viewer Modal ─── */
.ugtt-pdf-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    overflow: auto;
    animation: ugttFadeIn 0.25s ease;
}
.ugtt-pdf-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ugtt-pdf-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: ugttSlideUp 0.3s ease;
}
.ugtt-pdf-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.ugtt-pdf-modal-close:hover {
    background: #c8102e;
}
.ugtt-pdf-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes ugttFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ugttSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ─── PDF Thumbnail Preview ─── */
.ugtt-pdf-preview {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.ugtt-pdf-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.ugtt-pdf-preview-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}
.ugtt-pdf-icon-large {
    font-size: 48px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.ugtt-pdf-preview-title {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    line-height: 1.4;
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ugtt-pdf-page-indicator {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 10px;
    color: #94a3b8;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.ugtt-pdf-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.ugtt-pdf-actions .ugtt-btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
    text-align: center;
}

/* ─── Library card with PDF preview ─── */
.ugtt-library-card .ugtt-library-card-body {
    padding: 0;
}
.ugtt-library-card .ugtt-pdf-preview {
    border-radius: 0;
    border: none;
}
.ugtt-library-card .ugtt-pdf-actions {
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 0;
}
.ugtt-library-card .ugtt-card-text {
    padding: 16px;
}
.ugtt-library-card .ugtt-card-text h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.4;
}
.ugtt-library-card .ugtt-card-text p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Arabic language support ─── */
.ugtt-rtl {
    direction: rtl;
    text-align: right;
}
.ugtt-rtl .ugtt-library-card-header {
    direction: rtl;
}
.ugtt-rtl .ugtt-topic-meta {
    direction: rtl;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .ugtt-dash-layout {
        flex-direction: column;
    }

    .ugtt-dash-sidebar {
        width: 100%;
    }

    .ugtt-row {
        flex-direction: column;
        gap: 0;
    }

    .ugtt-dash-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .ugtt-dash-user {
        flex-direction: column;
    }

    .ugtt-dash-stats {
        grid-template-columns: 1fr 1fr;
    }

    .ugtt-auth-card,
    .ugtt-auth-card-lg {
        max-width: 100%;
    }

    .ugtt-forum-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .ugtt-topic-item {
        flex-wrap: wrap;
    }

    .ugtt-topic-stats {
        display: none;
    }
}
