/* AdminPortal.css - CTN Admin Portal Recreation */
/* All styles scoped with .admin-portal to avoid conflicts with existing Fluent UI styles */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* ==================== CSS Variables ==================== */
.admin-portal {
    --ap-background: 0 0% 98%;
    --ap-foreground: 200 93% 17%;
    --ap-card: 0 0% 100%;
    --ap-card-foreground: 200 93% 17%;
    --ap-popover: 0 0% 100%;
    --ap-popover-foreground: 200 93% 17%;
    --ap-primary: 200 76% 48%;
    --ap-primary-foreground: 0 0% 100%;
    --ap-secondary: 210 25% 95%;
    --ap-secondary-foreground: 200 93% 17%;
    --ap-muted: 210 25% 95%;
    --ap-muted-foreground: 215 16% 47%;
    --ap-accent: 31 89% 52%;
    --ap-accent-foreground: 0 0% 100%;
    --ap-destructive: 0 84% 60%;
    --ap-destructive-foreground: 0 0% 100%;
    --ap-border: 214 25% 88%;
    --ap-input: 214 25% 88%;
    --ap-ring: 213 94% 35%;
    --ap-radius: 0.75rem;
    --ap-radius-md: 0.5rem;
    --ap-radius-sm: 0.25rem;
    --ap-shadow-soft: 0 2px 8px -2px hsl(213 94% 35% / 0.08);
    --ap-shadow-medium: 0 4px 16px -4px hsl(213 94% 35% / 0.12);
    --ap-font-sans: 'Poppins', ui-sans-serif, system-ui, sans-serif;

    /* Sidebar variables */
    --ap-sidebar-width: 260px;
    --ap-sidebar-background: 0 0% 100%;
    --ap-sidebar-foreground: 215 16% 47%;
    --ap-sidebar-border: 214 25% 88%;
    --ap-sidebar-accent: 210 25% 95%;
    --ap-sidebar-accent-foreground: 200 93% 17%;
}

/* ==================== Base Styles ==================== */
.admin-portal {
    font-family: var(--ap-font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: hsl(var(--ap-foreground));
    background-color: hsl(var(--ap-background));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-portal p {
    font-family: var(--ap-font-sans);
}

.admin-portal * {
    box-sizing: border-box;
}

.admin-portal a {
    color: inherit;
    text-decoration: none;
}

/* ==================== Header Layout ==================== */
.ap-header {
    background-color: hsl(var(--ap-card));
    border-bottom: 1px solid hsl(var(--ap-border));
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}

.ap-header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--ap-foreground));
}

.ap-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid hsl(var(--ap-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-logo-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: hsl(var(--ap-accent));
}

.ap-header-title {
    color: hsl(var(--ap-foreground));
}

.ap-header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
}

.ap-header-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: hsl(var(--ap-muted-foreground));
    border-radius: var(--ap-radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ap-header-nav-link:hover {
    color: hsl(var(--ap-foreground));
    background-color: hsl(var(--ap-muted));
}

.ap-header-nav-link.active {
    color: hsl(var(--ap-primary));
    background-color: transparent;
}

.ap-main-content {
    flex: 1;
    min-height: calc(100vh - 64px);
}

.ap-page-container {
    margin: auto;
    padding: 2rem 1.5rem;
    max-width: 1400px;
}

/* ==================== Typography ==================== */
.ap-h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: hsl(var(--ap-foreground));
    line-height: 1.2;
    margin: 0;
}

.ap-h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: hsl(var(--ap-foreground));
    line-height: 1.3;
    margin: 0;
}

.ap-h3 {
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--ap-foreground));
    line-height: 1.4;
    margin: 0;
}

.ap-text-muted {
    color: hsl(var(--ap-muted-foreground));
}

.ap-text-sm {
    font-size: 0.875rem;
}

.ap-text-xs {
    font-size: 0.75rem;
}

/* ==================== Organization Header ==================== */
.ap-org-kvk {
    font-size: 0.875rem;
    margin: 0.125rem 0 0.375rem 0;
}

.ap-org-status-row {
    margin-top: 0.25rem;
}

.ap-font-medium {
    font-weight: 400;
}

.ap-font-semibold {
    font-weight: 500;
}

.ap-font-mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

