/* =============================================================================
   Organization Dashboard Styles
   ============================================================================= */

/* Main content container - flex row for sidebar + content */
.org-dashboard-content {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--topbar-height) - var(--footer-height));
}

/* =============================================================================
   Organization Dashboard Sidebar
   ============================================================================= */

.org-dashboard-sidebar {
    flex-shrink: 0;
    width: 240px;
    color: var(--color-text);
    background-color: var(--color-background);
    padding: 1rem;
    z-index: 100;
    justify-self: flex-start;
    height: calc(100vh - var(--topbar-height));
    transform: translate(-1rem, -1rem); /* Moves it back over the margin to connect with main sidebar */
    padding-left: 1.5rem;
    padding-top: 1.5rem;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 12px 40px 0 rgba(0, 0, 0, 0.19);
    position: relative;
    overflow-y: auto;
}

/* Gradient fade effect on right edge */
.org-dashboard-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -16px;
    width: 16px;
    height: 100%;
    background: linear-gradient(90deg, var(--color-background) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.org-dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =============================================================================
   Navigation Sections
   ============================================================================= */

.org-nav-section {
    margin-bottom: 0.5rem;
}

/* Section headings */
.org-nav-heading {
    margin: 0 0 0.5rem 0;
    padding-left: 0.75rem;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation menu within sections */
.org-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.org-nav-menu li {
    margin-bottom: 0;
}

.org-nav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    background: transparent;
}

.org-nav-menu a i {
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: color 0.15s ease;
}

.org-nav-menu a:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
}

.org-nav-menu a:hover i {
    color: rgba(255, 255, 255, 0.7);
}

/* Active state */
.active__org a {
    font-weight: 600;
    color: #ffffff;
    background: var(--color-surface-hover);
}

.active__org a i {
    color: #ffffff;
}

.active__org a:hover {
    background: var(--color-surface-hover);
}

/* =============================================================================
   Product Section in Sidebar
   ============================================================================= */

.org-nav-section--product {
    position: relative;
}

/* Product header (acts as section heading + switcher trigger) */
.org-nav-product-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0.5rem 0;
    padding: 6px 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    user-select: none;
}

.org-nav-product-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.org-nav-product-header.open {
    background: rgba(255, 255, 255, 0.06);
}

.org-nav-product-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.org-nav-product-name {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-nav-product-chevron {
    color: var(--color-text-muted);
    font-size: 9px;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.org-nav-product-header.open .org-nav-product-chevron {
    transform: rotate(180deg);
}

/* Product switcher dropdown */
.org-nav-product-dropdown {
    position: absolute;
    top: 2rem;
    left: 0.5rem;
    right: 0.5rem;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 200;
    opacity: 0;
    transform: translateY(-4px);
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    padding: 4px 0;
}

.org-nav-product-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.org-nav-product-dropdown-header {
    padding: 8px 10px 4px 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.org-nav-product-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 2px 4px;
}

.org-nav-product-dropdown-item {
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-text-secondary);
    transition: background 0.12s ease;
    gap: 6px;
}

.org-nav-product-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.org-nav-product-dropdown-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
    font-weight: 500;
}

.org-nav-product-dropdown-check {
    width: 14px;
    font-size: 11px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    text-align: center;
}

.org-nav-product-dropdown-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.org-nav-product-dropdown-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================================================
   Main Content Area
   ============================================================================= */

.org-dashboard-main {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    min-height: calc(100vh - var(--topbar-height) - var(--footer-height));
}

/* =============================================================================
   Home Page Styles
   ============================================================================= */

.org-home {
    max-width: 1200px;
}

.org-page-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.25rem 0;
}

.org-page-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin: 0 0 2rem 0;
}

/* Product badge (inline indicator showing which product is active) */
.org-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    vertical-align: baseline;
}

.org-product-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Welcome card */
.org-welcome-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-surface-elevated) 0%, var(--color-surface) 100%);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.org-welcome-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border-radius: 12px;
    flex-shrink: 0;
}

.org-welcome-icon i {
    font-size: 28px;
    color: white;
}

.org-welcome-text h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.org-welcome-text p {
    margin: 0;
    color: var(--color-text-muted);
}

/* Stats placeholder cards */
.org-stats-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.org-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    min-height: 120px;
}

