/* Unified components - search, modals, toasts, breadcrumbs, etc. */

/* Cart badge */
.cart-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* User menu dropdown in sidebar */
.user-menu {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.user-menu a {
    display: block;
    padding: 0.6rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.user-menu a:last-child { border-bottom: none; }
.user-menu-logout {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.user-menu-logout:hover {
    background: rgba(255,255,255,.08);
}
.user-menu a:hover {
    background: rgba(96, 165, 250, 0.15);
    color: white;
}


/* Global search dropdown */
.global-search-wrap { position: relative; }
.global-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 0.85rem;
}
.global-search::placeholder { color: #94a3b8; }
.global-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #60a5fa;
}
.global-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 300;
    max-height: 360px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    color: #f1f5f9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.search-result-item:hover { background: rgba(96, 165, 250, 0.15); }
.search-result-item:last-child { border-bottom: none; }
.result-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #60a5fa;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.result-title { font-size: 0.9rem; font-weight: 500; }
.result-subtitle { font-size: 0.75rem; color: #94a3b8; }
.search-result-empty {
    padding: 1rem 0.75rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Toast notifications */
.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 240px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }
.toast-warning { background: #d97706; }

/* Confirmation modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}
.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { margin: 0; color: #1e3a5f; font-size: 1.1rem; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-body { padding: 1.5rem; color: #374151; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}
.breadcrumbs a { color: #6b7280; text-decoration: none; }
.breadcrumbs a:hover { color: #1e3a5f; }
.breadcrumb-sep { color: #d1d5db; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}
.empty-state-icon {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}
.empty-state-title { font-size: 1.1rem; color: #374151; margin: 0 0 0.25rem 0; }
.empty-state-msg { font-size: 0.9rem; margin-bottom: 1rem; }

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 6px;
}
.skeleton-line { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-line.short { width: 60%; }
.skeleton-card { height: 80px; margin-bottom: 0.75rem; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary, #1e3a5f);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent, #2563eb); }

/* Tenant switcher */
.tenant-switcher {
    position: relative;
    margin: 0.5rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
    color: #f1f5f9;
    font-size: 0.85rem;
    user-select: none;
}
.tenant-switcher:hover { background: rgba(255, 255, 255, 0.1); }
.tenant-switcher-menu {
    position: absolute;
    top: 100%;
    left: 0.75rem;
    right: 0.75rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 4px;
    z-index: 250;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.tenant-switcher-item {
    display: block;
    padding: 0.6rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}
.tenant-switcher-item:hover { background: rgba(96, 165, 250, 0.15); color: white; }
.tenant-switcher-item.active { background: rgba(96, 165, 250, 0.25); color: white; }
.tenant-switcher-item:last-child { border-bottom: none; }

/* Standardized buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #1e3a5f; color: white; }
.btn-primary:hover:not(:disabled) { background: #2d5a8e; }
.btn-secondary { background: #e5e7eb; color: #1f2937; }
.btn-secondary:hover:not(:disabled) { background: #d1d5db; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-success { background: #059669; color: white; }
.btn-success:hover:not(:disabled) { background: #047857; }
.btn-ghost { background: transparent; color: #6b7280; border-color: #d1d5db; }
.btn-ghost:hover:not(:disabled) { background: #f3f4f6; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* Form input standardization */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group .help-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}
.form-group .error-text {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Standardized badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #e5e7eb;
    color: #374151;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #e5e7eb; color: #374151; }

/* Dashboard onboarding guide */
.dashboard-guide {
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}
.dashboard-guide-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.dashboard-guide-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #1e3a5f;
}
.dashboard-guide-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}
.dashboard-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.guide-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.guide-card:hover {
    border-color: #1e3a5f;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08);
}
.guide-card strong {
    color: #1e3a5f;
    font-size: 0.95rem;
}
.guide-card span:last-child {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.35;
}
.guide-icon {
    font-size: 1.35rem;
}
.dashboard-guide-tip {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: #475569;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Staff panel — page shell & buttons (used across Destek, Settings, etc.) */
.page-yaman {
    padding: 1.5rem;
    max-width: 1400px;
}

.card-yaman {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 12px);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
}

.btn-yaman {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.15rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn-yaman.primary {
    background: #1e3a5f;
    color: #fff;
}

.btn-yaman.primary:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.22);
}

.btn-yaman.secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-yaman.secondary:hover {
    background: #e2e8f0;
}

.btn-yaman.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-yaman.danger:hover {
    background: #fecaca;
}

.btn-yaman.ghost {
    background: transparent;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-yaman.sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}

/* Destek — müşteri portalı CTA (personel paneli) */
.destek-portal-cta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 1.35rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.destek-portal-cta-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e3a5f;
    color: #fff;
    border-radius: 12px;
}

.destek-portal-cta-body {
    flex: 1;
    min-width: 220px;
}

.destek-portal-cta-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.35rem;
}

.destek-portal-cta-body strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.35;
}

.destek-portal-cta-body p {
    margin: 0.45rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 52ch;
}

.destek-portal-cta-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #1e3a5f;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.destek-portal-cta-action:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.22);
    color: #fff !important;
}

.destek-talep-open-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.destek-talep-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    font-weight: 600;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.destek-talep-link-btn:hover {
    color: #1e3a5f;
}

.destek-talep-modal {
    max-width: 520px;
    width: calc(100% - 2rem);
}

.destek-talep-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.destek-talep-modal-head h3 {
    margin: 0;
    color: #1e3a5f;
    font-size: 1.2rem;
}

.destek-talep-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    flex-shrink: 0;
}

.destek-talep-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.destek-talep-modal-desc {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.destek-talep-modal-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.destek-talep-success {
    margin-bottom: 1rem;
}