/* ==================== Card ==================== */
.ap-card {
    background-color: hsl(var(--ap-card));
    border: 1px solid hsl(var(--ap-border));
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow-soft);
}

.ap-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.ap-card-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.ap-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--ap-foreground));
    margin: 0;
}

.ap-card-title-lg {
    font-size: 1.5rem;
}

.ap-card-description {
    font-size: 0.875rem;
    color: hsl(var(--ap-muted-foreground));
    margin: 0;
}

.ap-card-content {
    padding: 0 1.5rem 1.5rem;
}

.ap-card-content-pt {
    padding-top: 1.5rem;
}

.ap-card-footer {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    padding-top: 0;
}

/* ==================== Button ==================== */
.ap-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--ap-radius-md);
    font-size: 0.875rem;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    outline: none;
}

.ap-button:focus-visible {
    outline: 2px solid hsl(var(--ap-ring));
    outline-offset: 2px;
}

.ap-button:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.ap-button svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    flex-shrink: 0;
}

/* Button sizes */
.ap-button-default {
    height: 2.5rem;
    padding: 0.5rem 1rem;
}

.ap-button-sm {
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--ap-radius-md);
}

.ap-button-lg {
    height: 2.75rem;
    padding: 0.5rem 2rem;
    border-radius: var(--ap-radius-md);
}

.ap-button-icon {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
}

.ap-button-icon-sm {
    height: 1.75rem;
    width: 1.75rem;
    padding: 0;
}

/* Button variants */
.ap-button-primary {
    background-color: hsl(var(--ap-primary));
    color: hsl(var(--ap-primary-foreground));
}

.ap-button-primary:hover {
    background-color: hsl(var(--ap-primary) / 0.9);
}

.ap-button-outline {
    background-color: transparent;
    border-color: hsl(var(--ap-input));
    color: hsl(var(--ap-foreground));
}

.ap-button-outline:hover {
    background-color: hsl(var(--ap-accent));
    color: hsl(var(--ap-accent-foreground));
}

.ap-button-ghost {
    background-color: transparent;
    color: hsl(var(--ap-foreground));
}

.ap-button-ghost:hover {
    background-color: hsl(var(--ap-accent) / 0.1);
}

.ap-button-destructive {
    background-color: hsl(var(--ap-destructive));
    color: hsl(var(--ap-destructive-foreground));
}

.ap-button-destructive:hover {
    background-color: hsl(var(--ap-destructive) / 0.9);
}

.ap-button-outline-destructive {
    background-color: transparent;
    border-color: hsl(var(--ap-destructive));
    color: hsl(var(--ap-destructive));
}

.ap-button-outline-destructive:hover {
    background-color: hsl(var(--ap-destructive));
    color: hsl(var(--ap-destructive-foreground));
}

/* ==================== Badge ==================== */
.ap-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: colors 0.2s ease;
}

.ap-badge svg {
    width: 0.75rem;
    height: 0.75rem;
}

.ap-badge-default {
    background-color: hsl(var(--ap-primary));
    color: hsl(var(--ap-primary-foreground));
}

.ap-badge-secondary {
    background-color: hsl(var(--ap-secondary));
    color: hsl(var(--ap-secondary-foreground));
}

.ap-badge-destructive {
    background-color: hsl(var(--ap-destructive));
    color: hsl(var(--ap-destructive-foreground));
}

.ap-badge-outline {
    border-color: currentColor;
    background-color: transparent;
}

/* Status badge specific styles */
.ap-badge-active {
    background-color: hsl(var(--ap-primary) / 0.1);
    color: hsl(var(--ap-primary));
    border-color: hsl(var(--ap-primary) / 0.2);
}

.ap-badge-pending,
.ap-badge-review {
    background-color: hsl(45 93% 95%);
    color: hsl(32 95% 44%);
    border-color: hsl(38 92% 50%);
}

/* ==================== Input ==================== */
.ap-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ap-input-icon {
    position: absolute;
    left: 0.75rem;
    color: hsl(var(--ap-muted-foreground));
    pointer-events: none;
}

.ap-input-icon svg {
    width: 1rem;
    height: 1rem;
}