.org-stat-card i {
    font-size: 24px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.org-stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.org-stat-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

/* =============================================================================
   Coming Soon Page Styles
   ============================================================================= */

.org-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    padding: 2rem;
}

.org-coming-soon-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.org-coming-soon-icon i {
    font-size: 36px;
    color: var(--color-accent);
}

.org-coming-soon h1 {
    margin: 0 0 0.75rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
}

.org-coming-soon-message {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.org-coming-soon-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* =============================================================================
   Users Page Styles
   ============================================================================= */

.org-users-page {
    max-width: 1200px;
}

.org-users-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.org-users-title-section {
    flex: 1;
}

.org-users-section {
    margin-bottom: 2rem;
}

.org-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

/* Section header with title and action button */
.org-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Table Styles */
.org-table-container {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

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

.org-table th,
.org-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.org-table th {
    background: var(--color-surface);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.org-table tbody tr:hover {
    background: var(--color-surface);
}

.org-user-info {
    display: flex;
    flex-direction: column;
}

.org-user-name {
    font-weight: 500;
    color: var(--color-text);
}

.org-user-username {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.org-empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 2rem !important;
}

/* Role Badge */
.org-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.org-role-org-owner {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
}

.org-role-admin {
    background: rgba(100, 149, 237, 0.15);
    color: #6495ED;
}

.org-role-user {
    background: rgba(169, 169, 169, 0.15);
    color: var(--color-text-muted);
}

.org-role-architect,
.org-role-agent-dev {
    background: rgba(255, 165, 0, 0.15);
    color: #FFA500;
}

/* Status Badge */
.org-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.org-status-active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.org-status-pending {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

/* Role Select */
.org-role-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
}

.org-role-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Buttons */
.org-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.org-btn-primary {
    background: var(--color-accent);
    color: white;
}

.org-btn-primary:hover {
    background: #3dbdb5;
}

.org-btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.org-btn-secondary:hover {
    background: var(--color-surface);
}

.org-btn-danger {
    background: #e74c3c;
    color: white;
}

.org-btn-danger:hover {
    background: #c0392b;
}

.org-btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

.org-btn-full {
    width: 100%;
}

.org-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.org-invitation-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal Styles */
.org-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.org-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.org-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.org-modal-danger .org-modal-header {
    background: rgba(231, 76, 60, 0.1);
}

.org-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.org-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.org-modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.org-modal-close:hover {
    color: var(--color-text);
}

.org-modal-body {
    padding: 1.5rem;
}

.org-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.org-modal-warning {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.org-modal-warning i {
    font-size: 3rem;
    color: #e74c3c;
}

/* Copy Input Group */
.org-copy-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.org-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.875rem;
}

.org-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.org-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

/* Text Utilities */
.org-text-muted {
    color: var(--color-text-muted);
}

.org-text-danger {
    color: #e74c3c;
}

.org-text-sm {
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Toast Notification */
.org-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-surface-elevated);
    color: var(--color-text);
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    z-index: 1100;
    opacity: 0;
    transition: all 0.3s ease;
}

.org-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =============================================================================
   Invite Modal Styles (Project-browser style)
   ============================================================================= */

.invite-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.invite-modal {
    background: var(--color-surface);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.invite-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.invite-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.invite-modal-header h3 i {
    color: var(--color-accent);
}

.invite-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.invite-modal-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.invite-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.invite-modal-body .form-section {
    margin-bottom: 20px;
}

.invite-modal-body .form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.invite-modal-body .form-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.invite-modal-body .form-field {
    display: flex;
    flex-direction: column;
}

.invite-modal-body .form-field-1-2 {
    flex: 1;
}

.invite-modal-body .form-field-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.invite-modal-body input[type="text"],
.invite-modal-body input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.invite-modal-body input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.invite-modal-body input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* Radio button groups for invite modal */
.invite-modal-body .radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.invite-modal-body .radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.invite-modal-body .radio-option:hover {
    border-color: var(--color-accent);
}

/* Custom checkbox-style radio inputs */
.invite-modal-body .radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    border: 2px solid #555 !important;
    border-radius: 4px;
    background: transparent !important;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

.invite-modal-body .radio-option input[type="radio"]:checked {
    background: #333 !important;
    border-color: #333 !important;
}

.invite-modal-body .radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.invite-modal-body .radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invite-modal-body .radio-label {
    font-weight: 500;
    color: #888;
    font-size: 14px;
    transition: color 0.2s;
    flex: 1;
}

.invite-modal-body .radio-option:has(input:checked) .radio-label {
    color: var(--color-text);
}

.invite-modal-body .radio-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Form hints and success messages */
.invite-modal-body .form-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 12px 0;
}

.invite-modal-body .form-success {
    font-size: 13px;
    color: #2ecc71;
    margin: 12px 0 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Generate button inside modal body */
.invite-modal-body .btn-generate {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-accent);
    color: white;
    margin-bottom: 12px;
}

.invite-modal-body .btn-generate:hover:not(:disabled) {
    opacity: 0.9;
}

.invite-modal-body .btn-generate:disabled {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* Invite link box */
.invite-link-box {
    display: flex;
    gap: 8px;
    margin-top: 0;
}

.invite-link-box input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 13px;
    font-family: monospace;
}

.invite-link-box .org-btn {
    flex-shrink: 0;
}

/* Modal footer */
.invite-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--color-border);
}

