diff --git a/Web-Jarmark/Web-Jarmark/Components/Account/Pages/Manage/PersonalData.razor b/Web-Jarmark/Web-Jarmark/Components/Account/Pages/Manage/PersonalData.razor index eafd3f3..3cb7672 100644 --- a/Web-Jarmark/Web-Jarmark/Components/Account/Pages/Manage/PersonalData.razor +++ b/Web-Jarmark/Web-Jarmark/Components/Account/Pages/Manage/PersonalData.razor @@ -6,37 +6,21 @@ @inject UserManager UserManager @inject IdentityRedirectManager RedirectManager -Personal Data +Osobní údaje - -

Personal Data

+

Osobní údaje

+

+ V účtu jsou uložené osobní údaje, které jsi zadal. Tady si je můžeš stáhnout nebo účet smazat. +

+

+ Smazání údajů trvale odstraní účet a nelze to vrátit zpět. +

-
-
-

Your account contains personal data that you have given us. This page allows you to download or delete that data.

-

- Deleting this data will permanently remove your account, and this cannot be recovered. -

-
- - - -

- Delete -

-
-
+
+
+ + + -@code { - [CascadingParameter] - private HttpContext HttpContext { get; set; } = default!; - - protected override async Task OnInitializedAsync() - { - var user = await UserManager.GetUserAsync(HttpContext.User); - if (user is null) - { - RedirectManager.RedirectToInvalidUser(UserManager, HttpContext); - } - } -} + Smazat účet +
\ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageLayout.razor b/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageLayout.razor index 282abfe..e3dc04c 100644 --- a/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageLayout.razor +++ b/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageLayout.razor @@ -1,17 +1,23 @@ @inherits LayoutComponentBase -@layout Web_Jarmark.Components.Layout.MainLayout +@layout Web_Jarmark.Components.Layout.Admin.AdminLayout +@using Microsoft.AspNetCore.Authorization -

Manage your account

+@attribute [Authorize(Roles = "Admin")] -
-

Change your account settings

-
-
-
+
+
+

Účet

+

Správa účtu

+

Profil, heslo a zabezpečení.