.ap-input {
    height: 2.5rem;
    width: 100%;
    border-radius: var(--ap-radius-md);
    border: 1px solid hsl(var(--ap-input));
    background-color: hsl(var(--ap-background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: hsl(var(--ap-foreground));
    transition: all 0.2s ease;
    outline: none;
}

.ap-input::placeholder {
    color: hsl(var(--ap-muted-foreground));
}

.ap-input:focus {
    border-color: hsl(var(--ap-ring));
    box-shadow: 0 0 0 2px hsl(var(--ap-ring) / 0.2);
}

.ap-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: hsl(var(--ap-muted));
}

.ap-input-with-icon {
    padding-left: 2.5rem;
}

/* ==================== Select ==================== */
.ap-select {
    height: 2.5rem;
    min-width: 180px;
    border-radius: var(--ap-radius-md);
    border: 1px solid hsl(var(--ap-input));
    background-color: hsl(var(--ap-background));
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: hsl(var(--ap-foreground));
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
}

.ap-select:focus {
    border-color: hsl(var(--ap-ring));
    box-shadow: 0 0 0 2px hsl(var(--ap-ring) / 0.2);
}

/* ==================== Table ==================== */
.ap-table-wrapper {
    width: 100%;
    overflow: auto;
}

.ap-table {
    width: 100%;
    caption-side: bottom;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ap-table-header {
    border-bottom: 1px solid hsl(var(--ap-border));
}

.ap-table-header tr {
    border-bottom: 1px solid hsl(var(--ap-border));
}

.ap-table-head {
    height: 3rem;
    padding: 0 1rem;
    text-align: left;
    vertical-align: middle;
    font-weight: 500;
    color: hsl(var(--ap-muted-foreground));
}

.ap-table-head-center {
    text-align: center;
}

.ap-table-body tr {
    border-bottom: 1px solid hsl(var(--ap-border));
    transition: background-color 0.2s ease;
}

.ap-table-body tr:last-child {
    border-bottom: none;
}

.ap-table-body tr:hover {
    background-color: hsl(var(--ap-muted) / 0.5);
}

.ap-table-row-clickable {
    cursor: pointer;
}

.ap-table-cell {
    padding: 1rem;
    vertical-align: middle;
}

.ap-table-cell-center {
    text-align: center;
}

/* ==================== Tabs ==================== */
.ap-tabs {
    display: flex;
    flex-direction: column;
}

.ap-tabs-list {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background-color: hsl(var(--ap-muted));
    border-radius: var(--ap-radius);
    padding: 0.25rem;
    gap: 0.25rem;
}

.ap-tabs-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--ap-radius-sm);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: hsl(var(--ap-muted-foreground));
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.ap-tabs-trigger:hover {
    color: hsl(var(--ap-foreground));
}

.ap-tabs-trigger:focus-visible {
    outline: 2px solid hsl(var(--ap-ring));
    outline-offset: 2px;
}

.ap-tabs-trigger.active {
    background-color: hsl(var(--ap-background));
    color: hsl(var(--ap-foreground));
    box-shadow: var(--ap-shadow-soft);
}

.ap-tabs-content {
    margin-top: 0.5rem;
}

/* ==================== Dialog ==================== */
.ap-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.8);
    animation: ap-fade-in 0.15s ease-out;
}

.ap-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 50;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: hsl(var(--ap-background));
    border: 1px solid hsl(var(--ap-border));
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow-medium);
    padding: 1.5rem;
    width: 100%;
    max-width: 32rem;
    max-height: 85vh;
    overflow-y: auto;
    animation: ap-dialog-in 0.2s ease-out;
}

.ap-dialog-lg {
    max-width: 42rem;
}

@keyframes ap-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ap-dialog-in {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ap-dialog-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    border-radius: var(--ap-radius-sm);
    opacity: 0.7;
    transition: opacity 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.ap-dialog-close:hover {
    opacity: 1;
}

.ap-dialog-close svg {
    width: 1rem;
    height: 1rem;
}

.ap-dialog-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ap-dialog-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--ap-foreground));
    margin: 0;
}

.ap-dialog-description {
    font-size: 0.875rem;
    color: hsl(var(--ap-muted-foreground));
    margin: 0;
}

