﻿body {
    --PrimaryColor: #3b82f6;
    --PrimaryDarkColor: #2563eb;
    --PrimaryLightColor: #93c5fd;
    --secondary: #64748b;
    --lightcolor: #f8fafc;
    --DarkColor: #0f172a;
    --card-bg: #ffffff;
    --accent: #f97316;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overscroll-behavior: none !important;
}

* {
    margin: 0;
    padding: 0;
}


.main {
    padding: 1rem;
}

.page-control {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1rem; 
}

@media only screen and (max-width : 667px) {
    .main {
        padding: 0.5rem;
    }
}


/* ---------- Buttons ---------- */
.bttn {
    background: var(--PrimaryColor);
    padding: 2px 1rem;
}

    .bttn:hover {
        background: var(--PrimaryDarkColor);
    }

    .bttn:active {
        transform: scale(0.98);
    }

    /* Button states */
    .bttn.danger {
        background: var(--error);
    }

        .bttn.danger:hover {
            background: #dc2626; /* darker red */
        }

    .bttn.inactive {
        background: var(--secondary);
        opacity: 0.6;
        cursor: not-allowed;
    }

    .bttn .icon {
        display: flex;
        font-size: 1.1rem;
    }

/* ---------- Loading Page ---------- */
.loading-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--lightcolor);
    color: var(--DarkColor);
}

.loading-progress-text {
    font-size: 1rem;
    font-weight: 500;
}

.loading-progress {
    width: 200px;
    height: 8px;
    background: var(--PrimaryLightColor);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

    .loading-progress .bar {
        width: 0%;
        height: 100%;
        background: var(--PrimaryColor);
        animation: loading-bar 2s infinite;
    }

@keyframes loading-bar {
    0% {
        width: 0%;
    }

    50% {
        width: 80%;
    }

    100% {
        width: 0%;
    }
}

/* ---------- Blazor Error UI ---------- */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--error);
    color: var(--lightcolor);
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    display: none;
}

    #blazor-error-ui a {
        color: var(--lightcolor);
        text-decoration: underline;
        margin-left: 1rem;
    }

    #blazor-error-ui.show {
        display: block;
    }



.table-base thead button {
    background-color: var(--PrimaryDarkColor);
}

/* ===== ALERT NOTIFICATION SYSTEM ===== */
.alert-con {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.alert-card {
    display: flex;
    align-items: center;
    min-width: 300px;
    gap: 12px;
    padding: 8px;
    padding-left: 15px;
    background: linear-gradient(to left, rgba(239, 68, 68, 0.05) 0%, rgba(255, 255, 255, 1) 20%);
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    justify-content: space-between;
    border-left: 4px solid var(--info);
    animation: slideIn 0.3s ease-out;
    transform-origin: left bottom;
    transition: var(--transition);
}

    .alert-card.warning {
        border-left-color: var(--warning);
    }

    .alert-card.error {
        border-left-color: var(--error);
    }

    .alert-card.success {
        border-left-color: var(--success);
    }

    .alert-card.info {
        border-left-color: var(--info);
    }

    .alert-card p {
        flex: 1;
        margin: 0;
        font-size: 1.05em;
        line-height: 1.5;
        color: var(--darkcolor);
    }

    .alert-card button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0px;
        border-radius: 4px;
        color: var(--secondary);
        transition: var(--transition);
        flex-shrink: 0;
        font-size: 30px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .alert-card button:hover {
            background: rgba(0, 0, 0, 0.05);
            color: var(--darkcolor);
        }

.alert-icon {
    margin-right: 8px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning .alert-icon {
    color: var(--warning);
}

.error .alert-icon {
    color: var(--error);
}

.success .alert-icon {
    color: var(--success);
}

.info .alert-icon {
    color: var(--info);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.alert-card.hide {
    animation: slideOut 0.3s ease-in forwards;
}