+
+ +
+
-
+ +
@Body -
+
-
+
\ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageNavMenu.razor b/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageNavMenu.razor index 3033323..936c589 100644 --- a/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageNavMenu.razor +++ b/Web-Jarmark/Web-Jarmark/Components/Account/Shared/ManageNavMenu.razor @@ -1,34 +1,23 @@ @using Microsoft.AspNetCore.Identity @using Web_Jarmark.Data - @inject SignInManager SignInManager - + + 2FA + Passkeys + Osobní údaje + + ← Admin + @code { private bool hasExternalLogins; @@ -37,4 +26,4 @@ { hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); } -} +} \ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor index d3cc79e..e6ddeb0 100644 --- a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor +++ b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor @@ -11,375 +11,346 @@ Přehled administrace -@if (loading) -{ -
Načítám…
-} -else -{ -
-
-

Web-Jarmark

-

Přehled

-

Aktuální stav vašeho obchodu na jednom místě.

+
+ @if (loading) + { +
Načítám přehled…
+ } + else if (!string.IsNullOrEmpty(error)) + { +
@error
+ } + else + { +
+
+

Web-Jarmark

+

Přehled

+

Aktuální stav obchodu na jednom místě.

+
+
-
-
- Produkty - @productCount - celkem v katalogu +
+
+ Objednávky + @orderCount + @pendingCount čeká na platbu
-
- Kategorie - @categoryCount - v sortimentu +
+ Tržby + @revenue.ToString("N0") + Kč uhrazené / dokončené
-
- Viditelné - @visibleCount - v e-shopu +
+ Produkty + @productCount + @visibleCount viditelných
-
- Nízký sklad - @lowStockCount - ≤ 5 kusů +
+ Sklad + @stockUnits + @stockValue.ToString("N0") Kč hodnota +
+
+ Nízký sklad + @lowStockCount + ≤ 5 ks +
+
+ Kategorie + @categoryCount + @activeCategoryCount aktivních
- @* Řada grafů *@ -
-
-
+
+
+

Viditelnost

+

Katalog v e-shopu

-
-
-
- @productCount - celkem +
+
+ @productCount + produktů celkem +
+
+
+
+
+
+ +
+ @visibleCount + Viditelné +
+
+
+ +
+ @hiddenCount + Skryté +
-
    -
  • - - Viditelné - @visibleCount -
  • -
  • - - Skryté - @hiddenCount -
  • -
-
-
+
+

Stav skladu

+

Produkty podle zásob

-
-
-
-
-
+
+
+ @stockUnits + ks na skladě · @stockValue.ToString("N0") Kč +
+
+
+
+
+
+
+
+ +
+ @okStockCount + V pořádku +
+
+
+ +
+ @lowStockCount + Nízký +
+
+
+ +
+ @outOfStockCount + Prázdný +
+
-
    -
  • - - V pořádku - @stockOkCount -
  • -
  • - - Nízký (1–5) - @lowStockPositiveCount -
  • -
  • - - Vyprodané - @outOfStockCount -
  • -
-
-
-

Katalog

+
+
+

Objednávky

+

Podle stavu

-
-
- Průměrná cena - @avgPrice.ToString("N0") Kč -
-
- Nejvyšší cena - @maxPrice.ToString("N0") Kč -
-
- Kusů skladem - @totalStock -
-
- Hodnota skladu - @stockValue.ToString("N0") Kč -
+
+ @foreach (var b in orderBars) + { +
+
+ @b.Label + @b.Count +
+
+
+
+
+ }
-
-
-
-

Produkty podle kategorií

- Spravovat +
+ - @if (categoryStats.Count == 0) +
+
+

Pozor na sklad

+

Nízký stav a vyprodané

+
+ @if (attentionProducts.Count == 0) { -

Zatím žádné kategorie.

+
Všechny produkty mají dostatek kusů.
} else { -
- @foreach (var cat in categoryStats) +
+ @foreach (var p in attentionProducts) { - }
- -
- @* Mini sloupcový graf skladu u produktů *@ -
-
-

Sklad u produktů

- Katalog +
+
+
+

Poslední objednávky

+

Nejnovějších 8

+
+ Všechny
- @if (stockBars.Count == 0) + @if (recentOrders.Count == 0) { -

Zatím žádné produkty.

+
Zatím žádné objednávky.
} else { -
- @foreach (var item in stockBars) +
+ @foreach (var o in recentOrders) { -
-
-
+
+
+ #@o.Code + @o.CreatedAt.ToLocalTime().ToString("d. M. yyyy HH:mm")
- @item.Stock - @Truncate(item.Name, 10) -
+
+ @(string.IsNullOrWhiteSpace(o.CustomerName) ? "—" : o.CustomerName) +
+
+ @o.TotalAmount.ToString("N0") Kč + @StatusText(o.Status) +
+
}
}
- -
-
-

Produkty

- Zobrazit vše -
- - @if (productPreview.Count == 0) - { -

Zatím žádné produkty.

- } - else - { -
- - - - - - - - - - - - @foreach (var p in productPreview) - { - - - - - - - - } - -
NázevKategorieCenaSkladStav
@p.Name@p.CategoryName@p.Price.ToString("N0") Kč@p.StockQuantity - - @(p.IsVisible ? "Viditelné" : "Skryté") - -
-
- } -
-
-} + } +
@code { private bool loading = true; + private string? error; - private int productCount; - private int categoryCount; - private int visibleCount; - private int hiddenCount; - private int lowStockCount; - private int lowStockPositiveCount; - private int outOfStockCount; - private int stockOkCount; - private int totalStock; + private int productCount, visibleCount, hiddenCount, categoryCount, activeCategoryCount; + private int stockUnits, lowStockCount, outOfStockCount, okStockCount; + private int orderCount, pendingCount, paidCount, shippedCount, deliveredCount, cancelledCount; + private decimal revenue, stockValue; - private decimal avgPrice; - private decimal maxPrice; - private decimal stockValue; + private int visPercent, okPercent, lowPercent, outPercent; - private double stockOkPct; - private double stockLowPct; - private double stockOutPct; - - private string visibilityDonutStyle = "background: conic-gradient(#1d1d1f 0 100%);"; - - private List categoryStats = new(); - private List productPreview = new(); - private List stockBars = new(); + private List orderBars = new(); + private List recentOrders = new(); + private List attentionProducts = new(); protected override async Task OnInitializedAsync() { - var products = await Db.Set() - .AsNoTracking() - .Select(p => new + try + { + var products = await Db.Products.AsNoTracking().Include(p => p.Category).ToListAsync(); + productCount = products.Count; + visibleCount = products.Count(p => p.IsVisible); + hiddenCount = productCount - visibleCount; + stockUnits = products.Sum(p => p.StockQuantity); + stockValue = products.Sum(p => p.Price * p.StockQuantity); + lowStockCount = products.Count(p => p.StockQuantity > 0 && p.StockQuantity <= 5); + outOfStockCount = products.Count(p => p.StockQuantity <= 0); + okStockCount = products.Count(p => p.StockQuantity > 5); + + categoryCount = await Db.Categories.CountAsync(); + activeCategoryCount = await Db.Categories.CountAsync(c => c.IsActive); + + var orders = await Db.Orders.AsNoTracking().ToListAsync(); + orderCount = orders.Count; + pendingCount = orders.Count(o => o.Status == OrderStatus.Pending); + paidCount = orders.Count(o => o.Status == OrderStatus.Paid); + shippedCount = orders.Count(o => o.Status == OrderStatus.Shipped); + deliveredCount = orders.Count(o => o.Status == OrderStatus.Delivered); + cancelledCount = orders.Count(o => o.Status == OrderStatus.Cancelled); + + revenue = orders + .Where(o => o.Status is OrderStatus.Paid or OrderStatus.Shipped or OrderStatus.Delivered) + .Sum(o => o.TotalAmount); + + visPercent = productCount == 0 ? 0 : (int)Math.Round(100.0 * visibleCount / productCount); + okPercent = productCount == 0 ? 0 : (int)Math.Round(100.0 * okStockCount / productCount); + lowPercent = productCount == 0 ? 0 : (int)Math.Round(100.0 * lowStockCount / productCount); + outPercent = productCount == 0 ? 0 : Math.Max(0, 100 - okPercent - lowPercent); + + var total = Math.Max(orderCount, 1); + orderBars = new List { - p.Name, - p.Price, - p.StockQuantity, - p.IsVisible, - CategoryName = p.Category.Name - }) - .ToListAsync(); + new("Čeká na zaplacení", pendingCount, pendingCount * 100 / total), + new("Zaplaceno", paidCount, paidCount * 100 / total), + new("Odesláno", shippedCount, shippedCount * 100 / total), + new("Dokončeno", deliveredCount, deliveredCount * 100 / total), + new("Zrušeno", cancelledCount, cancelledCount * 100 / total), + }; - productCount = products.Count; - visibleCount = products.Count(p => p.IsVisible); - hiddenCount = productCount - visibleCount; - outOfStockCount = products.Count(p => p.StockQuantity <= 0); - lowStockPositiveCount = products.Count(p => p.StockQuantity > 0 && p.StockQuantity <= 5); - lowStockCount = products.Count(p => p.StockQuantity <= 5); - stockOkCount = products.Count(p => p.StockQuantity > 5); - totalStock = products.Sum(p => p.StockQuantity); + recentOrders = orders + .OrderByDescending(o => o.CreatedAt) + .Take(8) + .Select((o, idx) => new RecentOrder(o.Code, o.CustomerName, o.TotalAmount, o.Status, o.CreatedAt, idx)) + .ToList(); - avgPrice = productCount == 0 ? 0 : products.Average(p => p.Price); - maxPrice = productCount == 0 ? 0 : products.Max(p => p.Price); - stockValue = products.Sum(p => p.Price * p.StockQuantity); - - if (productCount > 0) - { - stockOkPct = stockOkCount * 100.0 / productCount; - stockLowPct = lowStockPositiveCount * 100.0 / productCount; - stockOutPct = outOfStockCount * 100.0 / productCount; - - var visPct = visibleCount * 100.0 / productCount; - visibilityDonutStyle = - $"background: conic-gradient(#1d1d1f 0 {visPct.ToString("0.##", System.Globalization.CultureInfo.InvariantCulture)}%, #d2d2d7 0 100%);"; + attentionProducts = products + .Where(p => p.StockQuantity <= 5) + .OrderBy(p => p.StockQuantity) + .ThenBy(p => p.Name) + .Take(8) + .Select(p => new AttentionProduct(p.Id, p.Name, p.Category?.Name ?? "—", p.StockQuantity)) + .ToList(); } - else + catch (Exception ex) { - stockOkPct = stockLowPct = stockOutPct = 0; - visibilityDonutStyle = "background: conic-gradient(#e8e8ed 0 100%);"; + error = "Přehled se nepodařilo načíst: " + ex.Message; + } + finally + { + loading = false; } - - categoryCount = await Db.Set().CountAsync(); - - var categories = await Db.Set() - .AsNoTracking() - .Include(c => c.Products) - .OrderBy(c => c.Name) - .ToListAsync(); - - categoryStats = categories - .Select(c => new CategoryStat(c.Name, c.Products.Count)) - .ToList(); - - productPreview = products - .OrderBy(p => p.Name) - .Take(6) - .Select(p => new ProductPreview( - p.Name, - p.CategoryName, - p.Price, - p.StockQuantity, - p.IsVisible)) - .ToList(); - - var maxStock = products.Count == 0 ? 1 : Math.Max(1, products.Max(p => p.StockQuantity)); - stockBars = products - .OrderByDescending(p => p.StockQuantity) - .Take(8) - .Select(p => new StockBar( - p.Name, - p.StockQuantity, - Math.Max(8, (int)Math.Round(p.StockQuantity * 100.0 / maxStock)))) - .ToList(); - - loading = false; } - private int GetWidth(int count) + private static string StatusText(OrderStatus s) => s switch { - var max = categoryStats.Count == 0 ? 1 : Math.Max(1, categoryStats.Max(c => c.ProductCount)); - return count == 0 ? 0 : Math.Max(8, (int)Math.Round(count * 100.0 / max)); - } + OrderStatus.Pending => "Čeká", + OrderStatus.Paid => "Zaplaceno", + OrderStatus.Shipped => "Odesláno", + OrderStatus.Delivered => "Dokončeno", + OrderStatus.Cancelled => "Zrušeno", + _ => "?" + }; - private static string Truncate(string value, int max) - => string.IsNullOrEmpty(value) || value.Length <= max - ? value - : value[..(max - 1)] + "…"; + private static string StatusBadge(OrderStatus s) => s switch + { + OrderStatus.Pending => "is-pending", + OrderStatus.Paid => "is-paid", + OrderStatus.Shipped => "is-shipped", + OrderStatus.Delivered => "is-done", + OrderStatus.Cancelled => "is-cancel", + _ => "" + }; - private record CategoryStat(string Name, int ProductCount); - - private record ProductPreview( - string Name, - string CategoryName, - decimal Price, - int StockQuantity, - bool IsVisible); - - private record StockBar(string Name, int Stock, int HeightPct); + private sealed record BarItem(string Label, int Count, int Percent); + private sealed record RecentOrder(string Code, string CustomerName, decimal TotalAmount, OrderStatus Status, DateTime CreatedAt, int Index); + private sealed record AttentionProduct(int Id, string Name, string CategoryName, int StockQuantity); } \ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor.css b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor.css index 1e603a6..1607f7e 100644 --- a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor.css +++ b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Admin.razor.css @@ -1,492 +1,425 @@ -/* Apple-like přehled + grafy */ +/* Plná šířka dashboard */ -.ap { - max-width: 1120px; - margin: 0 auto; - padding: 8px 8px 48px; +.dash { + width: 100%; + max-width: none; + margin: 0; color: #1d1d1f; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; } -.ap-loading { - max-width: 1120px; - margin: 40px auto; - text-align: center; - color: #6e6e73; - font-size: 15px; +.dash-hero { + display: flex; + justify-content: space-between; + align-items: flex-end; + gap: 16px; + flex-wrap: wrap; + padding: 4px 2px 22px; + animation: dash-in 0.45s ease both; } -.ap-hero { - padding: 28px 8px 32px; - text-align: center; - animation: ap-fade 0.5s ease both; -} - -.ap-eyebrow { - margin: 0 0 8px; +.dash-eyebrow { + margin: 0 0 6px; font-size: 12px; - font-weight: 600; + font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6e6e73; } -.ap-hero h1 { +.dash-hero h1 { margin: 0; - font-size: 40px; - font-weight: 700; + font-size: 34px; + font-weight: 750; letter-spacing: -0.03em; - line-height: 1.1; } -.ap-sub { - margin: 10px auto 0; - max-width: 420px; - font-size: 17px; - line-height: 1.4; +.dash-sub { + margin: 8px 0 0; color: #6e6e73; + font-size: 15px; } -.ap-metrics { +.dash-hero-actions { + display: flex; + flex-wrap: wrap; + gap: 8px; +} + +.dash-kpis { display: grid; - grid-template-columns: repeat(4, minmax(0, 1fr)); - gap: 14px; + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: 12px; margin-bottom: 14px; } -.ap-metric { - background: rgba(255, 255, 255, 0.9); - border: 1px solid rgba(0, 0, 0, 0.04); +.dash-kpi { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 22px; - padding: 22px 20px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 12px 32px rgba(0, 0, 0, 0.04); - transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease; - animation: ap-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; + padding: 16px 14px; + box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04); + animation: dash-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; + animation-delay: calc(var(--i, 0) * 0.05s); + transition: transform 0.25s ease, box-shadow 0.25s ease; } - .ap-metric:nth-child(1) { - animation-delay: 0.05s; + .dash-kpi:hover { + transform: translateY(-3px); + box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07); } - .ap-metric:nth-child(2) { - animation-delay: 0.10s; + .dash-kpi span { + display: block; + font-size: 12px; + font-weight: 650; + color: #6e6e73; } - .ap-metric:nth-child(3) { - animation-delay: 0.15s; + .dash-kpi strong.dash-count { + display: block; + margin-top: 8px; + font-size: 26px; + font-weight: 750; + letter-spacing: -0.03em; + line-height: 1; + animation: dash-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; + animation-delay: calc(var(--i, 0) * 0.05s + 0.1s); } - .ap-metric:nth-child(4) { - animation-delay: 0.20s; + .dash-kpi small { + display: block; + margin-top: 8px; + font-size: 11px; + color: #86868b; } - .ap-metric:hover { - transform: translateY(-3px) scale(1.01); - box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08); - } - -.ap-metric-label { - display: block; - font-size: 13px; - font-weight: 500; - color: #6e6e73; +.dash-row-3 { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 12px; + margin-bottom: 12px; } -.ap-metric-value { +.dash-row-2 { + display: grid; + grid-template-columns: 1.2fr 0.8fr; + gap: 12px; + margin-bottom: 12px; +} + +.dash-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.05); + border-radius: 24px; + padding: 18px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); + animation: dash-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; + animation-delay: calc(var(--i, 0) * 0.05s); +} + +.dash-card-head { + margin-bottom: 14px; +} + + .dash-card-head.row { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 12px; + } + + .dash-card-head h2 { + margin: 0; + font-size: 17px; + font-weight: 700; + letter-spacing: -0.02em; + } + + .dash-card-head p { + margin: 4px 0 0; + font-size: 13px; + color: #6e6e73; + } + +/* Progress verze místo donutů */ +.dash-stack { + display: flex; + flex-direction: column; + gap: 16px; +} + +.dash-stack-top strong { display: block; - margin-top: 10px; - font-size: 36px; - font-weight: 700; + font-size: 28px; + font-weight: 750; letter-spacing: -0.03em; line-height: 1; } -.ap-metric-hint { +.dash-stack-top span { display: block; - margin-top: 10px; - font-size: 12px; - color: #86868b; + margin-top: 6px; + font-size: 13px; + color: #6e6e73; } -/* Charts row */ -.ap-charts { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 14px; - margin-bottom: 14px; -} - -.ap-grid { - display: grid; - grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); - gap: 14px; - margin-bottom: 14px; -} - -.ap-panel { - background: #fff; - border: 1px solid rgba(0, 0, 0, 0.045); - border-radius: 24px; - padding: 22px 22px 18px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 14px 36px rgba(0, 0, 0, 0.035); - animation: ap-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: 0.18s; - margin-bottom: 0; -} - - .ap-panel + .ap-panel-table, - .ap-charts + .ap-grid { - /* spacing handled by parent gaps */ - } - -section.ap-panel { - margin-bottom: 14px; -} - -.ap-panel-head { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - margin-bottom: 18px; -} - - .ap-panel-head h2 { - margin: 0; - font-size: 19px; - font-weight: 650; - letter-spacing: -0.02em; - } - - .ap-panel-head a { - font-size: 14px; - font-weight: 500; - color: #1d1d1f; - text-decoration: none; - opacity: 0.5; - transition: opacity 0.2s ease; - } - - .ap-panel-head a:hover { - opacity: 1; - } - -/* Donut */ -.ap-donut-block { - display: flex; - align-items: center; - gap: 18px; -} - -.ap-donut { - width: 120px; - height: 120px; - border-radius: 50%; - display: grid; - place-items: center; - flex-shrink: 0; - animation: ap-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; -} - -.ap-donut-hole { - width: 72px; - height: 72px; - border-radius: 50%; - background: #fff; - display: grid; - place-content: center; - text-align: center; - box-shadow: 0 0 0 1px #ececec; -} - - .ap-donut-hole strong { - font-size: 18px; - line-height: 1; - } - - .ap-donut-hole small { - font-size: 11px; - color: #6e6e73; - } - -/* Stacked bar */ -.ap-stack-chart { - display: flex; - flex-direction: column; - gap: 16px; -} - -.ap-stack-bar { - display: flex; - height: 14px; +.dash-progress { + height: 12px; border-radius: 999px; + background: #f0f0f2; overflow: hidden; - background: #f2f2f4; } -.ap-stack-seg { - height: 100%; - transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); -} - - .ap-stack-seg.is-ok { - background: #1d1d1f; - } - - .ap-stack-seg.is-low { - background: #6e6e73; - } - - .ap-stack-seg.is-out { - background: #d2d2d7; - } - -/* Legend / stats */ -.ap-legend { - list-style: none; - margin: 0; - padding: 0; +.dash-progress-multi { display: flex; - flex-direction: column; - gap: 8px; - flex: 1; + background: #f0f0f2; } - .ap-legend li { - display: grid; - grid-template-columns: 10px 1fr auto; - gap: 8px; - align-items: center; - font-size: 13px; - color: #1d1d1f; +.dash-progress-fill { + height: 100%; + border-radius: 999px; + transform-origin: left center; + animation: dash-bar 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; +} + +.dash-progress-multi .dash-progress-fill { + border-radius: 0; +} + + .dash-progress-multi .dash-progress-fill:first-child { + border-radius: 999px 0 0 999px; } -.ap-swatch { - width: 10px; - height: 10px; - border-radius: 3px; + .dash-progress-multi .dash-progress-fill:last-child { + border-radius: 0 999px 999px 0; + } + +.dash-progress-fill.is-dark { background: #1d1d1f; } - .ap-swatch.is-mid { - background: #6e6e73; - } - - .ap-swatch.is-light { - background: #d2d2d7; - } - -.ap-stat-list { - display: flex; - flex-direction: column; - gap: 12px; +.dash-progress-fill.is-mid { + background: #8e8e93; } -.ap-stat-line { +.dash-progress-fill.is-light { + background: #d2d2d7; +} + +.dash-split { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; +} + + .dash-split.three { + grid-template-columns: 1fr 1fr 1fr; + } + +.dash-split-item { display: flex; - justify-content: space-between; - gap: 12px; - padding: 12px 14px; + align-items: flex-start; + gap: 8px; + padding: 12px; border-radius: 14px; background: #f5f5f7; - font-size: 13px; } - .ap-stat-line span { + .dash-split-item strong { + display: block; + font-size: 18px; + font-weight: 750; + line-height: 1.1; + } + + .dash-split-item small { + display: block; + margin-top: 3px; + font-size: 12px; color: #6e6e73; } - .ap-stat-line strong { - font-weight: 650; - font-variant-numeric: tabular-nums; +.dash-dot { + width: 9px; + height: 9px; + border-radius: 50%; + background: #e8e8ed; + flex-shrink: 0; + margin-top: 4px; +} + + .dash-dot.is-on { + background: #1d1d1f; } -/* Category rows */ -.ap-rows { + .dash-dot.is-mid { + background: #8e8e93; + } + + .dash-dot.is-off { + background: #e8e8ed; + border: 1px solid #d2d2d7; + } + +.dash-bars { display: flex; flex-direction: column; - gap: 16px; + gap: 12px; } -.ap-row-top { +.dash-bar-label { display: flex; justify-content: space-between; - gap: 12px; - margin-bottom: 8px; - font-size: 14px; - font-weight: 500; -} - -.ap-row-num { + margin-bottom: 5px; + font-size: 12px; color: #6e6e73; - font-variant-numeric: tabular-nums; } -.ap-track { - height: 6px; + .dash-bar-label strong { + color: #1d1d1f; + } + +.dash-bar-track { + height: 8px; border-radius: 999px; - background: #f2f2f4; + background: #f0f0f2; overflow: hidden; } -.ap-fill { +.dash-bar-fill { height: 100%; border-radius: 999px; background: #1d1d1f; transform-origin: left center; - animation: ap-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; + animation: dash-bar 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; } -/* Column chart */ -.ap-columns { +.dash-actions { display: grid; - grid-template-columns: repeat(8, minmax(0, 1fr)); + grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; - align-items: end; - min-height: 180px; - padding-top: 8px; } -.ap-col { +.dash-action { display: flex; flex-direction: column; - align-items: center; - gap: 6px; - min-width: 0; + gap: 4px; + padding: 14px; + border-radius: 16px; + background: #f5f5f7; + text-decoration: none; + color: inherit; + transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; } -.ap-col-bar-wrap { - width: 100%; - height: 120px; - display: flex; - align-items: flex-end; - justify-content: center; -} + .dash-action:hover { + background: #fff; + transform: translateY(-2px); + box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06); + color: inherit; + } -.ap-col-bar { - width: 70%; - max-width: 36px; - border-radius: 10px 10px 4px 4px; - background: linear-gradient(180deg, #3a3a3c 0%, #1d1d1f 100%); - min-height: 6px; - transform-origin: bottom center; - animation: ap-col 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; -} + .dash-action strong { + font-size: 14px; + font-weight: 700; + } -.ap-col-val { - font-size: 12px; - font-weight: 650; - font-variant-numeric: tabular-nums; -} + .dash-action span { + font-size: 12px; + color: #6e6e73; + } -.ap-col-label { - font-size: 11px; - color: #6e6e73; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - text-align: center; -} - -/* Actions */ -.ap-actions { +.dash-mini-list { display: flex; flex-direction: column; gap: 8px; } -.ap-action { +.dash-mini-item { display: flex; - flex-direction: column; - gap: 2px; - padding: 14px 16px; - border-radius: 16px; + justify-content: space-between; + align-items: center; + gap: 10px; + padding: 12px 14px; + border-radius: 14px; background: #f5f5f7; text-decoration: none; - color: #1d1d1f; - transition: background 0.2s ease, transform 0.2s ease; + color: inherit; + transition: background 0.2s ease, transform 0.15s ease; } - .ap-action:hover { - background: #ececef; - color: #1d1d1f; - transform: scale(1.01); + .dash-mini-item:hover { + background: #ececee; + transform: translateX(2px); + color: inherit; } -.ap-action-title { - font-size: 15px; - font-weight: 600; -} + .dash-mini-item strong { + display: block; + font-size: 13px; + } -.ap-action-sub { - font-size: 12px; - color: #6e6e73; -} - -/* Table */ -.ap-table-wrap { - overflow-x: auto; -} - -.ap-table { - width: 100%; - border-collapse: collapse; - font-size: 14px; -} - - .ap-table th { - text-align: left; - padding: 10px 8px 12px; - color: #6e6e73; + .dash-mini-item span { font-size: 12px; - font-weight: 500; - border-bottom: 1px solid #f0f0f2; - } - - .ap-table td { - padding: 14px 8px; - border-bottom: 1px solid #f4f4f6; - } - - .ap-table tr:last-child td { - border-bottom: 0; - } - - .ap-table tbody tr:hover { - background: #fafafa; - } - -.ap-name { - font-weight: 600; -} - -.ap-status { - display: inline-flex; - padding: 4px 10px; - border-radius: 999px; - font-size: 12px; - font-weight: 600; -} - - .ap-status.is-on { - background: #1d1d1f; - color: #fff; - } - - .ap-status.is-off { - background: #f0f0f2; color: #6e6e73; } -.ap-empty { - margin: 12px 0 8px; +.dash-empty { + padding: 18px; + text-align: center; color: #6e6e73; font-size: 14px; } -@keyframes ap-fade { +.dash-orders { + display: flex; + flex-direction: column; + gap: 8px; +} + +.dash-order { + display: grid; + grid-template-columns: 1.2fr 1fr auto; + gap: 12px; + align-items: center; + padding: 14px 16px; + border-radius: 16px; + background: #f7f7f8; + animation: dash-rise 0.45s ease both; + animation-delay: calc(var(--i, 0) * 0.04s); + transition: background 0.2s ease, transform 0.15s ease; +} + + .dash-order:hover { + background: #f0f0f2; + transform: translateX(2px); + } + + .dash-order strong { + display: block; + font-size: 14px; + } + + .dash-order span { + font-size: 12px; + color: #6e6e73; + } + +.dash-order-mid { + font-size: 13px; + color: #6e6e73; +} + +.dash-order-right { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 4px; +} + +@keyframes dash-in { from { opacity: 0; transform: translateY(8px); @@ -498,7 +431,7 @@ section.ap-panel { } } -@keyframes ap-rise { +@keyframes dash-rise { from { opacity: 0; transform: translateY(16px); @@ -510,27 +443,7 @@ section.ap-panel { } } -@keyframes ap-grow { - from { - transform: scaleX(0); - } - - to { - transform: scaleX(1); - } -} - -@keyframes ap-col { - from { - transform: scaleY(0); - } - - to { - transform: scaleY(1); - } -} - -@keyframes ap-pop { +@keyframes dash-pop { from { opacity: 0; transform: scale(0.92); @@ -542,176 +455,44 @@ section.ap-panel { } } -@media (max-width: 1100px) { - .ap-charts { - grid-template-columns: 1fr; +@keyframes dash-bar { + from { + transform: scaleX(0); } - .ap-columns { - grid-template-columns: repeat(4, minmax(0, 1fr)); + to { + transform: scaleX(1); } } -@media (max-width: 960px) { - .ap-metrics { +@media (max-width: 1200px) { + .dash-kpis { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .dash-row-3 { + grid-template-columns: 1fr; + } + + .dash-row-2 { + grid-template-columns: 1fr; + } +} + +@media (max-width: 700px) { + .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } - .ap-grid { + .dash-actions { + grid-template-columns: 1fr 1fr; + } + + .dash-order { grid-template-columns: 1fr; } - .ap-hero h1 { - font-size: 32px; + .dash-split.three { + grid-template-columns: 1fr; } } -/* ===== Seznamy a formuláře ===== */ - -.ap-hero-left { - text-align: left; - padding-left: 4px; - padding-right: 4px; -} - -.ap-hero-row { - display: flex; - align-items: flex-end; - justify-content: space-between; - gap: 16px; - flex-wrap: wrap; -} - -.ap-hero-left .ap-sub { - margin-left: 0; -} - -.ap-muted { - color: #6e6e73; - font-size: 13px; -} - -.ap-btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 6px; - padding: 10px 16px; - border-radius: 999px; - border: 1px solid rgba(0, 0, 0, 0.08); - background: #fff; - color: #1d1d1f; - font-size: 14px; - font-weight: 600; - text-decoration: none; - cursor: pointer; -} - - .ap-btn:hover { - background: #f5f5f7; - color: #1d1d1f; - } - -.ap-btn-primary { - background: #1d1d1f; - border-color: #1d1d1f; - color: #fff; -} - - .ap-btn-primary:hover { - background: #000; - color: #fff; - } - -.ap-btn-ghost { - padding: 7px 12px; - font-size: 13px; - background: #f5f5f7; - border-color: transparent; -} - -.ap-actions-cell { - text-align: right; - white-space: nowrap; -} - -.ap-alert { - margin-bottom: 14px; - padding: 14px 16px; - border-radius: 16px; - background: #f5f5f7; - border: 1px solid #e5e5ea; - font-size: 14px; -} - -.ap-form-panel { - max-width: 560px; -} - -.ap-field { - display: flex; - flex-direction: column; - gap: 8px; - margin-bottom: 16px; -} - - .ap-field label { - font-size: 13px; - font-weight: 600; - } - -.ap-input, -.ap-select, -.ap-textarea { - width: 100%; - border: 1px solid #d2d2d7; - border-radius: 14px; - padding: 12px 14px; - font-size: 15px; - color: #1d1d1f; - background: #fff; - outline: none; -} - - .ap-input:focus, - .ap-select:focus, - .ap-textarea:focus { - border-color: #1d1d1f; - box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06); - } - -.ap-textarea { - min-height: 110px; - resize: vertical; -} - -.ap-help { - color: #6e6e73; - font-size: 12px; -} - -.ap-switch { - display: flex; - align-items: center; - gap: 10px; - margin: 8px 0 20px; - font-size: 14px; - font-weight: 500; - cursor: pointer; -} - -.ap-form-actions { - display: flex; - gap: 10px; - flex-wrap: wrap; - margin-top: 8px; -} - -.ap-toolbar { - display: flex; - gap: 10px; - margin-bottom: 14px; -} - - .ap-toolbar .ap-input { - max-width: 280px; - } \ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Nastaveni.razor b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Nastaveni.razor new file mode 100644 index 0000000..3f80564 --- /dev/null +++ b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Nastaveni.razor @@ -0,0 +1,130 @@ +@page "/admin/nastaveni" +@layout Web_Jarmark.Components.Layout.Admin.AdminLayout +@rendermode InteractiveServer +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Identity +@using Microsoft.EntityFrameworkCore +@using Microsoft.AspNetCore.Components.Authorization +@using Web_Jarmark.Data +@using Web_Jarmark.Data.Models +@inject ApplicationDbContext Db +@inject UserManager UserManager +@inject AuthenticationStateProvider AuthState + +@attribute [Authorize(Roles = "Admin")] + +Nastavení + +
+
+

Administrace

+

Nastavení

+

Účet, e-shop a rychlé odkazy.

+
+ + @if (loading) + { +
Načítám…
+ } + else + { +
+
+ Uživatelé + @userCount + registrovaných +
+
+ Administrátoři + @adminCount + role Admin +
+
+ Produkty + @productCount + v katalogu +
+
+ Objednávky + @orderCount + celkem +
+
+ +
+
+
+

Tvůj účet

+

Přihlášený administrátor

+
+
+
+
+
E-mailpřihlášení
+ @currentEmail +
+
+
Roleoprávnění
+ @currentRoles +
+
+ +
+ +
+
+
+

Rychlé odkazy

+

Administrace e-shopu

+
+
+ +
+ } +
+ +@code { + private bool loading = true; + private int userCount, adminCount, productCount, orderCount; + private string currentEmail = "—"; + private string currentRoles = "—"; + + protected override async Task OnInitializedAsync() + { + try + { + userCount = await UserManager.Users.CountAsync(); + var admins = await UserManager.GetUsersInRoleAsync("Admin"); + adminCount = admins.Count; + productCount = await Db.Products.CountAsync(); + orderCount = await Db.Orders.CountAsync(); + + var state = await AuthState.GetAuthenticationStateAsync(); + var user = state.User; + if (user.Identity?.IsAuthenticated == true) + { + currentEmail = user.Identity?.Name ?? "—"; + var appUser = await UserManager.FindByEmailAsync(currentEmail); + if (appUser is not null) + { + var roles = await UserManager.GetRolesAsync(appUser); + currentRoles = roles.Count == 0 ? "bez role" : string.Join(", ", roles); + } + } + } + finally + { + loading = false; + } + } +} \ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Statistiky.razor b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Statistiky.razor new file mode 100644 index 0000000..edf9f78 --- /dev/null +++ b/Web-Jarmark/Web-Jarmark/Components/Pages/Admin/Statistiky.razor @@ -0,0 +1,200 @@ +@page "/admin/statistiky" +@layout Web_Jarmark.Components.Layout.Admin.AdminLayout +@rendermode InteractiveServer +@using Microsoft.EntityFrameworkCore +@using Microsoft.AspNetCore.Authorization +@using Web_Jarmark.Data +@using Web_Jarmark.Data.Models +@inject ApplicationDbContext Db + +@attribute [Authorize(Roles = "Admin")] + +Statistiky + +
+
+

Administrace

+

Statistiky

+

Přehled e-shopu ze skutečných dat.

+
+ + @if (loading) + { +
Načítám statistiky…
+ } + else if (!string.IsNullOrEmpty(error)) + { +
@error
+ } + else + { +
+
+ Objednávky + @orderCount + celkem +
+
+ Tržby + @revenue.ToString("N0") + Kč +
+
+ Produkty + @productCount + @visibleCount viditelných +
+
+ Sklad + @stockUnits + @stockValue.ToString("N0") Kč +
+
+ +
+
+ Čeká na zaplacení + @pendingCount + objednávek +
+
+ Zaplaceno + @paidCount + objednávek +
+
+ Odesláno / dokončeno + @(shippedCount + deliveredCount) + objednávek +
+
+ Zrušeno + @cancelledCount + objednávek +
+
+ +
+
+
+

Katalog a sklad

+

Aktuální stav

+
+
+
+
+
Kategoriecelkem
+ @categoryCount +
+
+
Aktivní kategoriev e-shopu
+ @activeCategoryCount +
+
+
Nízký sklad≤ 5 ks
+ @lowStockCount +
+
+
Vyprodané0 ks
+ @outOfStockCount +
+
+
+ +
+
+
+

Poslední objednávky

+

Nejnovějších 8

+
+ Všechny +
+ + @if (recentOrders.Count == 0) + { +
Žádné objednávky.
+ } + else + { +
+ @foreach (var o in recentOrders) + { +
+
+
+ #@o.Code + @o.CreatedAt.ToLocalTime().ToString("d. M. yyyy HH:mm") +
+
+ @(string.IsNullOrWhiteSpace(o.CustomerName) ? "—" : o.CustomerName) +
+
+ @o.TotalAmount.ToString("N0") Kč +
+
+
+ } +
+ } +
+ } +
+ +@code { + private bool loading = true; + private string? error; + + private int orderCount, pendingCount, paidCount, shippedCount, deliveredCount, cancelledCount; + private int productCount, visibleCount, categoryCount, activeCategoryCount; + private int stockUnits, lowStockCount, outOfStockCount; + private decimal revenue, stockValue; + + private List recentOrders = new(); + + protected override async Task OnInitializedAsync() + { + try + { + var orders = await Db.Orders.AsNoTracking().ToListAsync(); + orderCount = orders.Count; + pendingCount = orders.Count(o => o.Status == OrderStatus.Pending); + paidCount = orders.Count(o => o.Status == OrderStatus.Paid); + shippedCount = orders.Count(o => o.Status == OrderStatus.Shipped); + deliveredCount = orders.Count(o => o.Status == OrderStatus.Delivered); + cancelledCount = orders.Count(o => o.Status == OrderStatus.Cancelled); + + revenue = orders + .Where(o => o.Status == OrderStatus.Paid + || o.Status == OrderStatus.Shipped + || o.Status == OrderStatus.Delivered) + .Sum(o => o.TotalAmount); + + var products = await Db.Products.AsNoTracking().ToListAsync(); + productCount = products.Count; + visibleCount = products.Count(p => p.IsVisible); + stockUnits = products.Sum(p => p.StockQuantity); + stockValue = products.Sum(p => p.Price * p.StockQuantity); + lowStockCount = products.Count(p => p.StockQuantity > 0 && p.StockQuantity <= 5); + outOfStockCount = products.Count(p => p.StockQuantity <= 0); + + categoryCount = await Db.Categories.CountAsync(); + activeCategoryCount = await Db.Categories.CountAsync(c => c.IsActive); + + recentOrders = orders + .OrderByDescending(o => o.CreatedAt) + .Take(8) + .Select(o => new RecentOrder(o.Code, o.CustomerName, o.TotalAmount, o.CreatedAt)) + .ToList(); + } + catch (Exception ex) + { + error = "Statistiky se nepodařilo načíst: " + ex.Message; + } + finally + { + loading = false; + } + } + + private sealed record RecentOrder(string Code, string CustomerName, decimal TotalAmount, DateTime CreatedAt); +} \ No newline at end of file diff --git a/Web-Jarmark/Web-Jarmark/wwwroot/app.css b/Web-Jarmark/Web-Jarmark/wwwroot/app.css index 8358700..c2b19f1 100644 --- a/Web-Jarmark/Web-Jarmark/wwwroot/app.css +++ b/Web-Jarmark/Web-Jarmark/wwwroot/app.css @@ -3629,4 +3629,203 @@ textarea.wj-input { .ao-detail-grid { grid--template-columns: 1fr 1fr; } -} \ No newline at end of file +} +.stat-bar-track { + margin-top: 8px; + height: 8px; + border-radius: 999px; + background: #f0f0f2; + overflow: hidden; +} + +.stat-bar-fill { + height: 100%; + border-radius: 999px; + background: #1d1d1f; + transition: width 0.4s ease; +} +/* ===== Account Manage – finální formát ===== */ + +.manage-shell { + max-width: 100%; + margin: 0; + text-align: left; +} + + .manage-shell .ao-hero { + text-align: left; + padding: 8px 4px 20px; + } + + .manage-shell .ao-hero h1 { + font-size: 28px; + } + +.manage-grid { + display: grid; + grid-template-columns: 230px minmax(0, 1fr); + gap: 16px; + align-items: start; + width: 100%; +} + +.manage-nav-card, +.manage-content-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.06); + border-radius: 22px; + box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04); +} + +.manage-nav-card { + padding: 14px 10px; +} + +.manage-nav-title { + margin: 0 10px 10px; + font-size: 11px; + font-weight: 700; + letter-spacing: 0.07em; + text-transform: uppercase; + color: #6e6e73; +} + +.manage-content-card { + padding: 22px 24px 26px; + min-width: 0; +} + +.manage-nav { + display: flex; + flex-direction: column; + gap: 3px; +} + +.manage-nav-link { + display: block; + padding: 11px 12px; + border-radius: 12px; + color: #6e6e73 !important; + text-decoration: none !important; + font-size: 14px; + font-weight: 600; +} + + .manage-nav-link:hover { + background: #f5f5f7; + color: #1d1d1f !important; + } + + .manage-nav-link.active { + background: #1d1d1f !important; + color: #fff !important; + } + +.manage-nav-back { + margin-top: 8px; + border-top: 1px solid rgba(0, 0, 0, 0.06); + padding-top: 12px; +} + +.manage-content-card h3, +.manage-content-card h4 { + margin: 0 0 8px !important; + font-size: 20px !important; + font-weight: 700 !important; + color: #1d1d1f !important; +} + +.manage-content-card p { + margin: 0 0 12px; + color: #6e6e73; + font-size: 14px; + line-height: 1.45; + max-width: 52ch; +} + +.manage-content-card strong { + color: #1d1d1f; +} + +/* Bootstrap grid vypnout uvnitø manage */ +.manage-content-card .row { + margin: 0 !important; + display: block !important; +} + +.manage-content-card [class*="col-"] { + width: 100% !important; + max-width: 100% !important; + padding: 0 !important; + flex: none !important; +} + +.manage-content-card .form-floating { + margin-bottom: 12px; + max-width: 420px; +} + +.manage-content-card .form-control { + height: 52px !important; + border: 1px solid #d2d2d7 !important; + border-radius: 14px !important; + background: #fff !important; + box-shadow: none !important; +} + + .manage-content-card .form-control:focus { + border-color: #1d1d1f !important; + box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important; + } + + .manage-content-card .form-control:disabled { + background: #f5f5f7 !important; + } + +/* tlaèítka vedle sebe */ +.manage-content-card .btn { + border-radius: 999px !important; + font-weight: 650 !important; + padding: 10px 18px !important; + margin: 0 8px 8px 0 !important; + display: inline-flex !important; + width: auto !important; +} + +.manage-content-card .btn-primary { + background: #1d1d1f !important; + border-color: #1d1d1f !important; + color: #fff !important; +} + +.manage-content-card .btn-danger { + background: #1d1d1f !important; + border-color: #1d1d1f !important; + color: #fff !important; +} + +.manage-content-card .btn-link { + color: #1d1d1f !important; + padding-left: 0 !important; +} + +.manage-content-card form { + max-width: 420px; +} + +@media (max-width: 800px) { + .manage-grid { + grid-template-columns: 1fr; + } +} +.manage-actions { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-top: 8px; +} + + .manage-actions form { + margin: 0; + max-width: none; + } \ No newline at end of file