/* MSD-SMM — Client SaaS theme (Stripe / Vercel inspired) */

:root {
    --saas-bg: #fafafa;
    --saas-surface: #ffffff;
    --saas-border: #e4e4e7;
    --saas-text: #18181b;
    --saas-muted: #71717a;
    --saas-primary: #18181b;
    --saas-primary-hover: #27272a;
    --saas-accent: #2563eb;
    --saas-radius: 12px;
    --saas-radius-sm: 8px;
    --saas-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
    --saas-sidebar-w: 260px;
}

body.saas-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--saas-bg);
    color: var(--saas-text);
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.saas-sidebar {
    width: var(--saas-sidebar-w);
    background: var(--saas-surface);
    border-right: 1px solid var(--saas-border);
}

@media (min-width: 992px) {
    .saas-sidebar.offcanvas-lg {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none !important;
        visibility: visible !important;
        z-index: auto;
    }
}

/* Offcanvas — Bootstrap geçişlerini bozan display/visibility override'ları kullanılmaz */

@media (max-width: 991.98px) {
    .offcanvas.saas-sidebar,
    #clientSidebar.offcanvas {
        z-index: 1095 !important;
    }

    .saas-main {
        position: relative;
        z-index: 1;
    }

    .saas-topbar {
        position: relative;
        z-index: 1030 !important;
    }

    body.offcanvas-open .saas-topbar,
    body.offcanvas-open .client-notify-dropdown {
        z-index: 1020 !important;
    }
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.25rem 1rem;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.03em;
    color: var(--saas-text);
    text-decoration: none;
    margin-bottom: 1.5rem;
    display: block;
}

.sidebar-nav .nav-link {
    color: var(--saas-muted);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--saas-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.15rem;
}

.sidebar-nav .nav-link:hover {
    background: #f4f4f5;
    color: var(--saas-text);
}

.sidebar-nav .nav-link.active {
    background: #f4f4f5;
    color: var(--saas-text);
    font-weight: 600;
}

.sidebar-nav .nav-link.nav-admin {
    color: var(--saas-accent);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--saas-border);
}

.sidebar-user {
    color: var(--saas-muted);
}

/* Main */
.saas-main {
    background: var(--saas-bg);
    min-width: 0;
}

.saas-topbar {
    background: var(--saas-surface);
    border-bottom: 1px solid var(--saas-border);
    min-height: 60px;
    position: relative;
    z-index: 1030;
}

.saas-content {
    max-width: 1200px;
}

/* Cards */
.saas-card {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow);
    padding: 1.5rem;
}

.saas-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--saas-muted);
    margin-bottom: 0.5rem;
}

/* Stat cards */
.stat-card {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow);
    padding: 1.5rem 1.75rem;
    height: 100%;
}

.stat-card-balance .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--saas-text);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--saas-muted);
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.welcome-banner {
    background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
    color: #fff;
    border-radius: var(--saas-radius);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--saas-shadow);
}

.welcome-banner h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.welcome-banner p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9375rem;
}

/* Buttons */
.btn-saas-primary {
    background: var(--saas-primary);
    color: #fff !important;
    border: 1px solid var(--saas-primary);
    border-radius: var(--saas-radius-sm);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn-saas-primary:hover {
    background: var(--saas-primary-hover);
    border-color: var(--saas-primary-hover);
    color: #fff !important;
}

.btn-saas-ghost {
    background: transparent;
    color: var(--saas-text) !important;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius-sm);
    font-weight: 500;
}

.btn-saas-ghost:hover {
    background: #f4f4f5;
    border-color: #d4d4d8;
    color: var(--saas-text) !important;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--saas-radius-sm);
    border-color: var(--saas-border);
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #a1a1aa;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--saas-text);
}

