/* ═══════════════════════════════════════════════════════════════════════════
   SOFTEX COMPONENTS - Using Design Tokens

   File: softex-components.css
   Version: 1.0.0
   Date: 2026-01-31

   REQUIRES: softex-design-tokens.css (must be loaded first)

   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
═══════════════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APP LAYOUT - Flex container for sidebar, main content, and push panel
═══════════════════════════════════════════════════════════════════════════ */
.softex-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--softex-bg-page);
}

body {
    font-family: var(--softex-font-body);
    font-size: var(--softex-text-base);
    color: var(--softex-text-primary);
    background-color: var(--softex-bg-page);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.heading-font {
    font-family: var(--softex-font-heading);
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. BUTTONS - Always Pill Shaped
═══════════════════════════════════════════════════════════════════════════ */

/* Base Button */
.softex-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--softex-space-2);
    height: 44px;
    padding: 0 var(--softex-space-6);
    border-radius: var(--softex-radius-full); /* ALWAYS PILL */
    font-family: var(--softex-font-body);
    font-size: var(--softex-text-sm);
    font-weight: var(--softex-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--softex-transition-fast);
    white-space: nowrap;
}

.softex-btn:active {
    transform: scale(0.95);
}

/* Primary Button */
.softex-btn-primary {
    background-color: var(--softex-primary);
    color: var(--softex-text-inverse);
    box-shadow: var(--softex-shadow-primary);
}

.softex-btn-primary:hover {
    background-color: var(--softex-primary-dark);
    box-shadow: 0 8px 20px rgba(var(--softex-primary-rgb), 0.3);
    transform: translateY(-1px);
}

/* Secondary Button */
.softex-btn-secondary {
    background-color: var(--softex-bg-input);
    color: var(--softex-text-secondary);
    border: 1px solid var(--softex-border);
}

.softex-btn-secondary:hover {
    background-color: var(--softex-bg-hover);
    border-color: var(--softex-border-dark);
}

/* Ghost Button (for filters, dropdowns) */
.softex-btn-ghost {
    background-color: var(--softex-bg-card);
    color: var(--softex-text-secondary);
    border: 1px solid var(--softex-border);
    border-radius: var(--softex-radius-full);
    height: 40px;
    padding: 0 var(--softex-space-4);
}

.softex-btn-ghost:hover {
    background-color: var(--softex-primary-alpha-5);
    border-color: var(--softex-primary-alpha-20);
    color: var(--softex-primary);
}

/* Icon Button (for table actions) */
.softex-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--softex-radius-full);
    background-color: transparent;
    color: var(--softex-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--softex-transition-fast);
}

.softex-btn-icon:hover {
    background-color: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
    transform: scale(1.1);
}

/* Standardized Icon Button for Tables */
.btn-icon-sm {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--softex-transition-fast) !important;
    border: none !important;
    background: transparent !important;
}

.btn-icon-sm:hover {
    background-color: var(--softex-primary-alpha-10) !important;
    color: var(--softex-primary) !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 4px 10px rgba(var(--softex-primary-rgb), 0.2) !important;
}

.btn-icon-sm.text-danger:hover {
    background-color: var(--softex-danger-bg) !important;
    color: var(--softex-danger) !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2) !important;
}

/* Header Button (top nav icons with background) */
.softex-header-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--softex-radius-full);
    background-color: var(--softex-bg-input);
    border: 1px solid var(--softex-border);
    color: var(--softex-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--softex-transition-fast);
}