.ap-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-dialog-footer {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ==================== Alert Dialog ==================== */
.ap-alert-dialog-description ul {
    list-style-type: disc;
    list-style-position: inside;
    margin-top: 0.5rem;
}

.ap-alert-dialog-description ul li {
    margin: 0.25rem 0;
}

/* ==================== Progress ==================== */
.ap-progress {
    position: relative;
    height: 0.5rem;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background-color: hsl(var(--ap-secondary));
}

.ap-progress-indicator {
    height: 100%;
    width: 100%;
    flex: 1;
    background-color: hsl(var(--ap-primary));
    transition: transform 0.3s ease;
}

/* ==================== Tooltip ==================== */
.ap-tooltip-wrapper {
    position: relative;
    display: inline-flex;
}

.ap-tooltip-trigger {
    cursor: help;
    color: hsl(var(--ap-muted-foreground));
}

.ap-tooltip-trigger svg {
    width: 0.75rem;
    height: 0.75rem;
}

.ap-tooltip-content {
    position: absolute;
    z-index: 50;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: hsl(var(--ap-foreground));
    color: hsl(var(--ap-background));
    font-size: 0.75rem;
    border-radius: var(--ap-radius-md);
    max-width: 400px;
    min-width: 250px;
    white-space: normal;
    text-align: center;
    box-shadow: var(--ap-shadow-medium);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ap-tooltip-wrapper:hover .ap-tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* ==================== Icon Container ==================== */
.ap-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ap-radius);
    background-color: hsl(var(--ap-primary) / 0.1);
    flex-shrink: 0;
}

.ap-icon-container svg {
    color: hsl(var(--ap-primary));
}

.ap-icon-container-sm {
    width: 2.25rem;
    height: 2.25rem;
}

.ap-icon-container-sm svg {
    width: 1rem;
    height: 1rem;
}

.ap-icon-container-md {
    width: 2.5rem;
    height: 2.5rem;
}

.ap-icon-container-md svg {
    width: 1.25rem;
    height: 1.25rem;
}

.ap-icon-container-lg {
    width: 3rem;
    height: 3rem;
}

.ap-icon-container-lg svg {
    width: 1.5rem;
    height: 1.5rem;
}

.ap-icon-container-xl {
    width: 3.5rem;
    height: 3.5rem;
}

.ap-icon-container-xl svg {
    width: 1.75rem;
    height: 1.75rem;
}

.ap-icon-container-destructive {
    background-color: hsl(var(--ap-destructive) / 0.1);
}

.ap-icon-container-destructive svg {
    color: hsl(var(--ap-destructive));
}

.ap-icon-container-muted {
    background-color: hsl(var(--ap-muted));
}

.ap-icon-container-muted svg {
    color: hsl(var(--ap-muted-foreground));
}

/* ==================== Utility Classes ==================== */
.ap-space-y-1 > * + * { margin-top: 0.25rem; }
.ap-space-y-2 > * + * { margin-top: 0.5rem; }
.ap-space-y-3 > * + * { margin-top: 0.75rem; }
.ap-space-y-4 > * + * { margin-top: 1rem; }
.ap-space-y-6 > * + * { margin-top: 1.5rem; }
.ap-space-y-8 > * + * { margin-top: 2rem; }

.ap-space-x-2 > * + * { margin-left: 0.5rem; }
.ap-space-x-3 > * + * { margin-left: 0.75rem; }
.ap-space-x-4 > * + * { margin-left: 1rem; }

.ap-gap-1 { gap: 0.25rem; }
.ap-gap-2 { gap: 0.5rem; }
.ap-gap-3 { gap: 0.75rem; }
.ap-gap-4 { gap: 1rem; }
.ap-gap-6 { gap: 1.5rem; }

.ap-flex { display: flex; }
.ap-inline-flex { display: inline-flex; }
.ap-grid { display: grid; }

.ap-flex-row { flex-direction: row; }
.ap-flex-col { flex-direction: column; }
.ap-flex-wrap { flex-wrap: wrap; }

.ap-items-start { align-items: flex-start; }
.ap-items-center { align-items: center; }
.ap-items-end { align-items: flex-end; }

.ap-justify-start { justify-content: flex-start; }
.ap-justify-center { justify-content: center; }
.ap-justify-end { justify-content: flex-end; }
.ap-justify-between { justify-content: space-between; }

.ap-flex-1 { flex: 1; }
.ap-flex-shrink-0 { flex-shrink: 0; }
.ap-min-w-0 { min-width: 0; }

.ap-w-full { width: 100%; }
.ap-h-full { height: 100%; }