/* Alerts */
.alert-saas {
    border-radius: var(--saas-radius-sm);
    border: 1px solid transparent;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.alert-saas-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-saas-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* API code block */
.api-key-block {
    background: #f4f4f5;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius-sm);
    padding: 1rem 1.25rem;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.api-key-block code {
    color: var(--saas-text);
    word-break: break-all;
}

.text-muted-saas {
    color: var(--saas-muted) !important;
}

.empty-state {
    border-color: var(--saas-border) !important;
    background: #fafafa;
}

.border-dashed {
    border-style: dashed !important;
}

/* Yeni sipariş formu */
.new-order-card {
    border: 1px solid #e5e7eb;
    box-shadow: none;
    transition: box-shadow 0.18s ease;
}

.new-order-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.new-order-balance-card {
    border: 1px solid #e5e7eb;
    height: 100%;
}

.new-order-form .new-order-input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.new-order-form .new-order-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.new-order-form .new-order-input[readonly] {
    background: #f9fafb;
    color: #111827;
    font-weight: 600;
}

.service-info-callout {
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    padding: 0;
    overflow: hidden;
}

.service-info-callout-inner {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.service-info-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.service-info-row i {
    font-size: 1.1rem;
    color: #2563eb;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.service-info-row strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.15rem;
}

.service-info-row p {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.45;
}

/* Select arama + genişletilmiş servis paneli */
.select-search-input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.select-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
    outline: none;
}

.service-info-panel {
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: linear-gradient(160deg, #f8fafc 0%, #eff6ff 55%, #f0f9ff 100%);
    overflow: hidden;
}

.service-info-panel-inner {
    padding: 1.15rem 1.25rem 1.25rem;
}

.service-info-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.service-info-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.service-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.service-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

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

    .service-info-tile-wide {
        grid-column: span 3;
    }
}

.service-info-tile {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-height: 100%;
}

.service-info-tile > i {
    font-size: 1.1rem;
    color: #2563eb;
    margin-bottom: 0.15rem;
}

.service-info-tile .tile-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.service-info-tile .tile-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
    word-break: break-word;
}

/* —— Premium Yeni Sipariş (Vercel / Stripe) —— */
.premium-order {
    max-width: 1200px;
}

.order-mode-tabs .nav-link.order-mode-tab {
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--saas-muted, #6b7280);
    background: #f9fafb;
    border: 1px solid var(--saas-border, #e5e7eb);
    padding: 0.55rem 1rem;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.order-mode-tabs .nav-link.order-mode-tab:hover {
    color: #111827;
    background: #fff;
    border-color: #cbd5e1;
}

.order-mode-tabs .nav-link.order-mode-tab.active {
    color: #fff;
    background: var(--saas-primary, #2563eb);
    border-color: var(--saas-primary, #2563eb);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.premium-input-bulk {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    min-height: 12rem;
}

#dripfeed-options {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.28s ease, margin 0.28s ease;
    margin-top: 0;
}

#dripfeed-options.is-visible {
    max-height: 12rem;
    opacity: 1;
    margin-top: 0.25rem;
}

.dripfeed-options-inner {
    padding: 0.75rem 0.85rem;
    background: rgba(37, 99, 235, 0.04);
    border: 1px dashed rgba(37, 99, 235, 0.22);
    border-radius: 0.65rem;
}

.sidebar-balance-value {
    color: #f8fafc;
    font-weight: 600;
}

.premium-order-header {
    margin-bottom: 0.25rem;
}

.dashboard-summary-bar {
    padding: 0.65rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dashboard-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dashboard-summary-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
}

.dashboard-summary-value {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
    line-height: 1.2;
}

.dashboard-summary-value-muted {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.dashboard-summary-divider {
    width: 1px;
    height: 2rem;
    background: #e5e7eb;
    flex-shrink: 0;
}

.dashboard-summary-wheel-btn {
    border-radius: 999px;
    margin-left: auto;
}

.premium-service-hub-compact {
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .dashboard-summary-wheel-btn {
        margin-left: 0;
        width: 100%;
    }

    .dashboard-summary-divider {
        display: none;
    }
}

.premium-order-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin: 0 0 0.35rem;
    color: #111827;
}

.premium-order-subtitle {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--saas-muted);
}

.premium-balance-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.85rem 1.15rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    min-width: 160px;
}

.premium-balance-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.premium-balance-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #111827;
    line-height: 1.2;
}

.premium-balance-spent {
    font-size: 0.75rem;
    color: var(--saas-muted);
    margin-top: 0.2rem;
}

.premium-order-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1.25rem;
    transition: box-shadow 0.2s ease;
}

.premium-order-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.premium-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.45rem;
}

.premium-input {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.premium-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.premium-input-quantity {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 0.85rem 1rem;
}

.premium-total-box {
    padding: 1.15rem 1.25rem;
    background: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

.premium-total-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.premium-total-value {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #111827;
    line-height: 1.1;
}

.premium-total-value small {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.premium-submit-btn {
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}

/* Custom dropdown — buzlu cam panel */
.custom-dropdown {
    position: relative;
}

.custom-dropdown.is-disabled .custom-dropdown-trigger {
    opacity: 0.55;
    cursor: not-allowed;
}

.custom-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-dropdown-trigger:hover:not(:disabled) {
    border-color: #d1d5db;
}

.custom-dropdown-trigger:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.custom-dropdown-chevron {
    font-size: 0.85rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.custom-dropdown-panel.is-open .custom-dropdown-chevron,
.custom-dropdown-trigger[aria-expanded="true"] .custom-dropdown-chevron {
    transform: rotate(180deg);
}

.custom-dropdown-panel {
    position: absolute;
    z-index: 1050;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-dropdown-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: premiumDropdownIn 0.22s ease;
}

@keyframes premiumDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-dropdown-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    background: rgba(249, 250, 251, 0.8);
}

.custom-dropdown-search-wrap i {
    color: #9ca3af;
    font-size: 0.9rem;
}

.custom-dropdown-search {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    outline: none;
}

.custom-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 260px;
    overflow-y: auto;
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background 0.12s ease;
}

.custom-dropdown-item:hover {
    background: #f3f4f6;
}

.custom-dropdown-item.is-selected {
    background: #eff6ff;
    color: #1d4ed8;
}

.custom-dropdown-item i {
    font-size: 1.05rem;
    color: #2563eb;
    width: 1.25rem;
    text-align: center;
}

.custom-dropdown-item-service {
    justify-content: space-between;
    align-items: center;
}

.service-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.service-item-name {
    font-weight: 600;
    color: #111827;
}

.service-item-id {
    font-size: 0.7rem;
    color: #9ca3af;
}

.service-item-price {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.custom-dropdown-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #9ca3af;
    cursor: default;
}

/* Servis detay üssü */
.premium-service-hub {
    min-height: 320px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
}

.premium-service-hub-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    color: #9ca3af;
}

.premium-service-hub-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.premium-service-hub-inner {
    animation: premiumHubIn 0.25s ease;
}

@keyframes premiumHubIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-hub-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: #111827;
}

.premium-hub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.premium-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.premium-hub-badge i {
    color: #2563eb;
    font-size: 0.85rem;
}

.premium-hub-desc {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #4b5563;
    margin: 0 0 0.75rem;
    white-space: pre-wrap;
}