.invite-modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.invite-modal-footer .btn-cancel {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.invite-modal-footer .btn-cancel:hover {
    background: var(--color-surface);
}

.invite-modal-footer .btn-submit {
    background: var(--color-accent);
    color: white;
}

.invite-modal-footer .btn-submit:hover {
    opacity: 0.9;
}

.invite-modal-footer .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =============================================================================
   Documentation Page Styles
   ============================================================================= */

.org-docs-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height) - var(--footer-height) - 3rem);
    max-width: none;
    overflow: hidden;
}

.org-docs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

.org-docs-title-section {
    flex: 1;
}

.org-docs-actions {
    display: flex;
    gap: 0.75rem;
}

/* Two-panel container */
.org-docs-container {
    display: flex;
    flex: 1;
    gap: 1rem;
    min-height: 0;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

/* File Browser Sidebar */
.org-docs-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--color-border);
    background: var(--color-surface);
    overflow-y: auto;
}

.org-docs-file-tree {
    padding: 0.75rem;
}

/* Folder styles */
.org-docs-folder {
    margin-bottom: 0.5rem;
}

.org-docs-folder-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.org-docs-folder-header:hover {
    background: var(--color-surface-hover);
}

.org-docs-folder-header .folder-chevron {
    font-size: 10px;
    color: var(--color-text-muted);
    transition: transform 0.2s;
}

.org-docs-folder.collapsed .folder-chevron {
    transform: rotate(-90deg);
}

.org-docs-folder-header .folder-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-text);
}

.org-docs-folder-header .folder-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-surface-hover);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.org-docs-folder-menu-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.org-docs-folder-header:hover .org-docs-folder-menu-btn {
    opacity: 1;
}

.org-docs-folder-menu-btn:hover {
    color: var(--color-text);
}

/* Folder content (files) */
.org-docs-folder-content {
    padding-left: 1.5rem;
    overflow: hidden;
    transition: max-height 0.2s;
}

.org-docs-folder.collapsed .org-docs-folder-content {
    display: none;
}

/* File styles */
.org-docs-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.org-docs-file:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.org-docs-file.active {
    background: rgba(78, 205, 196, 0.15);
    color: var(--color-accent);
}

.org-docs-file i {
    font-size: 12px;
}

.org-docs-file .file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add file button */
.org-docs-add-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.org-docs-add-file-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-accent);
}

/* Empty tree state */
.org-docs-empty-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.org-docs-empty-tree i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.org-docs-empty-tree p {
    margin-bottom: 1rem;
}

/* Editor Panel */
.org-docs-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.org-docs-editor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-muted);
    text-align: center;
}

.org-docs-editor-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.org-docs-editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.org-docs-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.org-docs-editor-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.org-docs-rename-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--color-text-muted);
    cursor: pointer;
    opacity: 0.7;
}

.org-docs-rename-btn:hover {
    color: var(--color-text);
    opacity: 1;
}

.org-docs-editor-actions {
    display: flex;
    gap: 0.5rem;
}

