/* PharmaRetail ERP - Main Stylesheet */

html {
    zoom: 0.8;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Page layout */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Sidebar */
.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #1e3f5a 100%);
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row a, .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.top-row a:hover, .top-row .btn-link:hover {
    text-decoration: underline;
}

/* Content area */
article {
    padding: 1.5rem;
}

/* Cards */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Tables */
.table th {
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* Forms */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Navigation */
.nav-scrollable {
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding-bottom: 0.5rem;
}

.nav-link {
    color: #d7d7d7;
    border-radius: 4px;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Responsive */
@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Loading spinner */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Badge colors */
.badge-stock-low {
    background-color: #dc3545;
}

.badge-stock-ok {
    background-color: #198754;
}

/* Print styles */
@media print {
    .sidebar, .top-row, .no-print {
        display: none !important;
    }
    
    main {
        width: 100%;
    }
}