.softex-header-btn:hover {
    background-color: var(--softex-primary-alpha-10);
    border-color: var(--softex-primary-alpha-20);
    color: var(--softex-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. FORM CONTROLS - Pill Shaped
═══════════════════════════════════════════════════════════════════════════ */

.softex-form-label {
    display: block;
    font-size: var(--softex-text-sm);
    font-weight: var(--softex-font-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--softex-text-secondary);
    margin-bottom: var(--softex-space-2);
}

/* Table safety: prevent label utility from breaking table header/body layout */
th.softex-form-label,
td.softex-form-label,
th.softex-label,
td.softex-label,
.softex-table th.softex-form-label,
.softex-table td.softex-form-label,
.softex-table th.softex-label,
.softex-table td.softex-label {
    display: table-cell;
    margin-bottom: 0;
}

.softex-form-label .required {
    color: var(--softex-danger);
}

.softex-form-control {
    width: 100%;
    height: 44px;
    padding: 0 var(--softex-space-5);
    background-color: var(--softex-bg-input);
    border: 1px solid var(--softex-border-dark);
    border-radius: var(--softex-radius-full); /* PILL SHAPE */
    font-family: var(--softex-font-body);
    font-size: var(--softex-text-base);
    color: var(--softex-text-primary);
    outline: none;
    transition: all var(--softex-transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.softex-form-control:focus {
    border-color: var(--softex-primary);
    background-color: var(--softex-bg-card);
    box-shadow: 0 0 0 4px var(--softex-primary-alpha-10);
}

.softex-form-control::placeholder {
    color: var(--softex-text-muted);
}

/* Select with custom arrow */
select.softex-form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616289' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Bootstrap select harmonized with Softex style */
select.form-select {
    border-radius: var(--softex-radius-full);
    border-color: var(--softex-border-dark);
    background-color: var(--softex-bg-input);
    color: var(--softex-text-primary);
    font-family: var(--softex-font-body);
}

select.form-select:focus {
    border-color: var(--softex-primary);
    background-color: var(--softex-bg-card);
    box-shadow: 0 0 0 3px var(--softex-primary-alpha-10);
}

select.form-select option {
    color: var(--softex-text-primary);
}

/* Textarea - rounded but not pill */
textarea.softex-form-control {
    height: auto;
    min-height: 100px;
    padding: var(--softex-space-4) var(--softex-space-5);
    border-radius: var(--softex-radius-xl); /* Rounded, not pill */
    resize: vertical;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. SEARCH INPUT - Pill Shaped with Icon
═══════════════════════════════════════════════════════════════════════════ */

.softex-search {
    position: relative;
    width: 256px;
    height: 44px;
}

.softex-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--softex-text-muted);
    font-size: 20px;
    pointer-events: none;
}

.softex-search-input {
    width: 100%;
    height: 100%;
    padding-left: 52px; /* Space for icon */
    padding-right: var(--softex-space-5);
    background-color: var(--softex-bg-input);
    border: 1px solid var(--softex-border);
    border-radius: var(--softex-radius-full); /* PILL SHAPE */
    font-family: var(--softex-font-body);
    font-size: 13px;
    font-weight: var(--softex-font-medium);
    color: var(--softex-text-primary);
    outline: none;
    transition: all var(--softex-transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.softex-search-input:focus {
    background-color: var(--softex-bg-card);
    border-color: var(--softex-primary);
    box-shadow: 0 0 0 4px var(--softex-primary-alpha-10);
}

.softex-search-input::placeholder {
    color: var(--softex-text-muted);
    font-weight: var(--softex-font-normal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. STATUS PILLS
═══════════════════════════════════════════════════════════════════════════ */

.softex-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--softex-space-2);
    min-width: 100px;
    padding: 6px 14px;
    border-radius: var(--softex-radius-full);
    font-size: var(--softex-text-xs);
    font-weight: var(--softex-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.softex-status-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.softex-status-pill.success {
    background-color: var(--softex-success-bg);
    color: var(--softex-success);
}

.softex-status-pill.warning {
    background-color: var(--softex-warning-bg);
    color: var(--softex-warning);
}

.softex-status-pill.danger {
    background-color: var(--softex-danger-bg);
    color: var(--softex-danger);
}

.softex-status-pill.info {
    background-color: var(--softex-info-bg);
    color: var(--softex-info);
}

/* Phase/Sprint Status Pills */
.softex-status-active,
.softex-status-pill.softex-status-active {
    background-color: var(--softex-success-bg);
    color: var(--softex-success);
    border: 1px solid var(--softex-success);
}

.softex-status-pending,
.softex-status-pill.softex-status-pending {
    background-color: var(--softex-warning-bg);
    color: var(--softex-warning);
    border: 1px solid var(--softex-warning);
}

.softex-status-info,
.softex-status-pill.softex-status-info {
    background-color: var(--softex-info-bg);
    color: var(--softex-info);
    border: 1px solid var(--softex-info);
}

.softex-status-danger,
.softex-status-pill.softex-status-danger {
    background-color: var(--softex-danger-bg);
    color: var(--softex-danger);
    border: 1px solid var(--softex-danger);
}

.softex-status-inactive,
.softex-status-pill.softex-status-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.softex-status-warning,
.softex-status-pill.softex-status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.softex-status-success,
.softex-status-pill.softex-status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Phase-specific status colors */
.softex-status-notstarted {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.softex-status-inprogress {
    background-color: var(--softex-info-bg);
    color: var(--softex-info);
    border: 1px solid var(--softex-info);
}

.softex-status-completed {
    background-color: #d1fae5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

.softex-status-onhold {
    background-color: var(--softex-warning-bg);
    color: var(--softex-warning);
    border: 1px solid var(--softex-warning);
}

.softex-status-delayed {
    background-color: var(--softex-danger-bg);
    color: var(--softex-danger);
    border: 1px solid var(--softex-danger);
}

.softex-status-cancelled {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. CARDS - Glassmorphism Effect
═══════════════════════════════════════════════════════════════════════════ */

.softex-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--softex-radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--softex-shadow-card);
    padding: var(--softex-space-6);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .softex-card {
    background: rgba(26, 27, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.softex-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 30px -5px rgba(99, 102, 241, 0.15);
}

/* Card with gradient border on hover */
.softex-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--softex-radius-2xl);
    padding: 2px;
    background: linear-gradient(135deg, var(--card-color-from, var(--softex-gradient-from)), var(--card-color-to, var(--softex-gradient-to)), transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.2;
    transition: opacity 0.4s;
    pointer-events: none;
}

.softex-card:hover::before {
    opacity: 1;
}

/* Watermark icon in card */
.softex-card-watermark {
    position: absolute;
    right: -15px;
    bottom: -15px;
    font-size: 100px !important;
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
    color: var(--softex-gradient-from);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. PROGRESS BAR
═══════════════════════════════════════════════════════════════════════════ */

.softex-progress {
    height: 8px;
    background-color: var(--softex-border);
    border-radius: var(--softex-radius-full);
    overflow: hidden;
}

.softex-progress-bar {
    height: 100%;
    border-radius: var(--softex-radius-full);
    background: var(--softex-gradient);
    box-shadow: 0 0 10px var(--softex-primary-alpha-20);
    transition: width var(--softex-transition-normal);
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. TABLE
═══════════════════════════════════════════════════════════════════════════ */

.softex-table-container {
    background-color: var(--softex-bg-card);
    border-radius: var(--softex-radius-2xl);
    border: 1px solid var(--softex-border);
    overflow: hidden;
}

.softex-table {
    width: 100%;
    border-collapse: collapse;
}

.softex-table th {
    background-color: var(--softex-bg-input);
    padding: var(--softex-space-4) var(--softex-space-6);
    font-size: var(--softex-text-xs);
    font-weight: var(--softex-font-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--softex-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--softex-border);
}

.softex-table td {
    padding: var(--softex-space-4) var(--softex-space-6);
    border-bottom: 1px solid var(--softex-border);
}

.softex-table tr:last-child td {
    border-bottom: none;
}

.softex-table tr:hover {
    background-color: var(--softex-primary-alpha-5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */

.softex-sidebar {
    width: var(--softex-sidebar-width);
    background-color: var(--softex-bg-card);
    border-right: 1px solid var(--softex-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: margin var(--softex-transition-slow);
}

.softex-sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--softex-space-3);
    padding: var(--softex-space-3) var(--softex-space-4);
    margin: 2px var(--softex-space-2);
    font-size: var(--softex-text-base);
    font-weight: var(--softex-font-medium);
    color: var(--softex-text-secondary);
    text-decoration: none;
    border-radius: var(--softex-radius-sm);
    transition: all var(--softex-transition-fast);
}

.softex-sidebar-item:hover {
    color: var(--softex-primary);
    background-color: var(--softex-primary-alpha-5);
}

.softex-sidebar-item.active {
    color: var(--softex-primary);
    background-color: var(--softex-primary-alpha-5);
    position: relative;
}

.softex-sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background-color: var(--softex-primary);
    border-radius: 0 4px 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. HEADER
═══════════════════════════════════════════════════════════════════════════ */

.softex-header {
    height: var(--softex-header-height);
    background-color: var(--softex-bg-card);
    border-bottom: 1px solid var(--softex-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--softex-space-8);
    flex-shrink: 0;
}

.softex-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--softex-space-2);
    font-size: var(--softex-text-sm);
    font-weight: var(--softex-font-medium);
    color: var(--softex-text-secondary);
}

.softex-breadcrumb-current {
    color: var(--softex-text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. TOOLBAR
═══════════════════════════════════════════════════════════════════════════ */

.softex-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--softex-space-4);
    padding: var(--softex-space-4);
    background-color: var(--softex-bg-card);
    border-radius: var(--softex-radius-2xl);
    border: 1px solid var(--softex-border);
    min-height: var(--softex-toolbar-height);
    margin-bottom: var(--softex-space-4);
}

.softex-toolbar-title {
    display: flex;
    align-items: center;
    gap: var(--softex-space-4);
    flex-shrink: 0;
}

.softex-toolbar-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background-color: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.softex-toolbar-controls {
    display: flex;
    align-items: center;
    gap: var(--softex-space-4);
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. PANEL (Create/Edit Offcanvas)
═══════════════════════════════════════════════════════════════════════════ */

.softex-panel {
    width: 0;
    opacity: 0;
    visibility: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--softex-border);
    height: 100vh;
    overflow: hidden;
    transition: all var(--softex-transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.softex-panel.open {
    width: var(--softex-panel-width);
    opacity: 1;
    visibility: visible;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.03);
}

.softex-panel.open.panel-xl {
    width: 700px;
}

.dark .softex-panel {
    background: rgba(26, 27, 46, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.softex-panel-header {
    padding: var(--softex-space-5);
    border-bottom: 1px solid var(--softex-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.softex-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--softex-space-6);
}

.softex-panel-footer {
    padding: var(--softex-space-6);
    border-top: 1px solid var(--softex-border);
    display: flex;
    gap: var(--softex-space-3);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   12. VIEW TOGGLE (Grid/List)
═══════════════════════════════════════════════════════════════════════════ */

.softex-view-toggle {
    display: flex;
    align-items: center;
    height: 40px;
    background-color: var(--softex-bg-input);
    border-radius: var(--softex-radius-full);
    padding: 4px;
    border: 1px solid var(--softex-border);
}

.softex-view-toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--softex-radius-full);
    background-color: transparent;
    color: var(--softex-text-muted);
    border: none;
    cursor: pointer;
    transition: all var(--softex-transition-fast);
}

.softex-view-toggle-btn.active {
    background-color: var(--softex-bg-card);
    color: var(--softex-primary);
    box-shadow: var(--softex-shadow-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   13. DROPDOWN MENU
═══════════════════════════════════════════════════════════════════════════ */

.softex-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--softex-space-2);
    min-width: 180px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--softex-border);
    border-radius: var(--softex-radius-lg);
    box-shadow: var(--softex-shadow-xl);
    padding: var(--softex-space-2);
    z-index: var(--softex-z-dropdown);
    display: none;
}

.softex-dropdown-menu.show {
    display: block;
}

.dark .softex-dropdown-menu {
    background: rgba(30, 31, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.softex-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--softex-space-2);
    padding: 10px var(--softex-space-3);
    font-size: var(--softex-text-sm);
    font-weight: var(--softex-font-semibold);
    color: var(--softex-text-secondary);
    text-decoration: none;
    border-radius: var(--softex-radius-sm);
    transition: all var(--softex-transition-fast);
}

.softex-dropdown-item:hover {
    background-color: var(--softex-primary-alpha-5);
    color: var(--softex-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   14. AVATAR
═══════════════════════════════════════════════════════════════════════════ */

.softex-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--softex-text-xs);
    font-weight: var(--softex-font-bold);
    color: var(--softex-text-inverse);
    background-color: var(--softex-primary);
}

.softex-avatar-stack {
    display: flex;
}

.softex-avatar-stack .softex-avatar {
    border: 2px solid var(--softex-bg-card);
    margin-left: -8px;
}

.softex-avatar-stack .softex-avatar:first-child {
    margin-left: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   15. TABS (For complex forms)
═══════════════════════════════════════════════════════════════════════════ */

.softex-tabs {
    display: flex;
    gap: var(--softex-space-2);
    padding: var(--softex-space-2);
    background-color: var(--softex-bg-input);
    border-radius: var(--softex-radius-full);
    margin-bottom: var(--softex-space-6);
}

.softex-tab {
    flex: 1;
    padding: 10px var(--softex-space-4);
    border-radius: var(--softex-radius-full);
    background-color: transparent;
    border: none;
    font-family: var(--softex-font-body);
    font-size: var(--softex-text-sm);
    font-weight: var(--softex-font-bold);
    color: var(--softex-text-secondary);
    cursor: pointer;
    transition: all var(--softex-transition-fast);
}

.softex-tab:hover {
    background-color: var(--softex-bg-card);
}

.softex-tab.active {
    background-color: var(--softex-bg-card);
    color: var(--softex-primary);
    box-shadow: var(--softex-shadow-sm);
}

.softex-tab-content {
    display: none;
}

.softex-tab-content.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   16. SCROLLBAR
═══════════════════════════════════════════════════════════════════════════ */

.softex-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.softex-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.softex-scrollbar::-webkit-scrollbar-thumb {
    background: var(--softex-border-dark);
    border-radius: var(--softex-radius-full);
}

/* ═══════════════════════════════════════════════════════════════════════════
   17. UTILITIES
═══════════════════════════════════════════════════════════════════════════ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--softex-space-2); }
.gap-3 { gap: var(--softex-space-3); }
.gap-4 { gap: var(--softex-space-4); }
.gap-6 { gap: var(--softex-space-6); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.h-screen { height: 100vh; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
.col-span-4 { grid-column: span 4; }
.col-span-8 { grid-column: span 8; }

/* Spacing */
.mb-4 { margin-bottom: var(--softex-space-4); }
.mb-6 { margin-bottom: var(--softex-space-6); }
.p-6 { padding: var(--softex-space-6); }

/* ═══════════════════════════════════════════════════════════════════════════
   18. FOCUS MODE - Sidebar hides when panel opens
═══════════════════════════════════════════════════════════════════════════ */

/* When panel is open, hide sidebar */
.focus-mode .softex-sidebar {
    margin-left: -280px !important;
}

.focus-mode .softex-main {
    margin-left: 0 !important;
}

/* Main content wrapper squeezes when panel opens */
.softex-main {
    flex: 1;
    transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
    min-width: 0;
    will-change: transform, width;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   19. PLATINUM CARD - Premium glassmorphism card from HTML mockup
═══════════════════════════════════════════════════════════════════════════ */

.softex-card-platinum {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--softex-radius-2xl);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--softex-shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: var(--softex-space-6);
}

.dark .softex-card-platinum {
    background: rgba(26, 27, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px -1px rgba(0, 0, 0, 0.2);
}

/* Gradient border on hover */
.softex-card-platinum::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--softex-radius-2xl);
    padding: 2px;
    background: linear-gradient(135deg, var(--softex-gradient-from), var(--softex-gradient-to), transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.2;
    transition: opacity 0.4s;
    pointer-events: none;
}

.softex-card-platinum:hover {
    transform: translateY(-8px);
    box-shadow: var(--softex-shadow-hover);
}

.softex-card-platinum:hover::before {
    opacity: 1;
}

/* Watermark icon */
.softex-card-platinum .watermark-icon {
    position: absolute;
    right: -15px;
    bottom: -15px;
    font-size: 100px !important;
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
    color: var(--softex-primary);
}

.dark .softex-card-platinum .watermark-icon {
    opacity: 0.05;
}

/* ═══════════════════════════════════════════════════════════════════════════
   20. PAGE TOOLBAR - Unified toolbar from HTML mockup
═══════════════════════════════════════════════════════════════════════════ */

.softex-page-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background-color: var(--softex-bg-card);
    border-radius: 24px;
    border: 1px solid #f0f0f4;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    min-height: 72px;
    margin-bottom: 16px;
}

.dark .softex-page-toolbar {
    background-color: #1a1b2e;
    border-color: #2d2e45;
}

/* Title Section */
.softex-page-toolbar-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.softex-page-toolbar-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background-color: rgba(19, 23, 236, 0.1);
    color: var(--softex-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.softex-page-toolbar-icon i,
.softex-page-toolbar-icon .material-symbols-outlined {
    font-size: 24px;
}

.softex-page-toolbar-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #111118;
    line-height: 1;
    margin: 0 0 4px 0;
}

.dark .softex-page-toolbar-text h1 {
    color: var(--softex-bg-card);
}

.softex-page-toolbar-text p {
    font-size: 9px;
    font-weight: 700;
    color: var(--softex-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

/* Controls Section */
.softex-page-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Search in Toolbar */
.softex-toolbar-search {
    position: relative;
    width: 256px;
    height: 40px;
}

.softex-toolbar-search .material-symbols-outlined,
.softex-toolbar-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--softex-text-muted);
    font-size: 18px;
    pointer-events: none;
}

.softex-toolbar-search input {
    width: 100%;
    height: 100%;
    padding-left: 44px;
    padding-right: 16px;
    background-color: #f9fafb;
    border: 1px solid transparent;
    border-radius: var(--softex-radius-full);
    font-size: 11px;
    color: #111118;
    outline: none;
    transition: all 0.15s ease;
}

.dark .softex-toolbar-search input {
    background-color: rgba(255,255,255,0.05);
    color: var(--softex-bg-card);
}

.softex-toolbar-search input:focus {
    border-color: rgba(19, 23, 236, 0.3);
    background-color: var(--softex-bg-card);
}

.softex-toolbar-search input::placeholder {
    color: var(--softex-text-muted);
}

/* Filter Button */
.softex-filter-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: var(--softex-radius-full);
    border: 1px solid #f0f0f4;
    background-color: var(--softex-bg-card);
    color: #616289;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dark .softex-filter-btn {
    background-color: #1a1b2e;
    border-color: rgba(255,255,255,0.1);
    color: #d1d5db;
}

.softex-filter-btn:hover {
    background-color: #f9fafb;
}

.softex-toolbar-select {
    height: 40px;
    padding: 0 32px 0 16px;
    border-radius: var(--softex-radius-full);
    border: 1px solid #f0f0f4;
    background-color: var(--softex-bg-card);
    color: #616289;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23616289' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.dark .softex-toolbar-select {
    background-color: #1a1b2e;
    border-color: rgba(255,255,255,0.1);
    color: #d1d5db;
}

/* View Toggle */
.softex-view-toggle {
    height: 40px;
    display: flex;
    align-items: center;
    background-color: rgba(243, 244, 246, 0.8);
    border-radius: var(--softex-radius-full);
    padding: 4px;
    border: 1px solid #f0f0f4;
}

.dark .softex-view-toggle {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.softex-view-toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--softex-radius-full);
    background-color: transparent;
    color: var(--softex-text-muted);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.softex-view-toggle-btn.active {
    background-color: var(--softex-bg-card);
    color: var(--softex-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.dark .softex-view-toggle-btn.active {
    background-color: var(--softex-primary);
    color: var(--softex-bg-card);
}

/* Create Button */
.softex-create-btn {
    height: 40px;
    padding: 0 24px;
    border-radius: var(--softex-radius-full);
    background-color: var(--softex-primary);
    color: var(--softex-bg-card);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(19, 23, 236, 0.2);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.softex-create-btn:hover {
    box-shadow: 0 8px 20px rgba(19, 23, 236, 0.4);
    transform: scale(1.02);
}

.softex-create-btn:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════
   21. PUSH PANEL - Slides in and squeezes content (FLEXBOX SQUEEZE)
═══════════════════════════════════════════════════════════════════════════ */

/* Push Panel Container - uses flexbox to squeeze main content */
.softex-push-panel-container {
    width: 0;
    flex-shrink: 0;
    transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: width;
    overflow: hidden;
    position: relative;
}

.softex-push-panel-container.open {
    width: 480px;
}

/* Panel inside the container - NOT fixed, part of flex flow */
.softex-push-panel {
    width: 480px;
    opacity: 0;
    visibility: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    height: 100vh;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    border-top-left-radius: var(--softex-radius-2xl);
    border-bottom-left-radius: var(--softex-radius-2xl);
}

.softex-push-panel.open {
    opacity: 1;
    visibility: visible;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
}

/* When panel is inside page content (not global), use fixed positioning */
.softex-content .softex-push-panel {
    position: fixed;
}

.dark .softex-push-panel {
    background: rgba(26, 27, 46, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* Panel Header */
.softex-push-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f4;
    background-color: var(--softex-bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.dark .softex-push-panel-header {
    background-color: #1a1b2e;
    border-bottom-color: rgba(255,255,255,0.05);
}

.softex-push-panel-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.softex-push-panel-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background-color: var(--softex-primary);
    color: var(--softex-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(19, 23, 236, 0.2);
}

.softex-push-panel-header-text h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #111118;
    margin: 0;
    line-height: 1.2;
}

.dark .softex-push-panel-header-text h5 {
    color: var(--softex-bg-card);
}

.softex-push-panel-header-text p {
    font-size: 9px;
    font-weight: 700;
    color: var(--softex-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.softex-push-panel-close {
    width: 32px;
    height: 32px;
    border-radius: var(--softex-radius-full);
    background: transparent;
    border: none;
    color: #616289;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.softex-push-panel-close:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Panel Body */
.softex-push-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    padding-bottom: 32px;
    max-width: 100%;
}

/* Panel Footer */
.softex-push-panel-footer {
    padding: 24px;
    border-top: 1px solid #f0f0f4;
    background-color: var(--softex-bg-card);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.dark .softex-push-panel-footer {
    background-color: #1a1b2e;
    border-top-color: rgba(255,255,255,0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   22. LIST VIEW ROW - Professional table row
═══════════════════════════════════════════════════════════════════════════ */

.softex-list-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background-color: var(--softex-bg-card);
    border-radius: 16px;
    border: 1px solid #f0f0f4;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dark .softex-list-row {
    background-color: #1a1b2e;
    border-color: #2d2e45;
}

.softex-list-row:hover {
    background-color: rgba(59, 130, 246, 0.03);
    border-color: rgba(59, 130, 246, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   23. FORM STYLING FOR PANEL
═══════════════════════════════════════════════════════════════════════════ */

.softex-form-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #616289;
    margin-bottom: 8px;
    display: block;
}

.dark .softex-form-label {
    color: #a0a0c0;
}

.softex-form-control {
    background: rgba(243, 244, 246, 0.5);
    border: 1px solid #e5e7eb;
    border-radius: var(--softex-radius-full);
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s;
    outline: none;
}

.dark .softex-form-control {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.softex-form-control-legacy:focus {
    border-color: #6366f1;
    background: var(--softex-bg-card);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.dark .softex-form-control-legacy:focus {
    background: rgba(255, 255, 255, 0.05);
}

/* Form control aliases for backwards compatibility */
.softex-input,
.softex-select,
.softex-textarea {
    display: block;
    width: 100%;
    padding: var(--softex-space-3) var(--softex-space-4);
    font-size: var(--softex-text-base);
    font-weight: var(--softex-font-medium);
    line-height: 1.5;
    color: var(--softex-text-primary);
    background-color: var(--softex-bg-input);
    border: 1px solid var(--softex-border-dark);
    border-radius: var(--softex-radius-full); /* PILL SHAPE */
    font-family: var(--softex-font-body);
    outline: none;
    transition: all var(--softex-transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.softex-textarea {
    border-radius: var(--softex-radius-xl); /* Textareas use rounded, not pill (20px) */
    min-height: 100px;
    padding: var(--softex-space-4) var(--softex-space-5);
    resize: vertical;
}

.softex-input:focus,
.softex-select:focus,
.softex-textarea:focus {
    border-color: var(--softex-primary);
    background-color: var(--softex-bg-card);
    box-shadow: 0 0 0 4px var(--softex-primary-alpha-10);
}

.softex-input::placeholder,
.softex-select::placeholder,
.softex-textarea::placeholder {
    color: var(--softex-text-muted);
}

/* Select with custom arrow */
select.softex-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616289' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.softex-label {
    font-weight: 500;
    color: var(--softex-text-secondary);
    margin-bottom: 0.375rem; /* 6px - reduced from 8px */
    display: block;
    font-size: 0.8125rem; /* 13px */
}

.softex-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--softex-radius-full); /* 9999px */
    font-size: 0.75rem;
    font-weight: 500;
}

.softex-status-pill.active {
    background-color: var(--softex-success-bg, rgba(16, 185, 129, 0.1));
    color: var(--softex-success);
}

.softex-status-pill.inactive {
    background-color: var(--softex-danger-bg, rgba(239, 68, 68, 0.1));
    color: var(--softex-danger);
}

.softex-status-pill.pending {
    background-color: var(--softex-warning-bg, rgba(245, 158, 11, 0.1));
    color: var(--softex-warning);
}

.softex-color-display {
    font-family: var(--softex-font-mono, monospace);
    font-size: 0.875rem;
    color: var(--softex-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   24. GRID CARDS CONTAINER
═══════════════════════════════════════════════════════════════════════════ */

.softex-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

@media (min-width: 768px) {
    .softex-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .softex-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .softex-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   25. LIST TABLE CONTAINER
═══════════════════════════════════════════════════════════════════════════ */

.softex-list-table {
    background-color: var(--softex-bg-card);
    border-radius: 24px;
    border: 1px solid #f0f0f4;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dark .softex-list-table {
    background-color: #1a1b2e;
    border-color: #2d2e45;
}

.softex-list-table table {
    width: 100%;
    border-collapse: collapse;
}

.softex-list-table thead tr {
    background-color: #f9fafb;
    border-bottom: 1px solid #f0f0f4;
}

.dark .softex-list-table thead tr {
    background-color: #212236;
    border-bottom-color: #2d2e45;
}

.softex-list-table th {
    padding: 16px 24px;
    font-size: 10px;
    font-weight: 800;
    color: var(--softex-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
}

.softex-list-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f4;
}

.dark .softex-list-table td {
    border-bottom-color: #2d2e45;
}

.softex-list-table tbody tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.softex-list-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.04);
    transform: translateX(6px);
    border-left-color: var(--softex-primary, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.softex-list-table tbody tr:last-child td {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGACY FORM COMPONENTS (Deprecated) - For Softex Push Panel Forms
   Based on HTML mockup (lines 870-950)
   ═══════════════════════════════════════════════════════════════════════════ */

.softex-form-label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--softex-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.softex-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #111118;
    background-color: #f9fafb;
    border: 2px solid transparent;
    border-radius: var(--softex-radius-full);
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.softex-form-control-legacy:focus {
    border-color: var(--color-primary, var(--softex-primary));
    background-color: var(--softex-bg-card);
    box-shadow: 0 0 0 4px rgba(19, 23, 236, 0.1);
}

.softex-form-control-legacy::placeholder {
    color: var(--softex-text-muted);
    font-weight: 400;
}

.softex-form-control-legacy:disabled {
    background-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Select dropdown */
select.softex-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea */
textarea.softex-form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Grid layout utilities (Tailwind-like) */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-span-4 {
    grid-column: span 4 / span 4;
}

.col-span-8 {
    grid-column: span 8 / span 8;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-5 {
    gap: 1.25rem;
}

/* Spacing utilities */
.space-y-3 > * + * {
    margin-top: 0.75rem; /* 12px */
}

.space-y-4 > * + * {
    margin-top: 1rem; /* 16px - F09 Rule: Form fields */
}

.space-y-5 > * + * {
    margin-top: 1.25rem; /* 20px - Avoid for forms, use space-y-4 instead */
}

.pt-4 {
    padding-top: 1rem;
}

.min-h-\[100px\] {
    min-height: 100px;
}

/* Dark mode support */
.dark .softex-form-control {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--softex-bg-card);
}

.dark .softex-form-control-legacy:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary, var(--softex-primary));
}

.dark .softex-form-label {
    color: var(--softex-text-muted);
}

/* Design Token Utility Classes */
.rounded-softex-sm { border-radius: var(--softex-radius-sm) !important; }
.rounded-softex-md { border-radius: var(--softex-radius-md) !important; }
.rounded-softex-lg { border-radius: var(--softex-radius-lg) !important; }
.rounded-softex-xl { border-radius: var(--softex-radius-xl) !important; }
.rounded-softex-2xl { border-radius: var(--softex-radius-2xl) !important; }
.rounded-softex-full { border-radius: var(--softex-radius-full) !important; }

/* Nifty Button (pill-shaped, for forms) */
.softex-btn-legacy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border: none;
    border-radius: var(--softex-radius-full); /* pill shape */
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.softex-btn-legacy:hover {
    transform: translateY(-1px);
}

.softex-btn-legacy:active {
    transform: scale(0.98);
}

.softex-btn-legacy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rounded pill utility */
.rounded-pill {
    border-radius: var(--softex-radius-full);
}

/* Flex utilities for form buttons */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-\[2\] {
    flex: 2 1 0%;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAILS PAGE COMPONENTS
   Used by Portfolio/Program/Project Details pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* Header */
.details-brand-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.3rem; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.details-page-title {
    font-weight: 800; color: var(--softex-text-primary); margin: 0;
    letter-spacing: -0.015em; font-size: 1.25rem;
}
.details-code-badge {
    background: var(--softex-primary-alpha-10, rgba(99,102,241,0.1));
    color: var(--softex-text-secondary); font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 9999px;
}
.details-dot-sep {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--softex-text-muted); opacity: 0.5;
}
.details-priority-pill {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px 10px; border-radius: 9999px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
}

/* Metric Cards */
.details-metric-label {
    font-size: var(--softex-text-xs, 0.65rem); font-weight: var(--softex-font-extrabold, 800);
    color: var(--softex-text-muted); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: var(--softex-space-2, 8px);
}
.details-metric-value {
    font-size: 42px; font-weight: var(--softex-font-extrabold, 800);
    color: var(--softex-text-primary); line-height: 1;
}
.details-metric-unit {
    font-size: 18px; font-weight: var(--softex-font-bold, 700);
    color: var(--softex-text-muted); margin-bottom: 8px;
}
.details-metric-icon {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--softex-bg-hover, #f3f4f6);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.details-metric-sublabel {
    font-size: var(--softex-text-xs, 0.65rem); font-weight: 700;
    color: var(--softex-text-muted); text-transform: uppercase;
    letter-spacing: 0.05em;
}
.details-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); flex-shrink: 0;
}
.details-grid-pattern {
    background-image: radial-gradient(var(--softex-primary, #6366f1) 0.5px, transparent 0.5px);
    background-size: 10px 10px;
}

/* Table Section */
.details-section-title {
    font-family: var(--softex-font-heading); font-weight: var(--softex-font-extrabold, 800);
    color: var(--softex-text-primary); margin: 0;
}
.details-section-subtitle {
    font-size: var(--softex-text-sm, 0.85rem); color: var(--softex-text-muted); margin: 0;
}
.details-row-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.details-row-title {
    font-weight: var(--softex-font-bold, 700); color: var(--softex-text-primary);
    font-size: 13px;
}
.details-row-code {
    font-size: 10px; color: var(--softex-text-muted);
    font-weight: var(--softex-font-semibold, 600); font-family: monospace;
}
.details-row-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; flex-shrink: 0;
}
.details-row-manager {
    font-size: 13px; font-weight: var(--softex-font-semibold, 600);
    color: var(--softex-text-primary);
}
.details-kebab-btn {
    width: 32px; height: 32px; border: none; background: transparent;
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; color: #9ca3af; cursor: pointer;
    transition: all 0.2s;
}
.details-kebab-btn:hover { background: rgba(99,102,241,0.1); color: var(--softex-primary); }

/* Empty State */
.details-empty-icon { font-size: 64px; opacity: 0.2; color: var(--softex-text-muted); display: block; margin-bottom: 12px; }
.details-empty-title { font-weight: var(--softex-font-bold, 700); color: var(--softex-text-secondary); }
.details-empty-subtitle { font-size: 13px; color: var(--softex-text-muted); }

/* Sidebar */
.details-sidebar-label {
    font-size: var(--softex-text-xs, 0.65rem); font-weight: var(--softex-font-extrabold, 800);
    color: var(--softex-text-muted); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: var(--softex-space-3, 12px);
}
.details-sidebar-text {
    font-size: var(--softex-text-base, 14px); color: var(--softex-text-secondary);
    line-height: 1.6; margin: 0;
}
.details-identity-box {
    flex: 1; padding: 12px; border-radius: 10px; text-align: center;
    background: rgba(243,244,246,0.5); border: 1px solid var(--softex-border, #e5e7eb);
}
.details-identity-swatch {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
}
.details-identity-caption {
    font-size: var(--softex-text-xs, 0.65rem); font-weight: var(--softex-font-bold, 700);
    color: var(--softex-text-secondary); text-transform: uppercase;
}
.details-audit-label {
    font-size: var(--softex-text-xs, 0.65rem); font-weight: var(--softex-font-bold, 700);
    color: var(--softex-text-muted); text-transform: uppercase;
}
.details-audit-value {
    font-size: 13px; font-weight: var(--softex-font-semibold, 600);
    color: var(--softex-text-secondary);
}

/* Table hover - enhanced in main rule above */

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL DROPDOWN CONSISTENCY
   Keeps native selects aligned with searchable dropdown style
═══════════════════════════════════════════════════════════════════════════ */
select.form-select,
select.form-control,
select.softex-form-control,
select.softex-select,
select.softex-input,
select.task-filter-select,
select.wi-filter-select,
select.min-w-200px,
select.filter-select,
select.vft-select {
    border-radius: var(--softex-radius-full) !important;
    border: 1px solid var(--softex-border-dark) !important;
    background-color: var(--softex-bg-input) !important;
    color: var(--softex-text-primary) !important;
    font-family: var(--softex-font-body) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    min-height: 44px !important;
    line-height: 1.2 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616289' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 40px !important;
    padding-left: 16px !important;
}

/* Keep compact variants visually consistent with Softex dropdown shape */
select.form-select.form-select-sm,
select.form-control.form-control-sm {
    min-height: 44px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

select.form-select:focus,
select.form-control:focus,
select.softex-form-control:focus,
select.softex-select:focus,
select.softex-input:focus,
select.task-filter-select:focus,
select.wi-filter-select:focus,
select.min-w-200px:focus,
select.filter-select:focus,
select.vft-select:focus {
    border-color: var(--softex-primary) !important;
    background-color: var(--softex-bg-card) !important;
    box-shadow: 0 0 0 3px var(--softex-primary-alpha-10) !important;
}

select.form-select option,
select.form-control option,
select.softex-form-control option,
select.softex-select option,
select.softex-input option,
select.task-filter-select option,
select.wi-filter-select option,
select.min-w-200px option,
select.filter-select option,
select.vft-select option {
    color: var(--softex-text-primary) !important;
}

/* Native select -> searchable wrapper (used in offcanvas forms) */
.softex-native-searchable {
    position: relative;
}

.softex-native-searchable-input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 16px;
    background-color: var(--softex-bg-card);
    border: 2px solid var(--softex-primary-alpha-20);
    border-radius: var(--softex-radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--softex-text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.softex-native-searchable.open .softex-native-searchable-input,
.softex-native-searchable-input:focus {
    border-color: var(--softex-primary);
    box-shadow: 0 0 0 3px var(--softex-primary-alpha-10), var(--softex-shadow-sm);
}

.softex-native-searchable-input::placeholder {
    color: var(--softex-text-muted);
    font-weight: 400;
}

.softex-native-searchable-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--softex-text-secondary);
    font-size: 16px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.softex-native-searchable.open .softex-native-searchable-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.softex-native-searchable-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--softex-bg-card);
    border-radius: var(--softex-radius-2xl);
    border: 1px solid var(--softex-border);
    box-shadow: var(--softex-shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 50;
}

.softex-native-searchable.open .softex-native-searchable-dropdown {
    max-height: 260px;
    opacity: 1;
}

.softex-native-searchable-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
}

.softex-native-searchable-options::-webkit-scrollbar {
    width: 6px;
}

.softex-native-searchable-options::-webkit-scrollbar-thumb {
    background: var(--softex-border-dark);
    border-radius: 10px;
}

.softex-native-searchable-option {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    font-weight: 500;
    color: var(--softex-text-primary);
}

.softex-native-searchable-option.hint {
    font-style: italic;
    color: var(--softex-text-secondary);
    background-color: var(--softex-primary-alpha-5);
}

.softex-native-searchable-option:hover {
    background-color: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
}

.softex-native-searchable-option.selected {
    background-color: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
    font-weight: 600;
}

.softex-native-searchable-option.hidden {
    display: none;
}

.softex-native-searchable-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cross-component dropdown visual consistency */
.softex-searchable-select-search,
.planning-searchable-input,
.basic-searchable-input,
.ac-searchable-input,
.softex-native-searchable-input {
    height: 44px !important;
    border-radius: var(--softex-radius-full) !important;
    background-color: var(--softex-bg-card) !important;
    border: 2px solid var(--softex-primary-alpha-20) !important;
    color: var(--softex-text-primary) !important;
}

.softex-searchable-select {
    position: relative;
}

.softex-searchable-select-dropdown,
.planning-searchable-dropdown,
.basic-searchable-dropdown,
.ac-searchable-dropdown,
.softex-native-searchable-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: 260px;
    overflow-y: auto;
    background: var(--softex-bg-card) !important;
    border-radius: var(--softex-radius-2xl) !important;
    border: 1px solid var(--softex-border) !important;
    box-shadow: var(--softex-shadow-lg) !important;
}

.softex-searchable-select.open .softex-searchable-select-dropdown,
.basic-searchable.open .basic-searchable-dropdown,
.planning-searchable.open .planning-searchable-dropdown,
.ac-searchable.open .ac-searchable-dropdown,
.softex-native-searchable.open .softex-native-searchable-dropdown {
    display: block;
}

.softex-searchable-select-option,
.planning-searchable-option,
.basic-searchable-option,
.ac-searchable-option,
.softex-native-searchable-option {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--softex-text-primary) !important;
}

/* Legacy searchable-select wrapper used by Technology partial panels */
.searchable-select-wrapper {
    position: relative;
}

.searchable-select-display {
    cursor: pointer;
}

.searchable-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--softex-bg-card);
    border-radius: var(--softex-radius-2xl);
    border: 1px solid var(--softex-border);
    box-shadow: var(--softex-shadow-lg);
    z-index: 60;
    max-height: 260px;
    overflow: hidden;
}

.searchable-select-dropdown.show,
.searchable-select-dropdown.open {
    display: block;
}

.searchable-select-search {
    padding: 10px 12px;
    border-bottom: 1px solid var(--softex-border);
}

.searchable-select-search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--softex-text-primary);
}

.searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--softex-text-primary);
}

.searchable-select-option:hover,
.searchable-select-option.selected {
    background: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
}

