/* Custom styles that supplement Tailwind CSS */

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.auth-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 2rem auto;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: logoFadeIn 0.6s ease-out 0.2s forwards;
}

/* Auth specific overrides */
.auth-layout {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    padding: 1rem;
    z-index: 2000;
    overflow-y: auto;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input::placeholder {
    color: #9ca3af;
}

.auth-input:focus {
    outline: none;
    border-color: #6c65e5;
    box-shadow: 0 0 0 3px rgba(108, 101, 229, 0.1);
}

.auth-input:hover {
    border-color: #9ca3af;
}

/* Override Bootstrap reboot for buttons */
button.auth-button {
    margin-top: 1.5rem;
    border-radius: 0.5rem;
    background-color: #6c65e5 !important;
    color: white !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

button.auth-button:hover {
    background-color: #615bc2 !important;
    color: white !important;
    text-decoration: none !important;
}

button.auth-button:focus {
    background-color: #6c65e5 !important;
    color: white !important;
    text-decoration: none !important;
}

/* Primary modern buttons */
a.btn-primary-modern,
.btn-primary-modern {
    border-radius: 0.5rem;
    background-color: #6c65e5 !important;
    color: white !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

a.btn-primary-modern:hover,
.btn-primary-modern:hover {
    background-color: #615bc2 !important;
    color: white !important;
    text-decoration: none !important;
}

a.btn-primary-modern:focus,
.btn-primary-modern:focus {
    background-color: #6c65e5 !important;
    color: white !important;
    text-decoration: none !important;
}

/* Outline buttons */
a.btn-outline-modern,
.btn-outline-modern {
    border-radius: 0.5rem;
    background-color: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #6c65e5 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

a.btn-outline-modern:hover,
.btn-outline-modern:hover {
    background-color: #f9fafb !important;
    color: #6c65e5 !important;
    text-decoration: none !important;
}

a.btn-outline-modern:focus,
.btn-outline-modern:focus {
    text-decoration: none !important;
}

button.auth-button i {
    margin-left: 0.5rem;
    margin-top: 0.2rem;
    line-height: 1;
}

/* OAuth buttons - no color, just borders */
a.auth-oauth-button {
    background-color: transparent !important;
    border: 1px solid #d1d5db;
    color: #374151 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

a.auth-oauth-button:hover {
    background-color: #f9fafb !important;
    color: #374151 !important;
    text-decoration: none !important;
}

a.auth-oauth-button:focus {
    background-color: transparent !important;
    color: #374151 !important;
    text-decoration: none !important;
}

a.auth-oauth-button i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1;
    font-size: 1rem;
}

/* Container styles */
.container-modern {
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-modern {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-modern {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Navigation Components */
.nav-modern {
    border-bottom: 1px solid #e5e7eb;
}

.nav-link-modern {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-link-modern:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.nav-link-active {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.nav-dropdown-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-dropdown-button:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.nav-dropdown-menu {
    position: absolute;
    right: 0;
    z-index: 10;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-dropdown-item:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.nav-dropdown-item:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.nav-dropdown-item:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Mobile menu */
.mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #374151;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-menu-button:hover {
    background-color: #f3f4f6;
}

.mobile-menu {
    border-top: 1px solid #e5e7eb;
    background-color: white;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.mobile-nav-link-active {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Sidebar styles */
.sidebar-layout {
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width, 250px);
    background-color: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease-in-out;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    min-height: 64px;
    overflow: hidden;
}

.sidebar-header a {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    margin-right: 0.5rem;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-header a {
    flex: none;
    margin-right: 0;
}

.logo-full {
    height: 32px;
    width: auto;
    max-width: 200px;
    transition: opacity 0.2s;
    object-fit: contain;
}

.logo-mini {
    height: 40px;
    width: auto;
    max-width: 40px;
    display: none;
    flex-shrink: 0;
    object-fit: contain;
}

.sidebar.collapsed .logo-full {
    display: none;
}

.sidebar.collapsed .logo-mini {
    display: block;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav-section {
    margin-bottom: 1.5rem;
}

.sidebar-nav-section:last-child {
    margin-bottom: 0;
}

.sidebar-nav-section-title {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.sidebar.collapsed .sidebar-nav-section-title {
    display: none;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
}

.sidebar-nav-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
}

.sidebar-nav-item.active {
    background-color: #dbeafe;
    color: #1e40af;
    border-right: 3px solid #3b82f6;
}

.sidebar-nav-item .icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-nav-item .icon {
    margin-right: 0;
}

.sidebar-nav-subitem {
    padding-left: 2.5rem !important;
    font-size: 0.8125rem;
    color: #6b7280;
}

.sidebar-nav-subitem:hover {
    color: #374151;
}

.sidebar-nav-subitem.active {
    color: #1e40af;
}

.sidebar.collapsed .sidebar-nav-subitem {
    padding-left: 0.5rem !important;
}

.sidebar.collapsed .sidebar-nav-item .text {
    display: none;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.sidebar.collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
}

/* Main content */
.main-content {
    margin-left: var(--main-margin, 250px);
    height: 100vh;
    background-color: #f9fafb;
    transition: margin-left 0.2s ease-in-out;
    overflow-y: auto;
}

.sidebar.collapsed ~ .main-content {
    --main-margin: 60px;
}

.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f9fafb;
}

/* Fullscreen mode adjustments for signout page */
.fullscreen .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 0;
}

@media (min-width: 1280px) {
    .content-wrapper {
        padding: 2rem 3rem;
    }
}

@media (min-width: 1536px) {
    .content-wrapper {
        max-width: 90%;
        margin: 0 auto;
        padding: 2rem 4rem;
    }
}

/* Mobile sidebar */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease-in-out;
        width: 280px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.collapsed.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .mobile-sidebar-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: white;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        color: #374151;
        cursor: pointer;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
        transition: all 0.2s;
    }

    .mobile-sidebar-toggle:hover {
        background-color: #f3f4f6;
    }
}

@media (min-width: 768px) {
    .mobile-sidebar-toggle {
        display: none;
    }

    .sidebar-backdrop {
        display: none !important;
    }
}

/* Sidebar tooltip */
.sidebar-tooltip {
    position: absolute;
    left: 70px;
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.sidebar-tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #1f2937;
}

.sidebar.collapsed .sidebar-nav-item:hover .sidebar-tooltip {
    opacity: 1;
}

/* Badge styles */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    color: #065f46;
    background-color: #d1fae5;
}

.badge-danger {
    color: #991b1b;
    background-color: #fecaca;
}

.badge-warning {
    color: #92400e;
    background-color: #fed7aa;
}

.badge-info {
    color: #1e40af;
    background-color: #dbeafe;
}

.badge-secondary {
    color: #374151;
    background-color: #f3f4f6;
}

/* Table styles */
.table-modern {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
    table-layout: auto;
}

.table-modern th {
    background-color: #f9fafb;
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.table-modern th:first-child {
    padding-left: 1.5rem;
}

.table-modern th:last-child {
    padding-right: 1.5rem;
    text-align: right;
}

.table-modern td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.table-modern td:first-child {
    font-weight: 500;
    color: #1f2937;
}

.table-modern td:last-child {
    text-align: right;
}

.table-modern tbody tr:hover {
    background-color: #f9fafb;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

@media (min-width: 768px) {
    .table-container {
        margin: 0;
        padding: 0;
        overflow-x: auto;
    }
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Table header */
.table-header-modern {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
    .table-header-modern {
        flex-direction: column;
        align-items: stretch;
    }

    .table-modern {
        font-size: 0.75rem;
    }

    .table-modern th,
    .table-modern td {
        padding: 0.5rem 0.75rem;
    }

    .filter-modern {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

.table-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* Filter controls */
.filter-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-width: 180px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-modern:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.filter-modern.active {
    background-color: #f3f2ff;
    border-color: #6c65e5;
    color: #5b52d9;
}

/* Button groups */
.btn-group-modern {
    display: inline-flex;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-group-modern > * {
    margin-left: -1px;
    position: relative;
}

.btn-group-modern > *:first-child {
    margin-left: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group-modern > *:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.btn-group-modern > *:hover {
    z-index: 1;
}

/* Remove button overrides - using Tailwind styles from input.css */
/* Filter dropdown positioning */
.filter-dropdown {
    position: relative;
}

/* Action links */
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #6b7280;
    transition: all 0.2s;
}

.action-link:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
}

/* Fullscreen layout */
.fullscreen .sidebar {
    display: none;
}

.fullscreen .main-content {
    margin-left: 0;
    width: 100%;
}

.fullscreen .mobile-sidebar-toggle {
    display: none;
}

.fullscreen .sidebar-backdrop {
    display: none;
}

/* Back button */
.back-button-container {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1000;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1000;
}

.back-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

/* Utility: prevent transitions on page load */
.no-transitions,
.no-transitions * {
    transition: none !important;
    animation: none !important;
}

/* Sidebar state classes */
.sidebar-expanded-page .sidebar-initial-state {
    width: 250px;
}

.sidebar-expanded-page .main-content {
    margin-left: 250px;
}

.sidebar-collapsed-page .sidebar-initial-state {
    width: 60px;
}

.sidebar-collapsed-page .main-content {
    margin-left: 60px;
}

.sidebar-initial-state {
    transition: none !important;
}

/* Background opacity utility */
.bg-white\/80 {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Compact table styles */
.compact-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compact-table .table-modern {
    font-size: 0.875rem;
    min-width: 100%;
    width: max-content;
}

.compact-table .table-modern th {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.compact-table .table-modern td {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.compact-table .table-modern th:first-child,
.compact-table .table-modern td:first-child {
    padding-left: 1rem;
}

.compact-table .table-modern th:last-child,
.compact-table .table-modern td:last-child {
    padding-right: 1rem;
}

/* Compact column specific styles */
.compact-seats {
    font-weight: 500;
    white-space: nowrap;
}

.compact-traffic {
    font-weight: 500;
    white-space: nowrap;
}

.compact-stripe {
    font-size: 0.75rem;
    line-height: 1.2;
}

.compact-stripe a,
.compact-stripe span {
    color: #6b7280;
    text-decoration: none;
}

.compact-stripe a:hover {
    color: #374151;
    text-decoration: underline;
}

.stripe-id-link {
    display: block;
    word-break: break-all;
}

.stripe-region {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.7rem;
}

.compact-deal {
    font-size: 0.8125rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-deal a {
    color: #6b7280;
    text-decoration: none;
}

.compact-deal a:hover {
    color: #374151;
    text-decoration: underline;
}

/* Make action links smaller in compact view */
.compact-table .action-link {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
}

/* Table container responsive wrapper */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
}

.table-container.compact-table {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Add scroll shadow indicators */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive improvements for compact table */
@media (max-width: 1280px) {
    .compact-table .table-modern {
        font-size: 0.8125rem;
    }

    .compact-table .table-modern th,
    .compact-table .table-modern td {
        padding: 0.5rem 0.75rem;
    }

    .compact-deal {
        max-width: 120px;
    }
}

@media (max-width: 1024px) {
    .compact-table .table-modern th,
    .compact-table .table-modern td {
        padding: 0.375rem 0.5rem;
    }

    .compact-stripe {
        font-size: 0.7rem;
    }

    .compact-deal {
        font-size: 0.75rem;
    }

    .stripe-region {
        font-size: 0.65rem;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .compact-table .table-modern {
        font-size: 0.75rem;
    }

    .compact-table .table-modern th,
    .compact-table .table-modern td {
        padding: 0.25rem 0.5rem;
    }

    .compact-stripe {
        font-size: 0.65rem;
    }

    .stripe-id-link {
        font-size: 0.6rem;
    }

    .compact-deal {
        font-size: 0.7rem;
        max-width: 80px;
    }

    /* Hide less critical columns on mobile */
    .compact-table .table-modern th:nth-child(2),
    .compact-table .table-modern td:nth-child(2) {
        display: none; /* Hide Region column on mobile */
    }
}

/* Chart grid responsive styles */
.chart-grid {
    display: grid;
    gap: 0.75rem;
}

.chart-grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.chart-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

.chart-card {
    min-height: 130px;
    position: relative;
}

.chart-wrapper {
    position: relative;
    min-height: 250px;
    width: 100%;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Responsive chart grids */
@media (max-width: 1280px) {
    .chart-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .chart-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .chart-grid-4,
    .chart-grid-3,
    .chart-grid-2 {
        grid-template-columns: 1fr;
    }

    .chart-card {
        min-height: 150px;
    }
}

/* Instance page responsive tables */
.instance-page .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.instance-page table {
    min-width: 100%;
}

@media (max-width: 768px) {
    .instance-page .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .instance-page .py-4 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .instance-page th,
    .instance-page td {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Instance page specific overrides */
.instance-page .content-wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

.instance-page .main-content {
    background-color: #f9fafb;
}

.instance-gradient-header {
    position: relative;
    z-index: 1;
}

.instance-page .instance-content {
    padding: 0 2rem 2rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Instance view specific styles */
.api-secret {
    font-family: "SFMono-Regular", "Monaco", "Inconsolata", "Roboto Mono",
        "Consolas", monospace;
}

/* Modern pill-style tab navigation */
.modern-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

.modern-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.modern-tabs a:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-tabs a.active {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

/* Alternative segmented control style */
.segmented-control {
    display: inline-flex;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid #e5e7eb;
}

.segmented-control a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #6b7280;
    position: relative;
    z-index: 1;
}

.segmented-control a:hover {
    color: #374151;
    text-decoration: none;
}

.segmented-control a.active {
    background-color: white;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced action links */
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #6b7280;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.action-link:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
    border-color: #d1d5db;
}

.action-link.text-red-600:hover {
    background-color: #fee2e2;
    border-color: #fecaca;
}

.action-link.text-orange-600:hover {
    background-color: #fed7aa;
    border-color: #fdba74;
}

/* Status indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.success {
    color: #065f46;
    background-color: #d1fae5;
}

.status-badge.error {
    color: #991b1b;
    background-color: #fecaca;
}

.status-badge.pending {
    color: #92400e;
    background-color: #fed7aa;
}

.status-badge.info {
    color: #1e40af;
    background-color: #dbeafe;
}

/* Improved copy buttons */
.copy-btn {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

/* Card sections spacing */
.card-section {
    padding: 1.5rem;
}

.card-section + .card-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

/* Modern table enhancements */
.modern-table {
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    position: sticky;
    top: 0;
    background-color: #f9fafb;
    z-index: 1;
}

.modern-table tr:hover {
    background-color: #f9fafb;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .action-link {
        width: 1.75rem;
        height: 1.75rem;
    }

    .tab-nav a {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .card-section {
        padding: 1rem;
    }
}
