/* ============================================
   La Trini BOT — Custom Dashboard Styles
   ============================================ */

/* --- Typography --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', 'Open Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-weight-bold,
.font-weight-bolder {
    font-family: 'Inter', 'Open Sans', sans-serif;
}

/* --- Global Card Enhancements --- */
.card {
    border-radius: 1rem;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

/* --- Smooth Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* --- Hero Section --- */
.trini-hero {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.trini-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(94, 114, 228, 0.08) 0%, rgba(45, 206, 137, 0.06) 100%);
    pointer-events: none;
    z-index: 0;
}

/* --- Bot Avatar --- */
.trini-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.trini-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* --- Stat Cards --- */
.trini-stat-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: none;
}

.trini-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.trini-stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.3rem;
}

.trini-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.trini-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    opacity: 0.7;
}

/* --- Bot Name & Owner Badge --- */
.trini-bot-name {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.trini-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

/* --- Buttons --- */
.trini-invite-btn {
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trini-invite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* --- Description Text --- */
.trini-description {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.85;
    max-width: 500px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trini-animate {
    animation: fadeInUp 0.5s ease forwards;
}

.trini-animate-delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
}

.trini-animate-delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
}

.trini-animate-delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
}

/* --- Login Page --- */
.trini-login-card {
    border-radius: 1.25rem;
    overflow: hidden;
    max-width: 440px;
}

.trini-login-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.trini-login-btn {
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trini-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trini-login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.trini-login-divider::before,
.trini-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

/* --- Navbar Enhancements --- */
.navbar .dropdown-menu {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* --- Footer Enhancements --- */
@media (min-width: 1200px) {
    .g-sidenav-show .footer {
        margin-left: 17.125rem !important;
        transition: all 0.2s ease-in-out;
    }

    .g-sidenav-hidden .footer {
        margin-left: 7.5rem !important;
    }

    .g-sidenav-hidden .navbar-vertical:hover ~ .footer {
        margin-left: 17.125rem !important;
    }
}

.footer .nav-link {
    transition: color 0.2s ease;
}

.footer .nav-link:hover {
    opacity: 0.8;
}

/* --- Sidebar Enhancements --- */
.sidenav .nav-link {
    border-radius: 0.5rem;
    margin: 2px 8px;
    transition: all 0.2s ease;
}

/* --- Form Controls --- */
.form-control:focus {
    border-color: rgba(94, 114, 228, 0.5);
    box-shadow: 0 0 0 2px rgba(94, 114, 228, 0.15);
}

/* --- Button Hover Fix (prevent gradient fade) --- */
.btn[class*="bg-gradient-"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn[class*="bg-gradient-"]:hover {
    opacity: 1 !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn[class*="bg-gradient-"]:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline-secondary:hover:not(.active) {
    opacity: 1 !important;
    background-color: rgba(131, 146, 171, 0.1) !important;
    color: #8392ab !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .trini-avatar {
        width: 120px;
        height: 120px;
    }

    .trini-bot-name {
        font-size: 1.6rem;
        text-align: center;
    }

    .trini-owner-badge {
        font-size: 0.7rem;
    }

    .trini-description {
        text-align: center;
        max-width: 100%;
    }

    .trini-stat-value {
        font-size: 1.4rem;
    }
}

/* ============================================
   Phase 2 — Enhanced Components & Responsive
   ============================================ */

/* --- Enhanced Tables --- */
.table.trini-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 1rem 1.25rem;
    color: #344767;
}

.table.trini-table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.table.trini-table tbody tr:hover {
    background-color: rgba(94, 114, 228, 0.04);
}

.table.trini-table tbody td {
    padding: 0.875rem 1.25rem;
    vertical-align: middle;
    border-color: #f0f2f5;
}

/* --- Guild Cards --- */
.trini-guild-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.trini-guild-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12);
    border-color: rgba(94, 114, 228, 0.25);
}

.trini-guild-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(94, 114, 228, 0.12);
    transition: transform 0.3s ease;
}

.trini-guild-card:hover .trini-guild-icon {
    transform: scale(1.08);
}

/* --- Enhanced Form Controls --- */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #d2d6da;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #344767;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: #5e72e4;
    border-color: #5e72e4;
}

/* --- Admin Panel: Avatar Wrapper (moved from inline) --- */
.avatar-wrapper {
    position: relative;
    height: 100px;
    width: 100px;
    margin: 10px auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.avatar-wrapper:hover .profile-pic {
    opacity: 0.5;
}

.avatar-wrapper .profile-pic {
    height: 100%;
    width: 100%;
    transition: all 0.3s ease;
}

.avatar-wrapper .upload-button {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.avatar-wrapper .upload-button .fa-arrow-circle-up {
    position: absolute;
    font-size: 117px;
    top: -9px;
    left: 0;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: #34495e;
}

.avatar-wrapper .upload-button:hover .fa-arrow-circle-up {
    opacity: 0.9;
}

/* --- Admin Tabs --- */
.trini-admin-tabs .nav-link {
    border-radius: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: #67748e;
    white-space: nowrap;
}

.trini-admin-tabs .nav-link.active {
    font-weight: 600;
}

/* --- Command Tabs (Vertical) --- */
.trini-command-tabs .nav-link {
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    color: #67748e;
}

.trini-command-tabs .nav-link.active {
    font-weight: 600;
}

.trini-command-tabs .nav-link:hover:not(.active) {
    background: rgba(94, 114, 228, 0.06);
}

/* --- Search Input Enhancement --- */
.trini-search .input-group {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #d2d6da;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trini-search .input-group:focus-within {
    border-color: rgba(94, 114, 228, 0.5);
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.12);
}

.trini-search .input-group-text {
    border: none;
    background: transparent;
}

.trini-search .form-control {
    border: none;
    box-shadow: none !important;
}

/* --- Dropdown Enhancements --- */
.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(94, 114, 228, 0.06);
}

