/**
 * AMSHEEP UCP - ELITE SaaS THEME
 * Professional dark theme matching productmgr elite styling
 * Color scheme: Sky Blue (#38bdf8), Purple (#a855f7), Emerald (#22c55e)
 */

/* ============================================
   CSS VARIABLES - ELITE THEME
   ============================================ */
:root {
    /* Primary Colors */
    --ucp-primary: 56, 189, 248;
    /* Sky blue #38bdf8 */
    --ucp-primary-hover: 14, 165, 233;
    /* Darker sky #0ea5e9 */
    --ucp-secondary: 168, 85, 247;
    /* Purple #a855f7 */
    --ucp-accent: 34, 197, 94;
    /* Emerald #22c55e */
    --ucp-warning: 251, 191, 36;
    /* Amber #fbbf24 */
    --ucp-danger: 248, 113, 113;
    /* Red #f87171 */

    /* Background Colors */
    --ucp-bg-page: 8, 12, 16;
    /* Deep space */
    --ucp-bg-card: 15, 23, 35;
    /* Card bg */
    --ucp-bg-elevated: 20, 28, 42;
    /* Elevated */
    --ucp-bg-glass: rgba(15, 23, 35, 0.85);
    --ucp-bg-input: rgba(15, 23, 35, 0.9);

    /* Text Colors */
    --ucp-text-primary: 248, 250, 252;
    --ucp-text-secondary: 148, 163, 184;
    --ucp-muted: 100, 116, 139;

    /* Glass Effects */
    --ucp-glass-blur: 20px;
    --ucp-glass-border: rgba(56, 189, 248, 0.15);
    --ucp-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Border Radius */
    --ucp-radius-sm: 8px;
    --ucp-radius-md: 12px;
    --ucp-radius-lg: 16px;
    --ucp-radius-xl: 24px;

    /* Transitions */
    --ucp-transition: cubic-bezier(0.4, 0, 0.2, 1);
    --ucp-transition-fast: 150ms;
    --ucp-transition-normal: 300ms;
}

/* ============================================
   UCP SHELL - MAIN CONTAINER
   ============================================ */
.ucp-shell {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

/* ============================================
   UCP NAVIGATION BAR - COMPACT HAMBURGER
   ============================================ */
.ucp-nav-bar {
    display: inline-block;
    position: relative;
    z-index: 1000;
}

/* Hide UCP hamburger when main sidebar toggle is present (for productmgr users) */
body:has(.ams-sidebar-toggler) .ucp-nav-bar {
    display: none;
}

/* Compact Hamburger Toggle Button */
.ucp-hamburger-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(135deg,
            rgba(var(--ucp-bg-card), 0.9) 0%,
            rgba(var(--ucp-bg-elevated), 0.8) 100%);
    border: 1px solid var(--ucp-glass-border);
    border-radius: var(--ucp-radius-md);
    backdrop-filter: blur(var(--ucp-glass-blur));
    -webkit-backdrop-filter: blur(var(--ucp-glass-blur));
    box-shadow: var(--ucp-glass-shadow);
    cursor: pointer;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-hamburger-toggle:hover {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15) 0%,
            rgba(var(--ucp-secondary), 0.1) 100%);
    border-color: rgba(var(--ucp-primary), 0.4);
    transform: scale(1.05);
}

.ucp-hamburger-toggle:active {
    transform: scale(0.98);
}

.ucp-hamburger-toggle .hamburger-icon {
    color: rgb(var(--ucp-primary));
    transition: transform 0.2s ease;
}

.ucp-hamburger-toggle:hover .hamburger-icon {
    transform: scale(1.1);
}

/* Compact Dropdown Menu - HIDDEN BY DEFAULT */
.ucp-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.ucp-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px !important;
    min-width: 260px !important;
    max-width: 320px !important;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(15, 23, 35, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 0.75rem;
}

/* Show dropdown when open */
.ucp-dropdown-wrapper.open .ucp-dropdown-menu {
    display: block;
}

.ucp-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Mobile dropdown - full width on small screens */
@media (max-width: 768px) {
    .ucp-dropdown-menu {
        width: 280px !important;
        min-width: 260px !important;
        max-width: min(320px, 95vw) !important;
        left: 0;
        right: auto;
    }
}