.org-docs-editor-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* SimpleMDE overrides */
.org-docs-editor-body .CodeMirror {
    height: 100%;
    border: none;
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.org-docs-editor-body .CodeMirror-cursor {
    border-left-color: var(--color-text);
}

.org-docs-editor-body .CodeMirror-selected {
    background: rgba(78, 205, 196, 0.2);
}

.org-docs-editor-body .editor-toolbar {
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.org-docs-editor-body .editor-toolbar a {
    color: var(--color-text-muted) !important;
}

.org-docs-editor-body .editor-toolbar a:hover,
.org-docs-editor-body .editor-toolbar a.active {
    background: var(--color-surface-hover);
    color: var(--color-text) !important;
}

.org-docs-editor-body .editor-preview {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.org-docs-editor-body .editor-preview pre {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: 4px;
}

.org-docs-editor-body .editor-preview code {
    background: var(--color-surface);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

/* Side-by-side mode - contained within editor panel */
.org-docs-editor-body .CodeMirror-sided {
    width: 50% !important;
}

.org-docs-editor-body .editor-preview-side {
    position: absolute !important;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50% !important;
    border-left: 1px solid var(--color-border);
}

/* Disable fullscreen mode to prevent layout issues */
.org-docs-editor-body .CodeMirror-fullscreen,
.org-docs-editor-body .editor-toolbar.fullscreen,
.org-docs-editor-body .editor-preview-side.editor-preview-active-side.fullscreen {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10;
}

.org-docs-editor-body .editor-toolbar.fullscreen {
    position: relative !important;
    z-index: 11;
}

/* Context Menu */
.org-docs-context-menu {
    position: fixed;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
    z-index: 1000;
}

.org-docs-context-menu button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
}

.org-docs-context-menu button:hover {
    background: var(--color-surface-hover);
}

.org-docs-context-menu button.danger {
    color: #e74c3c;
}

.org-docs-context-menu button.danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Add Documentation Modal - Type Cards */
.org-docs-modal-hint {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.org-docs-type-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.org-docs-type-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-surface-hover);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.org-docs-type-card:hover {
    border-color: var(--card-color);
    background: var(--color-surface);
}

.org-docs-type-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-color);
    border-radius: 8px;
    flex-shrink: 0;
}

.org-docs-type-card-icon i {
    font-size: 18px;
    color: white;
}

.org-docs-type-card-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--color-text);
}

.org-docs-type-card-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.org-docs-all-added {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.org-docs-all-added i {
    font-size: 2rem;
    color: #2ecc71;
    margin-bottom: 0.75rem;
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

@media (max-width: 768px) {
    .org-dashboard-content {
        flex-direction: column;
    }

    .org-dashboard-sidebar {
        width: 100%;
        height: auto;
        transform: none;
        padding: 1rem;
        box-shadow: none;
        border-bottom: 1px solid var(--color-border);
    }

    .org-dashboard-sidebar::after {
        display: none;
    }

    .org-dashboard-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .org-nav-section {
        min-width: 150px;
    }

    .org-dashboard-main {
        padding: 1rem;
    }

    .org-welcome-card {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================================================
   TEST ENVIRONMENT PAGE STYLES
   ============================================================================= */

.org-testenv-page {
    max-width: 1200px;
}

.org-testenv-header {
    margin-bottom: 24px;
}

.org-testenv-section {
    margin-bottom: 2rem;
}

.org-section-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
}

/* Radio buttons for encryption mode - matches project modal style */
.org-testenv-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.org-testenv-radio-group .radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

/* Custom checkbox-style radio inputs - matches project modal */
.org-testenv-radio-group .radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    border: 2px solid #555 !important;
    border-radius: 4px;
    background: transparent !important;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

.org-testenv-radio-group .radio-option input[type="radio"]:checked {
    background: #333 !important;
    border-color: #333 !important;
}

.org-testenv-radio-group .radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.org-testenv-radio-group .radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.org-testenv-radio-group .radio-label {
    font-weight: 500;
    color: #888;
    font-size: 14px;
    transition: color 0.2s;
    flex: 1;
}

.org-testenv-radio-group .radio-option:has(input:checked) .radio-label {
    color: var(--color-text, white);
}

.org-testenv-radio-group .radio-recommended {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: normal;
}

.org-testenv-radio-group .radio-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Password section */
.org-testenv-password-section {
    margin-top: 0;
}

.org-testenv-password-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-surface-hover);
    border-radius: 6px;
    gap: 16px;
}

.org-testenv-password-value {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
}

.org-testenv-password-value i {
    color: var(--color-accent);
}

.password-dots {
    font-family: monospace;
    letter-spacing: 2px;
    color: var(--color-text-muted);
}

.org-testenv-password-form {
    max-width: 400px;
}

.org-testenv-password-form .form-field {
    margin-bottom: 16px;
}

.org-testenv-password-note {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
}

.org-testenv-password-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Secrets section */
.org-testenv-loading,
.org-testenv-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: var(--color-text-muted);
}