.ap-p-3 { padding: 0.75rem; }
.ap-p-4 { padding: 1rem; }
.ap-p-6 { padding: 1.5rem; }

.ap-py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.ap-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.ap-py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.ap-px-4 { padding-left: 1rem; padding-right: 1rem; }
.ap-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.ap-pt-1 { padding-top: 0.25rem; }
.ap-pt-6 { padding-top: 1.5rem; }
.ap-pb-4 { padding-bottom: 1rem; }

.ap-mt-1 { margin-top: 0.25rem; }
.ap-mt-2 { margin-top: 0.5rem; }
.ap-mt-4 { margin-top: 1rem; }
.ap-mt-6 { margin-top: 1.5rem; }

.ap-ml-6 { margin-left: 1.5rem; }
.ap-mr-2 { margin-right: 0.5rem; }

.ap-border { border: 1px solid hsl(var(--ap-border)); }
.ap-border-b { border-bottom: 1px solid hsl(var(--ap-border)); }
.ap-rounded { border-radius: var(--ap-radius); }
.ap-rounded-md { border-radius: var(--ap-radius-md); }
.ap-rounded-lg { border-radius: var(--ap-radius); }

.ap-bg-muted { background-color: hsl(var(--ap-muted)); }
.ap-bg-destructive-light { background-color: hsl(var(--ap-destructive) / 0.05); }

.ap-text-primary { color: hsl(var(--ap-primary)); }
.ap-text-destructive { color: hsl(var(--ap-destructive)); }

.ap-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-cursor-pointer { cursor: pointer; }
.ap-cursor-help { cursor: help; }

.ap-transition {
    transition: all 0.2s ease;
}

.ap-hover-bg-muted:hover {
    background-color: hsl(var(--ap-muted) / 0.5);
}

.ap-divide-y > * + * {
    border-top: 1px solid hsl(var(--ap-border));
}

/* Grid layouts */
.ap-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .ap-sm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .ap-md-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .ap-lg-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .ap-lg-grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    
    .ap-lg-col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .ap-lg-col-span-3 {
        grid-column: span 3 / span 3;
    }
}

/* ==================== Specific Components ==================== */

/* Stat Card */
.ap-stat-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ap-stat-card:hover {
    box-shadow: var(--ap-shadow-medium);
}

.ap-stat-card-clickable:hover {
    border-color: hsl(var(--ap-primary) / 0.5);
    cursor: pointer;
}

.ap-stat-value {
    font-size: 1.875rem;
    font-weight: 600;
    color: hsl(var(--ap-foreground));
    line-height: 1.2;
    margin-top: 0.5rem;
}

.ap-stat-value-destructive {
    color: hsl(var(--ap-destructive));
}

/* Form field */
.ap-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ap-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--ap-foreground));
}

.ap-form-hint {
    font-size: 0.75rem;
    color: hsl(var(--ap-muted-foreground));
}

/* Pending task item */
.ap-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.ap-task-item p {
    margin: 0;
}

.ap-task-item:hover {
    background-color: hsl(var(--ap-muted) / 0.5);
}

/* Search filter bar */
.ap-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ap-filter-bar .ap-input-wrapper {
    flex: 1;
    min-width: 200px;
}

/* ==================== Back Button ==================== */
.ap-back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--ap-radius-md);
    border: none;
    background-color: transparent;
    color: hsl(var(--ap-muted-foreground));
    cursor: pointer;
    transition: all 0.2s ease;
}

.ap-back-button:hover {
    background-color: hsl(var(--ap-muted));
    color: hsl(var(--ap-foreground));
}

/* ==================== Details Grid ==================== */
.ap-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ap-detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--ap-muted-foreground));
    flex-shrink: 0;
}

.ap-detail-label svg {
    width: 0.875rem;
    height: 0.875rem;
}

.ap-detail-value {
    font-size: 0.875rem;
    color: hsl(var(--ap-foreground));
    text-align: right;
    word-break: break-all;
}

/* ==================== Verification Sections ==================== */
.ap-verification-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ap-verification-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ap-verification-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: hsl(var(--ap-muted-foreground));
    letter-spacing: 0.05em;
    margin: 0;
}