.ucp-compact-dropdown .dropdown-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

.ucp-compact-dropdown .ucp-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.625rem 0.875rem !important;
    color: rgb(var(--ucp-text-secondary)) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border-radius: var(--ucp-radius-sm) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.ucp-compact-dropdown .ucp-nav-link:hover {
    background: rgba(var(--ucp-primary), 0.1) !important;
    color: rgb(var(--ucp-primary)) !important;
}

.ucp-compact-dropdown .ucp-nav-link.active {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15),
            rgba(var(--ucp-secondary), 0.1)) !important;
    color: rgb(var(--ucp-primary)) !important;
    border-left: 3px solid rgb(var(--ucp-primary)) !important;
}

.ucp-compact-dropdown .ucp-nav-link .iconify {
    color: inherit !important;
    flex-shrink: 0;
}

/* Hide old toggle styles */
/* ============================================
   UCP NAV LINKS (for dropdown items)
   ============================================ */
.ucp-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--ucp-radius-sm);
    color: rgb(var(--ucp-text-secondary));
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ucp-nav-link:hover {
    background: rgba(var(--ucp-primary), 0.1);
    color: rgb(var(--ucp-primary));
}

.ucp-nav-link.active {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15),
            rgba(var(--ucp-secondary), 0.1));
    color: rgb(var(--ucp-primary));
    border-left: 3px solid rgb(var(--ucp-primary));
}

.ucp-nav-link .iconify {
    color: inherit;
    flex-shrink: 0;
}

/* Dropdown Divider */
.ucp-dropdown-divider {
    height: 1px;
    background: rgba(56, 189, 248, 0.15);
    margin: 0.5rem 0;
}

/* Sub-links (slightly indented) */
.ucp-nav-sublink {
    padding-left: 1.25rem;
    font-size: 0.85rem;
}

transition: transform 0.15s ease;
}

.ucp-nav-link:hover .iconify {
    transform: scale(1.1);
}

/* ============================================
   UCP NAV DROPDOWN - FORCE DOWNWARD & Z-INDEX
   ============================================ */
.ucp-nav-bar .zn-dropdown {
    position: relative;
    z-index: 1000;
}

.ucp-nav-bar .zn-dropdown-menu,
.ucp-nav-bar .dropdown {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 8px !important;
    z-index: 1000 !important;
    width: 280px !important;
    min-width: 260px !important;
    max-width: 320px !important;
    max-height: 70vh;
    overflow-y: auto;
}

/* Ensure dropdown opens properly */
.ucp-nav-bar .zn-dropdown.open .zn-dropdown-menu,
.ucp-nav-bar .zn-dropdown-menu:not([style*="display: none"]),
.ucp-nav-bar .dropdown.dropdown-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Mobile UCP menu fix */
.mobile-ucp-menu {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    z-index: 1000 !important;
    width: auto !important;
    min-width: 250px !important;
    max-width: 300px !important;
}

/* Override template width classes */
.ucp-nav-bar .zn-dropdown-menu.w-full,
.ucp-nav-bar .zn-dropdown-menu.md\:w-96,
.ucp-nav-bar .dropdown.w-full,
.ucp-nav-bar .dropdown.md\:w-96 {
    width: auto !important;
    min-width: 280px !important;
    max-width: 320px !important;
}

/* Dropdown content grid */
.ucp-nav-bar .dropdown-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    padding: 0.5rem !important;
}

.ucp-nav-bar .ucp-nav-link {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 0.625rem 1rem !important;
}

/* ============================================
   UCP SIDEBAR - ELITE GLASS DESIGN
   ============================================ */
.ucp-sidebar {
    background: linear-gradient(180deg,
            rgba(var(--ucp-bg-card), 0.9) 0%,
            rgba(var(--ucp-bg-elevated), 0.8) 100%) !important;
    border: 1px solid var(--ucp-glass-border) !important;
    border-radius: var(--ucp-radius-lg) !important;
    backdrop-filter: blur(var(--ucp-glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--ucp-glass-blur)) !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Disable card pseudo-elements on sidebar to prevent content blocking */
.ucp-sidebar::before,
.ucp-sidebar::after,
.ucp-sidebar>.glow {
    display: none !important;
    content: none !important;
}

.ucp-sidebar .divider {
    border-color: rgba(var(--ucp-primary), 0.1);
    margin: 0.5rem 0;
}

.ucp-sidebar a,
.ucp-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgb(var(--ucp-text-secondary));
    font-weight: 500;
    border-radius: var(--ucp-radius-md);
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
    position: relative;
}

