@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    color-scheme: light;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    overflow: auto;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.content {
    padding-top: 0.5rem;
}

@media (min-width: 768px) {
    .content {
        padding-top: 1.1rem;
    }
}

/* Prevent horizontal scroll globally */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Mobile-specific optimizations */
@media (max-width: 767px) {
    /* Ensure tables don't overflow */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better touch targets for mobile - minimum 44x44px for accessibility */
    button:not(.inline-flex) {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text selection on tap */
    button, .card, .table-card {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    /* Improve readability on small screens */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .card, .table-card {
        padding: 1.25rem;
    }
}

.card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(248, 250, 252, 0.65);
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.15);
}

@media (min-width: 768px) {
    .card {
        gap: 1.25rem;
        padding: 1.5rem;
    }
}

    .card:hover {
        transform: translateY(-4px);
        border-color: rgba(99, 102, 241, 0.6);
        box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.2);
    }

.card .card-header {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

.card .icon {
        display: inline-flex;
        height: 2.5rem;
        width: 2.5rem;
        align-items: center;
        justify-content: center;
        border-radius: 1rem;
        background: rgba(99, 102, 241, 0.1);
        font-size: 1.25rem;
    }

    @media (min-width: 768px) {
        .card .icon {
            height: 2.75rem;
            width: 2.75rem;
            font-size: 1.4rem;
        }
    }

.card .title {
        font-size: 1rem;
        font-weight: 600;
        color: rgba(15, 23, 42, 0.9);
    }

    @media (min-width: 768px) {
        .card .title {
            font-size: 1.2rem;
        }
    }

.card .subtitle {
        font-size: 0.85rem;
        color: rgba(71, 85, 105, 0.9);
        margin-top: 0.35rem;
    }

.card .card-body {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

.card .stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .card .stats div {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

    .card .stats dt {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.3em;
            color: rgba(100, 116, 139, 0.8);
        }

    .card .stats dd {
            font-size: 1.2rem;
            font-weight: 600;
            color: rgba(15, 23, 42, 0.95);
        }

.card .cta {
        font-size: 0.9rem;
        font-weight: 600;
        color: rgba(79, 70, 229, 0.9);
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }

.table-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.7);
    padding: 1rem;
    text-align: left;
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .table-card {
        padding: 1.5rem;
    }
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.18);
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(226, 232, 240, 0.4);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.7);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(226, 232, 240, 0.5);
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.8);
    transition: all 0.2s ease;
}

    .action-btn:hover {
        border-color: rgba(79, 70, 229, 0.5);
        background: rgba(165, 180, 252, 0.4);
        color: rgba(76, 29, 149, 0.9);
    }

.modal-panel {
    position: relative;
    width: min(28rem, 90vw);
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(248, 250, 252, 0.92);
    padding: 1.25rem;
    box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.15);
    color: rgba(15, 23, 42, 0.9);
}

@media (min-width: 768px) {
    .modal-panel {
        border-radius: 2rem;
        padding: 1.5rem;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.modal-body {
    padding-top: 1rem;
    color: rgba(30, 41, 59, 0.95);
    font-size: 0.95rem;
}

.close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(226, 232, 240, 0.6);
    color: rgba(71, 85, 105, 0.8);
    transition: all 0.2s ease;
}

    .close-btn:hover {
        border-color: rgba(248, 113, 113, 0.5);
        background: rgba(248, 113, 113, 0.2);
        color: rgba(185, 28, 28, 0.85);
    }

#blazor-error-ui {
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    bottom: 0;
    box-shadow: 0 -18px 45px -25px rgba(15, 23, 42, 0.65);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui a {
        color: #38bdf8;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.85), rgba(220, 38, 38, 0.85));
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 1rem;
    box-shadow: 0 16px 32px -16px rgba(30, 64, 175, 0.65);
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}