.ap-verification-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ap-verification-item-simple {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.ap-verification-status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ap-verification-status.ap-status-verified {
    color: hsl(var(--ap-primary));
}

.ap-verification-status.ap-status-failed {
    color: hsl(var(--ap-destructive));
}

.ap-verification-status.ap-status-pending {
    color: hsl(var(--ap-muted-foreground));
}

.ap-verification-label {
    font-size: 0.875rem;
    color: hsl(var(--ap-foreground));
}

.ap-verification-info-btn {
    background: none;
    border: none;
    padding: 0.125rem;
    cursor: pointer;
    color: hsl(var(--ap-muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.ap-verification-info-btn:hover {
    opacity: 1;
}

/* Verification alert for mismatches */
.ap-verification-item-wrapper {
    display: flex;
    flex-direction: column;
}

.ap-verification-alert {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
    padding: 0.75rem;
    background-color: hsl(0 84% 60% / 0.1);
    border-radius: var(--ap-radius-md);
    border-left: 3px solid hsl(var(--ap-destructive));
}

.ap-verification-alert-message {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--ap-destructive));
    margin-bottom: 0.5rem;
}

.ap-verification-alert-details {
    font-size: 0.8125rem;
    color: hsl(var(--ap-foreground));
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.ap-verification-alert-actions {
    display: flex;
    gap: 0.5rem;
}

/* Legacy verification styles (for other uses) */
.ap-verification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: hsl(var(--ap-muted) / 0.3);
    border-radius: var(--ap-radius-md);
}

.ap-verification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ap-check-verified {
    background-color: hsl(var(--ap-primary) / 0.15);
    color: hsl(var(--ap-primary));
}

.ap-check-failed {
    background-color: hsl(var(--ap-destructive) / 0.15);
    color: hsl(var(--ap-destructive));
}

.ap-check-pending {
    background-color: hsl(45 93% 90%);
    color: hsl(32 95% 44%);
}

/* ==================== User List ==================== */
.ap-user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ap-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: hsl(var(--ap-muted) / 0.3);
    border-radius: var(--ap-radius-md);
    transition: background-color 0.2s ease;
}

.ap-user-card:hover {
    background-color: hsl(var(--ap-muted) / 0.5);
}

.ap-user-info {
    flex: 1;
    min-width: 0;
}

.ap-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: hsl(var(--ap-primary));
    color: hsl(var(--ap-primary-foreground));
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ap-text-right {
    text-align: right;
}

/* ==================== System List ==================== */
.ap-system-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ap-system-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: hsl(var(--ap-muted) / 0.3);
    border-radius: var(--ap-radius-md);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.ap-system-card:hover {
    background-color: hsl(var(--ap-muted) / 0.5);
}

.ap-system-info {
    flex: 1;
    min-width: 0;
}

.ap-icon-primary {
    background-color: hsl(var(--ap-primary) / 0.1);
}

.ap-icon-primary svg {
    color: hsl(var(--ap-primary));
}

.ap-icon-accent {
    background-color: hsl(var(--ap-accent) / 0.1);
}

.ap-icon-accent svg {
    color: hsl(var(--ap-accent));
}

.ap-icon-warning {
    background-color: hsl(45 93% 47% / 0.1);
}

.ap-icon-warning svg {
    color: hsl(45 93% 47%);
}

.ap-icon-destructive {
    background-color: hsl(var(--ap-destructive) / 0.1);
}

.ap-icon-destructive svg {
    color: hsl(var(--ap-destructive));
}

/* ==================== Activity Timeline ==================== */
.ap-activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background-color: hsl(var(--ap-muted) / 0.3);
    border-radius: var(--ap-radius-md);
}

.ap-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    flex-shrink: 0;
    background-color: hsl(var(--ap-muted));
    color: hsl(var(--ap-muted-foreground));
}

.ap-activity-content {
    flex: 1;
    min-width: 0;
}

.ap-activity-created {
    background-color: hsl(var(--ap-primary) / 0.15);
    color: hsl(var(--ap-primary));
}

.ap-activity-deleted {
    background-color: hsl(var(--ap-destructive) / 0.15);
    color: hsl(var(--ap-destructive));
}

.ap-activity-approved {
    background-color: hsl(142 70% 90%);
    color: hsl(142 70% 35%);
}

.ap-activity-rejected {
    background-color: hsl(var(--ap-destructive) / 0.15);
    color: hsl(var(--ap-destructive));
}