.org-testenv-error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 6px;
}

.org-testenv-secrets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.org-testenv-secret-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.org-testenv-secret-item .org-label {
    font-family: monospace;
    font-size: 13px;
    color: var(--color-text);
    font-weight: 600;
}

.org-testenv-secret-input-wrapper {
    display: flex;
    gap: 8px;
}

.org-testenv-secret-input-wrapper .org-input {
    flex: 1;
}

.org-testenv-secret-input-wrapper .org-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.org-testenv-secret-input-wrapper .org-btn-icon:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.org-testenv-secret-status {
    font-size: 12px;
    color: #2ecc71;
    display: flex;
    align-items: center;
    gap: 4px;
}

.org-testenv-secret-status.org-testenv-secret-unset {
    color: var(--color-text-muted);
}

.org-testenv-no-secrets {
    text-align: center;
    padding: 32px;
    color: var(--color-text-muted);
}

.org-testenv-no-secrets i {
    font-size: 32px;
    color: #2ecc71;
    margin-bottom: 12px;
}

.org-testenv-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 6px;
    color: #f39c12;
    font-size: 14px;
    margin-top: 16px;
}

.org-testenv-warning i {
    flex-shrink: 0;
}

.org-testenv-submit-password {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    max-width: 400px;
}

.org-testenv-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

/* =============================================================================
   AI EMPLOYEES PAGE STYLES
   ============================================================================= */

.org-ai-employees-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height) - var(--footer-height) - 3rem);
    max-width: none;
    overflow: hidden;
}

.org-ai-employees-header {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.org-ai-employees-title-section {
    flex: 1;
}

.org-ai-employees-layout {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    min-height: 0;
    overflow: hidden;
}

.org-ai-employees-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

.org-ai-employees-section {
    margin-bottom: 2rem;
}

/* Empty state improvements */
.org-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.org-empty-content i {
    font-size: 2rem;
    color: var(--color-text-muted);
    opacity: 0.5;
}

.org-empty-content p {
    margin: 0;
}

/* Side Panel */
.org-ai-employees-panel {
    width: 400px;
    min-width: 400px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.org-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.org-panel-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.org-panel-header h3 i {
    color: var(--color-accent);
}

.org-panel-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.org-panel-close:hover {
    color: var(--color-text);
}

.org-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.org-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

/* Wizard Steps Indicator */
.org-wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.org-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.org-wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.org-wizard-step-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
}

.org-wizard-step.active .org-wizard-step-number {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.org-wizard-step.active .org-wizard-step-label {
    color: var(--color-text);
    font-weight: 500;
}

.org-wizard-step.completed .org-wizard-step-number {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.org-wizard-step.completed .org-wizard-step-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.625rem;
}

/* Wizard Content */
.org-wizard-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.org-wizard-desc {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.org-wizard-desc code {
    background: var(--color-surface);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8125rem;
}

/* Wizard Form Sections */
.org-wizard-content .form-section {
    margin-bottom: 1.25rem;
}

.org-wizard-content .form-section:last-child {
    margin-bottom: 0;
}

/* Member Preview */
.org-member-preview {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.org-preview-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.org-preview-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-accent);
}

.org-preview-value i {
    font-size: 1.25rem;
}

/* Wizard Checklist */
.org-wizard-checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.org-checklist-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.org-checklist-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.org-checklist-content {
    flex: 1;
}

.org-checklist-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.org-checklist-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.org-checklist-content a {
    color: var(--color-accent);
}

.org-checklist-content code {
    background: var(--color-surface-hover);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8125rem;
}

/* Wizard Checkbox */
.org-wizard-checkbox {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1rem;
}

.org-wizard-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--color-text);
    font-size: 0.875rem;
}

.org-wizard-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Form elements */
.org-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
}

.org-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.org-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: monospace;
    font-size: 0.8125rem;
}

.org-form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

/* Copy Box */
.org-copy-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.org-copy-box .org-btn {
    align-self: flex-end;
}