/* --- Modal Enhancements --- */
.modal-content {
    border-radius: 1rem;
    border: none;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- Sidebar Active State Enhancement --- */
.sidenav .nav-link.active {
    background: linear-gradient(135deg, rgba(94, 114, 228, 0.1) 0%, rgba(94, 114, 228, 0.04) 100%);
    font-weight: 600;
}

.sidenav .nav-link:hover:not(.active) {
    background: rgba(0, 0, 0, 0.03);
}

/* --- Footer Multi-column --- */
.trini-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trini-footer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Credits Page --- */
.trini-credits-card {
    border-left: 4px solid #5e72e4;
    transition: transform 0.2s ease;
}

.trini-credits-card:hover {
    transform: translateX(4px);
}

/* --- Page Header --- */
.trini-page-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #344767;
    margin-bottom: 0.5rem;
}

.trini-page-subtitle {
    font-size: 0.9rem;
    color: #67748e;
    font-weight: 400;
}

/* --- Additional Responsive --- */
@media (max-width: 1199px) {
    .trini-admin-tabs .nav-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .trini-admin-tabs .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .trini-admin-tabs .nav-item {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .trini-guild-icon {
        width: 56px;
        height: 56px;
    }

    h1.card-title {
        font-size: 1.3rem;
    }

    .nav-pills .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .trini-command-tabs {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }

    .trini-command-tabs .nav-pills {
        flex-direction: row !important;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .trini-command-tabs .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .trini-command-tabs .nav-item {
        flex-shrink: 0;
    }

    .trini-footer-brand {
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .footer .text-lg-end {
        text-align: center !important;
    }
}

@media (max-width: 576px) {
    .trini-guild-card .card-body {
        padding: 1rem;
    }

    .table.trini-table thead th,
    .table.trini-table tbody td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }

    .trini-guild-icon {
        width: 48px;
        height: 48px;
    }
}

/* =====================================================
   Third-Party Pages (TicketsTrini & cog integrations)
   ===================================================== */

/* Content wrapper */
.trini-tp-content {
    min-height: 200px;
}

/* Back link & breadcrumbs */
.trini-tp-back-link {
    color: #344767 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.trini-tp-back-link:hover {
    color: #5e72e4 !important;
}

.trini-tp-back-link i {
    margin-right: 6px;
    font-size: 0.85em;
}

.trini-tp-breadcrumb-sep {
    color: #8392ab;
    margin: 0 4px;
    font-weight: 400;
}

/* Page titles & subtitles */
.trini-tp-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #344767;
    margin-bottom: 0.25rem;
}

.trini-tp-title i {
    margin-right: 8px;
    opacity: 0.7;
}

.trini-tp-subtitle {
    color: #8392ab;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Stat cards (overview page) */
.trini-tp-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.trini-tp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.trini-tp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.trini-tp-stat-body {
    flex: 1;
    min-width: 0;
}

.trini-tp-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8392ab;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.trini-tp-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #344767;
    margin: 0;
    line-height: 1.2;
}

/* Info card (page links) */
.trini-tp-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-left: 4px solid #5e72e4;
}

.trini-tp-info-card h5 {
    color: #344767;
    font-weight: 600;
    margin-bottom: 1rem;
}

.trini-tp-info-card h5 i {
    margin-right: 6px;
    color: #5e72e4;
}

.trini-tp-page-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trini-tp-page-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #67748e;
}

.trini-tp-page-list li:last-child {
    border-bottom: none;
}

.trini-tp-page-list a {
    color: #5e72e4;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.trini-tp-page-list a:hover {
    color: #324cdd;
}

.trini-tp-page-list a i {
    margin-right: 6px;
    width: 18px;
    text-align: center;
}

/* Guild sections (tickets & settings pages) */
.trini-tp-guild-section {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #5e72e4;
}

.trini-tp-guild-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.trini-tp-guild-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #344767;
    margin: 0;
    flex: 1;
}

.trini-tp-guild-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Third-party table */
.trini-tp-table .badge {
    font-size: 0.72rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* User avatars in ticket rows */
.trini-tp-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px;
    vertical-align: middle;
}

/* Empty state */
.trini-tp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #8392ab;
}

.trini-tp-empty i {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.trini-tp-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* Settings grid */
.trini-tp-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.trini-tp-setting-item {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.875rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.trini-tp-setting-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #8392ab;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.trini-tp-setting-value {
    font-size: 1rem;
    font-weight: 700;
    color: #344767;
}

/* Dark mode overrides moved to background_theme_dark.css */

/* Responsive */
@media (max-width: 768px) {
    .trini-tp-stat-card {
        padding: 0.75rem 1rem;
    }

    .trini-tp-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .trini-tp-stat-value {
        font-size: 1.2rem;
    }

    .trini-tp-settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trini-tp-guild-section {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .trini-tp-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}