.ucp-sidebar a:hover,
.ucp-sidebar .sidebar-link:hover {
    background: rgba(var(--ucp-primary), 0.1);
    color: rgb(var(--ucp-primary));
}

.ucp-sidebar a.active,
.ucp-sidebar .sidebar-link.active {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15),
            rgba(var(--ucp-secondary), 0.1));
    color: rgb(var(--ucp-primary));
}

.ucp-sidebar a.active::before,
.ucp-sidebar .sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    border-radius: 0 3px 3px 0;
}

.ucp-sidebar .iconify {
    font-size: 1.25rem;
    color: inherit;
}

/* Sidebar List Items - Ensure Visibility */
.ucp-sidebar ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    list-style: none !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}

.ucp-sidebar ul li {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.ucp-sidebar ul li a,
.ucp-sidebar .dropdown-item,
.ucp-sidebar .btn-primary-outline {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    color: rgb(var(--ucp-text-secondary)) !important;
    font-weight: 500 !important;
    border-radius: var(--ucp-radius-md) !important;
    background: rgba(var(--ucp-bg-elevated), 0.5) !important;
    border: 1px solid rgba(var(--ucp-primary), 0.1) !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    z-index: 10 !important;
}

.ucp-sidebar ul li a span,
.ucp-sidebar .dropdown-item span,
.ucp-sidebar .btn-primary-outline span {
    color: rgb(var(--ucp-text-secondary)) !important;
    position: relative !important;
    z-index: 11 !important;
}

.ucp-sidebar ul li a:hover,
.ucp-sidebar .dropdown-item:hover {
    background: rgba(var(--ucp-primary), 0.1) !important;
    color: rgb(var(--ucp-primary)) !important;
}

.ucp-sidebar .btn-primary-outline,
.ucp-sidebar .active-subsection a,
.ucp-sidebar #active-subsection a {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15),
            rgba(var(--ucp-secondary), 0.1)) !important;
    color: rgb(var(--ucp-primary)) !important;
    border-left: 3px solid rgb(var(--ucp-primary)) !important;
}

/* Border separator between sections */
.ucp-sidebar ul.border-b {
    border-bottom: 1px solid rgba(var(--ucp-primary), 0.15) !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

/* ============================================
   UCP CONTENT AREA
   ============================================ */
.ucp-shell .col-span-8,
.ucp-content {
    background: linear-gradient(180deg,
            rgba(var(--ucp-bg-card), 0.7) 0%,
            rgba(var(--ucp-bg-elevated), 0.5) 100%);
    border: 1px solid var(--ucp-glass-border);
    border-radius: var(--ucp-radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   UCP HEADINGS - GRADIENT TEXT
   ============================================ */
.ucp-shell h2,
.ucp-content h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.ucp-shell h3,
.ucp-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgb(var(--ucp-text-primary));
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   UCP STAT GRID - MODERN CARDS
   ============================================ */
.ucp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ucp-stat-card {
    position: relative;
    background: linear-gradient(135deg,
            rgba(var(--ucp-bg-elevated), 0.8) 0%,
            rgba(var(--ucp-bg-card), 0.6) 100%);
    border: 1px solid var(--ucp-glass-border);
    border-radius: var(--ucp-radius-lg);
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    opacity: 0;
    transition: opacity var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--ucp-primary), 0.3);
    box-shadow: 0 12px 40px rgba(var(--ucp-primary), 0.15);
}

.ucp-stat-card:hover::before {
    opacity: 1;
}

.ucp-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.ucp-stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgb(var(--ucp-text-secondary));
    margin-bottom: 0.5rem;
}

.ucp-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: rgb(var(--ucp-text-primary));
    line-height: 1.2;
}

/* ============================================
   FORM SECTIONS - GLASSMORPHIC PANELS
   ============================================ */
