/**
 * Woopze Page Specific Styles
 * Login, Dashboard, ve diğer sayfa stilleri
 */

/* ==================== LOGIN PAGE ==================== */
#login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    flex-direction: column;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: white;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 0;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.login-header p {
    color: #64748b;
    font-size: 13px;
}

/* Input Group - Component Library'den */
.login-form .input-group {
    margin-bottom: 16px;
}

.login-form .input-group.floating {
    position: relative;
}

.login-form .input-group.floating input {
    width: 100%;
    padding: 20px 12px 8px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    outline: none;
    background: white;
    color: #1e293b;
    transition: all 200ms;
}

.login-form .input-group.floating label {
    position: absolute;
    top: 14px;
    left: 12px;
    font-size: 14px;
    color: #94a3b8;
    transition: all 200ms;
    pointer-events: none;
    margin-bottom: 0;
}

.login-form .input-group.floating input:focus {
    border-color: #3498db;
}

.login-form .input-group.floating input:focus + label,
.login-form .input-group.floating input:not(:placeholder-shown) + label {
    top: 6px;
    font-size: 11px;
    color: #3498db;
}

/* Password Toggle */
.login-form .input-group.floating .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form .input-group.floating .password-toggle:hover {
    color: #3498db;
}

/* Login Options */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.login-options .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-options .checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

.login-options .checkbox-row label {
    color: #64748b;
    cursor: pointer;
}

.forgot-link {
    color: #3498db;
    font-size: 13px;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Login Error */
.login-error {
    background: #fef2f2;
    color: #e74c3c;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    border-left: 3px solid #e74c3c;
}

/* Login Button - Text Button Component */
.login-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
}

.login-btn .btn-loader {
    display: inline-flex;
    align-items: center;
}

.login-btn .spinner-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Login Footer */
.login-footer {
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    border-left: 3px solid var(--danger);
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

.btn-loader svg {
    animation: spin 1s linear infinite;
}

.login-footer {
    margin-top: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-sm);
}

/* ==================== DASHBOARD ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.stat-icon.primary { background: var(--primary); }
.stat-icon.success { background: var(--success); }
.stat-icon.warning { background: var(--warning); }
.stat-icon.danger { background: var(--danger); }
.stat-icon.info { background: var(--info); }

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

.stat-trend svg {
    width: 14px;
    height: 14px;
}

/* ==================== DATA TABLE ==================== */
.data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.data-table-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.data-table-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.data-table-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

.data-table th,
.data-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pagination {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.page-btn:hover {
    background: var(--gray-50);
}

.page-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

/* ==================== CHARTS ==================== */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

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

.chart-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.chart-body {
    padding: var(--spacing-md);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-header-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.page-header-description {
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.tab-item {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* ==================== BADGE ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.badge-primary { background: rgba(59, 89, 152, 0.1); color: var(--primary); }
.badge-success { background: rgba(39, 174, 96, 0.1); color: var(--success); }
.badge-danger { background: rgba(231, 76, 60, 0.1); color: var(--danger); }
.badge-warning { background: rgba(230, 126, 34, 0.1); color: var(--warning); }
.badge-info { background: rgba(52, 152, 219, 0.1); color: var(--info); }

/* ==================== AVATAR ==================== */
.avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--font-size-sm); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--font-size-lg); }
.avatar-xl { width: 64px; height: 64px; font-size: var(--font-size-xl); }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== SKELETON LOADING ==================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: var(--spacing-sm);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--spacing-md);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
}

.skeleton-card {
    height: 120px;
}

/* ========================================
   MOD 7 - Site İçi Aramalar
   ======================================== */

/* Algolia-style Search Container */
.algolia-search-container {
    margin-bottom: 20px;
    display: flex;
}

.algolia-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #777aaf;
    border-radius: 4px;
    overflow: visible;
    position: relative;
    width: 100%;
}

.algolia-search-box:focus-within {
    border-color: #6366f1;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px;
    min-width: 200px;
    border: 0;
}

.search-input-wrapper .search-icon {
    color: #94a3b8;
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 10px;
    font-size: 14px;
    color: #1e293b;
    background: transparent;
    border: 0;
}

.search-input-wrapper input::placeholder {
    color: #94a3b8;
}

.search-input-wrapper .search-clear {
    width: 20px;
    height: 20px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
}

.search-input-wrapper .search-clear:hover {
    background: #cbd5e1;
    color: #475569;
}

.search-results-info {
    padding: 0 14px;
    border-left: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.search-results-info .hits-count {
    font-size: 13px;
    color: #6366f1;
    font-weight: 400;
}

.search-type-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-right: 1px solid #777aaf;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 26px;
    position: relative;
}

.search-type-selector:hover {
    background: #f1f5f9;
}

.search-actions {
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}

.search-action-btn {
    width: 44px;
    height: 48px;
    border: 1px solid #c2cedf;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.15s;
}

.search-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #6366f1;
}

.search-action-btn:active {
    background: #f1f5f9;
}

/* Search Dropdowns */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    margin-top: 4px;
}

.search-dropdown.show {
    display: block;
}

.search-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s;
}

.search-dropdown .dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.search-dropdown .dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.search-dropdown .dropdown-item:hover {
    background: #f1f5f9;
}

.search-dropdown .dropdown-item.active {
    background: #eef2ff;
    color: #6366f1;
    font-weight: 500;
}

/* Filter Dropdown */
.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown {
    right: 0;
    left: auto;
}

.products-list {
    min-height: 300px;
}

.products-loading {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
}

.pagination-floating {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Product Card - Horizontal Layout */
.product-card-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.15s;
    margin-bottom: 12px;
}