/* Wizard Error */
.org-wizard-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Wizard Success */
.org-wizard-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.org-wizard-success i {
    font-size: 3rem;
    color: #2ecc71;
    margin-bottom: 0.75rem;
}

.org-wizard-success h4 {
    margin: 0;
    color: #2ecc71;
}

/* =============================================================================
   General Settings Page Styles
   ============================================================================= */

.org-general-page {
    max-width: 800px;
}

.org-general-header {
    margin-bottom: 2rem;
}

.org-general-section {
    margin-bottom: 2rem;
}

.org-settings-card {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.org-form-group {
    margin-bottom: 1.5rem;
}

.org-form-group:last-child {
    margin-bottom: 0;
}

.org-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.org-input,
.org-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.org-input:focus,
.org-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb), 0.2);
}

.org-input:disabled,
.org-textarea:disabled {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.org-textarea {
    resize: vertical;
    min-height: 100px;
}

.org-help-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.org-help-text code {
    background: var(--color-surface);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.org-form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Repository List */
.org-repos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.org-repo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: background 0.2s;
}

.org-repo-item:hover {
    background: var(--color-surface-hover);
}

.org-repo-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-repo-info i {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}

.org-repo-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    font-family: monospace;
}

.org-empty-repos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.org-empty-repos i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.org-empty-repos p {
    margin: 0 0 1rem 0;
}

/* Icon-only button */
.org-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.org-btn-icon i {
    margin: 0;
}

/* =========================================================================
   PRODUCTS MANAGEMENT PAGE
   ========================================================================= */

/* Page Layout */
.org-products-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height) - var(--footer-height) - 3rem);
    max-width: none;
    overflow: hidden;
}

.org-products-header {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.org-products-title-section {
    flex: 1;
}

.org-products-layout {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    min-height: 0;
    overflow: hidden;
}

.org-products-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

.org-products-section {
    margin-bottom: 2rem;
}

/* Product Cards Grid */
.product-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.product-card:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.product-card-selected {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.product-card-active {
    border-left: 3px solid var(--color-accent);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.product-card-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.product-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-badge {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.product-card-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0.5rem 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-meta {
    display: flex;
    gap: 1rem;
}

.product-card-stat {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-card-stat i {
    font-size: 0.7rem;
}

/* Products Side Panel (reuses .org-panel-* base classes) */
.org-products-panel {
    width: 420px;
    min-width: 420px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Color Picker Grid */
.product-color-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}

.product-color-swatch:hover {
    transform: scale(1.1);
}

.product-color-swatch.selected {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-text-muted);
}

/* Panel Repo Items */
.panel-repo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.panel-repo-item:last-child {
    border-bottom: none;
}

.panel-repo-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text);
    overflow: hidden;
}

.panel-repo-info i {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.panel-repo-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product Stats */
.product-stats {
    display: flex;
    gap: 1.5rem;
}

.product-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.product-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.product-stat-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Product Modal (matches task-modal pattern from project-browser.css) */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.product-modal-overlay.hidden {
    display: none;
}

.product-modal {
    background: var(--color-surface);
    border-radius: 8px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.product-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.product-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.product-modal-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.product-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.product-modal-body .form-section {
    margin-bottom: 20px;
}

.product-modal-body .form-section:last-child {
    margin-bottom: 0;
}

.product-modal-body .form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px 0;
}

.product-modal-body .form-group {
    margin-bottom: 12px;
}

.product-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.product-modal-body input,
.product-modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.product-modal-body input:focus,
.product-modal-body textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.product-modal-body .form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}

.product-modal-body .form-hint code {
    background: var(--color-surface);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.product-modal-body .required-indicator {
    color: #e74c3c;
}

.product-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-hover);
}

.product-modal-footer .btn-cancel {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.product-modal-footer .btn-cancel:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.product-modal-footer .btn-submit {
    padding: 8px 20px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-modal-footer .btn-submit:hover {
    filter: brightness(1.1);
}

.product-modal-footer .btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .org-ai-employees-layout {
        flex-direction: column;
    }

    .org-ai-employees-panel {
        width: 100%;
        min-width: 100%;
        max-height: 60vh;
    }

    .org-products-layout {
        flex-direction: column;
    }

    .org-products-panel {
        width: 100%;
        min-width: 100%;
        max-height: 60vh;
    }
}
