﻿@import "tailwindcss";

@theme {
    --color-claude-bg: #1F1E1D;
    --color-claude-surface: #2A2927;
    --color-claude-border: #3A3937;
    --color-claude-text: #D3D3D3;
    --color-claude-muted: #9C9A95;
}

@source "./Features/**/*.razor";
@source "./Shared/**/*.razor";

.validation-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

input.invalid,
input.modified.invalid {
    border-color: #dc2626 !important;
}

input.invalid:focus,
input.modified.invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.15);
}

.grid-edit-btn,
.grid-delete-btn,
.grid-activate-btn,
.grid-deactivate-btn {
    cursor: pointer;
    border-radius: 6px;
    padding: 8px;
    transition: all .15s ease;
}

.grid-edit-btn:hover {
    background-color: #dbeafe;
}

.grid-delete-btn:hover {
    background-color: #fee2e2;
}

.grid-activate-btn:hover {
    background-color: #dcfce7;
}

.grid-deactivate-btn:hover {
    background-color: #fee2e2;
}

.login-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAF9F7;
}

.login-card {
    width: 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.login-header {
    background: #2563eb;
    display: flex;
    justify-content: center;
    padding: 24px;
}

.login-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.login-body {
    padding: 32px;
}

.login-title {
    text-align: center;
    margin-bottom: 24px;
}

.login-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-title p {
    font-size: 13px;
    color: #64748b;
}

.login-field {
    margin-bottom: 16px;
}

.login-field-last {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 16px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #3A3937;
    background-color: #1F1E1D;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 150ms;
}

/* Scrollbar stays fully transparent (invisible) until the pointer is
over the sidebar — Firefox via scrollbar-color, WebKit browsers
(Chrome/Edge) via the ::-webkit-scrollbar-thumb rules below. */
.sidebar-menu:hover {
    scrollbar-color: #6B6965 rgba(255, 255, 255, 0.04);
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 3px;
    transition: background-color 150ms;
}

.sidebar-menu:hover::-webkit-scrollbar-thumb {
    background-color: #6B6965;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background-color: #9C9A95;
}

.sidebar-menu-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #9C9A95;
    transition: background-color 150ms, color 150ms;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
}

.sidebar-link:hover {
    background-color: #2A2927;
    color: #F5F4F0;
}

.sidebar-link-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #9C9A95;
    transition: background-color 150ms, color 150ms;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
}

.sidebar-link-parent:hover {
    background-color: #2A2927;
    color: #F5F4F0;
}

.sidebar-link-parent-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-link-parent-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.sidebar-chevron {
    font-size: 0.75rem;
    transition: transform 150ms;
}

.sidebar-chevron.expanded {
    transform: rotate(180deg);
}

/* Single source of per-level indentation, instead of each SidebarMenuNode
   setting its own Depth * step padding — that compounded with every
   ancestor's own padding (depth 2 landed at 1.5rem instead of 1rem, depth
   3 at 3rem instead of 1.5rem). Since .sidebar-children is itself nested
   one level deeper for every level of the tree, giving IT a single fixed
   step is enough — nesting alone produces the staircase, with no risk of
   double-counting.

   border-left doubles as the hierarchy guide line: it only exists while
   a group is expanded (this block only renders when Menu.IsExpanded is
   true), so the dotted line traces exactly the currently open path —
   e.g. Administration > Identity > Users — and disappears the moment a
   branch is collapsed. */
.sidebar-children {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    margin-left: 1rem;
    padding-left: 0.75rem;
    border-left: 1px dashed #4A4947;
}

.sidebar-child-link {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #9C9A95;
    transition: background-color 150ms, color 150ms;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}

.sidebar-child-link:hover {
    background-color: #2A2927;
    color: #F5F4F0;
}

.active-menu {
    background-color: #2A2927 !important;
    color: #F5F4F0 !important;
    font-weight: 500;
    border-radius: 6px !important;
}