.ucp-shell .divide-y>dl,
.ucp-form-row {
    background: rgba(var(--ucp-bg-elevated), 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ucp-radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-shell .divide-y>dl:hover,
.ucp-form-row:hover {
    background: rgba(var(--ucp-bg-elevated), 0.5);
    border-color: rgba(var(--ucp-primary), 0.15);
}

.ucp-shell dt,
.ucp-form-label {
    color: rgb(var(--ucp-text-primary));
    font-weight: 500;
}

.ucp-shell dt .text-secondary,
.ucp-form-help {
    color: rgb(var(--ucp-text-secondary));
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ============================================
   FORM INPUTS - ELITE STYLE
   ============================================ */
.ucp-shell .inputbox,
.ucp-shell input[type="text"],
.ucp-shell input[type="email"],
.ucp-shell input[type="password"],
.ucp-shell input[type="number"],
.ucp-shell input[type="url"],
.ucp-shell select,
.ucp-shell textarea,
.ucp-input {
    width: 100%;
    background: var(--ucp-bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ucp-radius-sm);
    color: rgb(var(--ucp-text-primary));
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-shell .inputbox:focus,
.ucp-shell input:focus,
.ucp-shell select:focus,
.ucp-shell textarea:focus,
.ucp-input:focus {
    outline: none;
    border-color: rgb(var(--ucp-primary));
    box-shadow: 0 0 0 3px rgba(var(--ucp-primary), 0.15),
        0 0 20px rgba(var(--ucp-primary), 0.1);
}

.ucp-shell .inputbox::placeholder,
.ucp-input::placeholder {
    color: rgb(var(--ucp-muted));
}

.ucp-shell select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    appearance: none;
}

/* Radio & Checkbox Elite Styling */
.ucp-shell .radio-label,
.ucp-shell .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--ucp-bg-elevated), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ucp-radius-sm);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: rgb(var(--ucp-text-secondary));
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-shell .radio-label:hover,
.ucp-shell .checkbox-label:hover {
    background: rgba(var(--ucp-primary), 0.1);
    border-color: rgba(var(--ucp-primary), 0.3);
    color: rgb(var(--ucp-primary));
}

.ucp-shell .radio-label:has(input:checked),
.ucp-shell .checkbox-label:has(input:checked) {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.15),
            rgba(var(--ucp-secondary), 0.1));
    border-color: rgba(var(--ucp-primary), 0.4);
    color: rgb(var(--ucp-primary));
}

.ucp-shell input[type="radio"],
.ucp-shell input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: rgb(var(--ucp-primary));
}

/* ============================================
   BUTTONS - GRADIENT ELITE STYLE
   ============================================ */
.ucp-shell .btn-primary,
.ucp-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--ucp-radius-md);
    cursor: pointer;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
    box-shadow: 0 4px 15px rgba(var(--ucp-primary), 0.3);
}

.ucp-shell .btn-primary:hover,
.ucp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--ucp-primary), 0.4);
}

.ucp-shell .btn-secondary,
.ucp-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: rgb(var(--ucp-text-primary));
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--ucp-radius-md);
    cursor: pointer;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-shell .btn-secondary:hover,
.ucp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.ucp-shell button[type="submit"],
.ucp-shell input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--ucp-radius-md);
    cursor: pointer;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
    box-shadow: 0 4px 15px rgba(var(--ucp-primary), 0.3);
}

.ucp-shell button[type="submit"]:hover,
.ucp-shell input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--ucp-primary), 0.4);
}

/* ============================================
   ALERTS & MESSAGES - ELITE STYLE
   ============================================ */
.ucp-shell .error,
.ucp-shell [role="alert"] {
    background: rgba(var(--ucp-danger), 0.1);
    border: 1px solid rgba(var(--ucp-danger), 0.3);
    color: rgb(var(--ucp-danger));
    border-radius: var(--ucp-radius-md);
    padding: 1rem 1.25rem;
}

.ucp-shell .success,
.ucp-success {
    background: rgba(var(--ucp-accent), 0.1);
    border: 1px solid rgba(var(--ucp-accent), 0.3);
    color: rgb(var(--ucp-accent));
    border-radius: var(--ucp-radius-md);
    padding: 1rem 1.25rem;
}