.product-card-horizontal:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-card-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 12px;
}

.product-card-info {
    flex: 1;
    min-width: 0;
}

.product-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.product-card-sku {
    color: #6b7280;
}

.product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin-left: auto;
}


/* ==================== SEGMENT BUILDER STYLES ==================== */

/* Segment List */
.segment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.segment-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.segment-empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 16px 0 8px;
}

.segment-empty-state p {
    font-size: 14px;
    margin: 0;
}

/* Segment Card */
.seg-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seg-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.seg-card-inactive {
    opacity: 0.6;
}

.seg-card-top {
    margin-bottom: 12px;
}

.seg-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.seg-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.seg-card-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0;
    line-height: 1.4;
}

.seg-card-status {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}

.seg-card-status.active {
    background: #dcfce7;
    color: #166534;
}

.seg-card-status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.seg-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.seg-card-badge {
    font-size: 12px;
    background: #f3f4f6;
    color: #374151;
    padding: 2px 8px;
    border-radius: 6px;
}

.seg-card-bottom {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.seg-card-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seg-card-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.seg-card-stat-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seg-card-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.seg-card-action-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.seg-card-action-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* ==================== MODAL ==================== */
.seg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.seg-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
}

.seg-modal-wide {
    max-width: 860px;
}

.seg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.seg-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.seg-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.seg-modal-close:hover {
    color: #374151;
}

.seg-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.seg-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* ==================== FORM ELEMENTS ==================== */
.seg-form-group {
    margin-bottom: 16px;
}

.seg-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.seg-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.seg-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.seg-input-sm {
    width: auto;
    min-width: 100px;
    flex: 1;
}

.seg-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.seg-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.seg-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.seg-btn-primary {
    background: #2563eb;
    color: #fff;
}

.seg-btn-primary:hover {
    background: #1d4ed8;
}

.seg-btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.seg-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.seg-btn-secondary:hover {
    background: #e5e7eb;
}

/* ==================== LOGIC TOGGLE ==================== */
.seg-logic-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 13px;
    color: #374151;
}

.seg-logic-btns {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.seg-logic-btn {
    padding: 6px 14px;
    border: none;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.seg-logic-btn + .seg-logic-btn {
    border-left: 1px solid #d1d5db;
}

.seg-logic-btn.active {
    background: #2563eb;
    color: #fff;
}

.seg-logic-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

/* ==================== CONDITIONS ==================== */
.seg-conditions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.seg-condition-row {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.15s;
}

.seg-condition-row:hover {
    border-color: #d1d5db;
}

.seg-condition-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.seg-type-select {
    flex: 1;
    font-weight: 500;
}

.seg-condition-remove {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.seg-condition-remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

.seg-condition-divider {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    padding: 8px 0;
    letter-spacing: 1px;
}

.seg-condition-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seg-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.seg-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.seg-value-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.seg-no-value {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.seg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.seg-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

/* Add Condition Button */
.seg-add-condition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.seg-add-condition:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* ==================== FUNNEL ==================== */
.seg-funnel-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seg-funnel-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.seg-funnel-step-num {
    width: 24px;
    height: 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.seg-funnel-arrow {
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
    padding: 2px 0;
}

.seg-add-step {
    background: none;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.15s;
}

.seg-add-step:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* ==================== PREVIEW ==================== */
.seg-preview {
    margin-top: 20px;
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
}

.seg-preview-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seg-preview-icon {
    font-size: 32px;
}

.seg-preview-count {
    font-size: 28px;
    font-weight: 700;
    color: #1e40af;
}

.seg-preview-label {
    font-size: 13px;
    color: #3b82f6;
}

.seg-preview-time {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
    background: #fff;
    padding: 4px 10px;
    border-radius: 6px;
}

.seg-preview-samples {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #bfdbfe;
}

.seg-preview-samples-title {
    font-size: 13px;
    font-weight: 500;
    color: #1e40af;
    margin-bottom: 10px;
}

.seg-sample-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.seg-sample-avatar {
    width: 32px;
    height: 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.seg-sample-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.seg-sample-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seg-sample-meta {
    font-size: 12px;
    color: #6b7280;
}

/* ==================== DETAIL ==================== */
.seg-detail-header-info {
    margin-bottom: 24px;
}

.seg-detail-stat-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.seg-detail-stat {
    text-align: center;
    padding: 16px 24px;
    background: #f9fafb;
    border-radius: 10px;
    flex: 1;
    min-width: 100px;
}

.seg-detail-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.seg-detail-stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seg-detail-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 16px 0 0;
    line-height: 1.5;
}

.seg-detail-section {
    margin-top: 24px;
}

.seg-detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.seg-detail-conditions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seg-detail-condition {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
}

.seg-detail-condition-icon {
    font-size: 18px;
}

.seg-detail-condition-type {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.seg-detail-condition-detail {
    font-size: 13px;
    color: #6b7280;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seg-detail-logic-divider {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    padding: 4px 0;
    letter-spacing: 1px;
}

.seg-detail-users {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seg-detail-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.seg-detail-user-row:last-child {
    border-bottom: none;
}

.seg-detail-user-date {
    margin-left: auto;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ==================== SPINNER ==================== */
.seg-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: seg-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes seg-spin {
    to { transform: rotate(360deg); }
}

/* ==================== TOAST ==================== */
.seg-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    z-index: 99999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.seg-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.seg-toast-success { background: #059669; }
.seg-toast-error { background: #dc2626; }
.seg-toast-warning { background: #d97706; }
.seg-toast-info { background: #2563eb; }