.ucp-shell .warning,
.ucp-warning {
    background: rgba(var(--ucp-warning), 0.1);
    border: 1px solid rgba(var(--ucp-warning), 0.3);
    color: rgb(var(--ucp-warning));
    border-radius: var(--ucp-radius-md);
    padding: 1rem 1.25rem;
}

/* ============================================
   TABLES - ELITE GLASS DESIGN
   ============================================ */
.ucp-shell table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.ucp-shell thead {
    background: linear-gradient(135deg,
            rgba(var(--ucp-primary), 0.1),
            rgba(var(--ucp-secondary), 0.08));
}

.ucp-shell th {
    color: rgb(var(--ucp-text-primary));
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--ucp-glass-border);
}

.ucp-shell td {
    color: rgb(var(--ucp-text-secondary));
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-shell tbody tr:hover td {
    background: rgba(var(--ucp-primary), 0.05);
}

.ucp-shell tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   LINKS - ACCENT COLORS
   ============================================ */
.ucp-shell a:not(.btn-primary):not(.btn-secondary):not(.ucp-nav-link) {
    color: rgb(var(--ucp-primary));
    text-decoration: none;
    transition: color var(--ucp-transition-fast) var(--ucp-transition);
}

.ucp-shell a:not(.btn-primary):not(.btn-secondary):not(.ucp-nav-link):hover {
    color: rgb(var(--ucp-primary-hover));
    text-decoration: underline;
}

/* ============================================
   DROPDOWN MENUS - GLASS EFFECT
   ============================================ */
.ucp-shell .dropdown-content,
.ucp-shell .zn-dropdown-menu {
    background: rgba(var(--ucp-bg-card), 0.95);
    border: 1px solid var(--ucp-glass-border);
    border-radius: var(--ucp-radius-lg);
    backdrop-filter: blur(var(--ucp-glass-blur));
    -webkit-backdrop-filter: blur(var(--ucp-glass-blur));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
}

.ucp-shell .dropdown-item {
    padding: 0.75rem 1rem;
    color: rgb(var(--ucp-text-secondary));
    border-radius: var(--ucp-radius-sm);
    transition: all var(--ucp-transition-fast) var(--ucp-transition);
}

.ucp-shell .dropdown-item:hover {
    background: rgba(var(--ucp-primary), 0.1);
    color: rgb(var(--ucp-primary));
}

/* ============================================
   DIVIDERS & BORDERS
   ============================================ */
.ucp-shell hr,
.ucp-shell .border-b,
.ucp-divider {
    border-color: rgba(var(--ucp-primary), 0.1);
}

.ucp-shell .border-dashed {
    border-style: dashed;
    border-color: rgba(var(--ucp-primary), 0.2);
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.ucp-shell .card {
    background: linear-gradient(180deg,
            rgba(var(--ucp-bg-card), 0.8) 0%,
            rgba(var(--ucp-bg-elevated), 0.6) 100%);
    border: 1px solid var(--ucp-glass-border);
    border-radius: var(--ucp-radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ucp-shell .panel {
    background: rgba(var(--ucp-bg-elevated), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ucp-radius-md);
    padding: 1.25rem;
}

/* ============================================
   DETAILS SECTION
   ============================================ */
.ucp-shell .details {
    background: rgba(var(--ucp-bg-elevated), 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ucp-radius-lg);
    padding: 1.5rem;
}

.ucp-shell .details .grid {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ucp-shell .details .grid:last-child {
    border-bottom: none;
}

/* ============================================
   ICONS
   ============================================ */
.ucp-shell .iconify {
    color: rgb(var(--ucp-text-secondary));
    transition: color var(--ucp-transition-fast) var(--ucp-transition);
}

.ucp-shell a:hover .iconify,
.ucp-shell button:hover .iconify {
    color: rgb(var(--ucp-primary));
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets and Small Desktops (1024px - 1200px) */
@media (max-width: 1200px) {
    .ucp-shell {
        padding: 0.85rem;
    }

    .ucp-quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.85rem;
    }

    .ucp-stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .ucp-shell {
        padding: 0.75rem;
    }

    .ucp-hamburger-toggle {
        width: 42px;
        height: 42px;
    }

    .ucp-stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ucp-stat-card {
        padding: 1.1rem;
    }

    .ucp-quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .ucp-quick-action {
        padding: 1.25rem 0.85rem;
    }

    /* Tables */
    .ucp-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ucp-table {
        min-width: 700px;
    }

    /* Forms */
    fieldset dl dt {
        width: 100%;
        float: none;
        padding-bottom: 0.5rem;
    }

    fieldset dl dd {
        margin-left: 0;
    }

    .panel .inner fieldset {
        padding: 1rem;
    }
}

/* Mobile and Small Tablets (≤768px) */
@media (max-width: 768px) {
    .ucp-shell {
        padding: 0.5rem;
    }

    .ucp-hamburger-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
    }

    /* Stats Grid */
    .ucp-stat-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .ucp-stat-card {
        padding: 1rem;
    }

    .ucp-stat-value {
        font-size: 1.5rem;
    }

    .ucp-stat-label {
        font-size: 0.8rem;
    }

    /* Quick Actions */
    .ucp-quick-actions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ucp-quick-action {
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem;
        text-align: left;
    }

    .ucp-quick-action-icon {
        font-size: 1.75rem;
    }

    .ucp-quick-action-label {
        font-size: 0.9rem;
    }

    /* Navigation Dropdown */
    .ucp-dropdown-menu {
        min-width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    .mobile-ucp-menu .dropdown-content {
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Forms - Prevent iOS zoom */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
    }

    .panel {
        border-radius: 12px;
    }

    .panel .inner {
        padding: 1rem;
    }

    fieldset {
        padding: 1rem;
    }

    fieldset dl {
        margin-bottom: 1rem;
    }

    fieldset dl dt {
        width: 100%;
        float: none;
        padding-bottom: 0.35rem;
        font-size: 0.9rem;
    }

    fieldset dl dd {
        margin-left: 0;
        padding-top: 0;
    }

    /* Buttons */
    .button1,
    .button2 {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Tables */
    .ucp-table {
        min-width: 600px;
    }

    .ucp-table th,
    .ucp-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    /* Badges */
    .ucp-badge {
        padding: 0.3rem 0.65rem;
        font-size: 0.75rem;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .ucp-shell {
        padding: 0.35rem;
    }

    /* Stats */
    .ucp-stat-card {
        padding: 0.85rem;
    }

    .ucp-stat-value {
        font-size: 1.35rem;
    }

    .ucp-stat-label {
        font-size: 0.75rem;
    }

    /* Quick Actions */
    .ucp-quick-action {
        padding: 0.85rem;
    }

    .ucp-quick-action-icon {
        font-size: 1.5rem;
    }

    .ucp-quick-action-label {
        font-size: 0.85rem;
    }

    /* Navigation */
    .ucp-dropdown-menu {
        padding: 0.65rem;
    }

    .ucp-nav-link {
        padding: 0.65rem;
        font-size: 0.85rem;
    }

    /* Forms */
    .panel .inner {
        padding: 0.85rem;
    }

    fieldset {
        padding: 0.85rem;
    }

    fieldset dl dt {
        font-size: 0.85rem;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    textarea,
    select {
        padding: 0.7rem;
    }

    .button1,
    .button2 {
        padding: 0.7rem 1.1rem;
        font-size: 0.85rem;
    }

    /* Tables */
    .ucp-table {
        min-width: 500px;
    }

    .ucp-table th,
    .ucp-table td {
        padding: 0.65rem;
        font-size: 0.8rem;
    }
}

/* Very Small Mobile (≤360px) */
@media (max-width: 360px) {
    .ucp-shell {
        padding: 0.25rem;
    }

    .ucp-stat-value {
        font-size: 1.25rem;
    }

    .ucp-quick-action {
        padding: 0.75rem;
    }

    .panel .inner {
        padding: 0.75rem;
    }

    fieldset {
        padding: 0.75rem;
    }
}

/* Landscape Orientation (Mobile) */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .ucp-shell {
        padding: 0.5rem 1rem;
    }

    .ucp-stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .ucp-stat-card {
        padding: 0.75rem;
    }

    .ucp-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-ucp-menu .dropdown-content {
        max-height: 60vh;
    }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {

    /* Minimum 44px touch targets */
    .ucp-hamburger-toggle,
    .ucp-nav-link,
    .ucp-quick-action,
    .button1,
    .button2,
    button,
    a.button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Touch highlights */
    .ucp-hamburger-toggle {
        -webkit-tap-highlight-color: rgba(56, 189, 248, 0.3);
    }

    .ucp-nav-link {
        -webkit-tap-highlight-color: rgba(56, 189, 248, 0.2);
    }

    .ucp-quick-action {
        -webkit-tap-highlight-color: rgba(56, 189, 248, 0.15);
    }

    button,
    .button1,
    .button2 {
        -webkit-tap-highlight-color: rgba(56, 189, 248, 0.25);
    }

    /* Prevent text selection on UI elements */
    .ucp-stat-grid,
    .ucp-quick-actions,
    .ucp-nav-bar {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Allow text selection in content */
    input,
    textarea,
    .panel .inner p {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .ucp-stat-card,
    .ucp-quick-action {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Prevent Horizontal Overflow */
.ucp-shell,
.ucp-stat-grid,
.ucp-quick-actions,
.ucp-dropdown-menu,
.panel,
fieldset {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.ucp-shell ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ucp-shell ::-webkit-scrollbar-track {
    background: rgba(var(--ucp-bg-card), 0.5);
    border-radius: 4px;
}

.ucp-shell ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    border-radius: 4px;
}

.ucp-shell ::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--ucp-primary));
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
@keyframes ucp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ucp-animate-in {
    animation: ucp-fade-in 0.3s var(--ucp-transition) forwards;
}

/* ============================================
   GRADIENT TEXT UTILITY
   ============================================ */
.ucp-text-gradient {
    background: linear-gradient(135deg, rgb(var(--ucp-primary)), rgb(var(--ucp-secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.ucp-glow-primary {
    box-shadow: 0 0 20px rgba(var(--ucp-primary), 0.3);
}

.ucp-glow-secondary {
    box-shadow: 0 0 20px rgba(var(--ucp-secondary), 0.3);
}

/* ============================================
   STATUS BADGES
   ============================================ */
.ucp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ucp-badge-primary {
    background: rgba(var(--ucp-primary), 0.15);
    border: 1px solid rgba(var(--ucp-primary), 0.3);
    color: rgb(var(--ucp-primary));
}

.ucp-badge-success {
    background: rgba(var(--ucp-accent), 0.15);
    border: 1px solid rgba(var(--ucp-accent), 0.3);
    color: rgb(var(--ucp-accent));
}

.ucp-badge-warning {
    background: rgba(var(--ucp-warning), 0.15);
    border: 1px solid rgba(var(--ucp-warning), 0.3);
    color: rgb(var(--ucp-warning));
}

.ucp-badge-danger {
    background: rgba(var(--ucp-danger), 0.15);
    border: 1px solid rgba(var(--ucp-danger), 0.3);
    color: rgb(var(--ucp-danger));
}

/* ============================================
   LOADING STATES
   ============================================ */
.ucp-loading {
    position: relative;
    overflow: hidden;
}

.ucp-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(var(--ucp-primary), 0.1),
            transparent);
    animation: ucp-shimmer 1.5s infinite;
}

@keyframes ucp-shimmer {
    to {
        left: 100%;
    }
}

/* ============================================
   QUICK ACTIONS GRID (UCP MAIN FRONT)
   ============================================ */
.ucp-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ucp-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: rgba(var(--ucp-bg-elevated), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ucp-radius-lg);
    text-align: center;
    color: rgb(var(--ucp-text-secondary));
    text-decoration: none;
    transition: all var(--ucp-transition-normal) var(--ucp-transition);
}

.ucp-quick-action:hover {
    background: rgba(var(--ucp-primary), 0.1);
    border-color: rgba(var(--ucp-primary), 0.3);
    transform: translateY(-4px);
    color: rgb(var(--ucp-primary));
}

.ucp-quick-action-icon {
    font-size: 2rem;
}

.ucp-quick-action-label {
    font-weight: 600;
    font-size: 0.9rem;
}
