/* =================================================================
   Organizasyon Portal - Local Overrides
   Base styles come from ERPAMA Framework (erpa-*.css)
   This file only contains portal-specific styles
   ================================================================= */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #8b5cf6;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b4e 100%);
    position: relative;
    overflow: hidden;
}

.login-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.shape-1 { width: 600px; height: 600px; background: linear-gradient(135deg, #6366f1, #8b5cf6); top: -200px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: linear-gradient(135deg, #ec4899, #f43f5e); bottom: -100px; left: -100px; animation-delay: -5s; }
.shape-3 { width: 300px; height: 300px; background: linear-gradient(135deg, #06b6d4, #3b82f6); top: 50%; left: 30%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(20px, 30px) rotate(3deg); }
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    margin: 20px;
    position: relative;
    z-index: 10;
}

.login-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

.branding-content { max-width: 400px; }

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 24px;
}

.branding-content h1 { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.branding-content p { opacity: 0.9; line-height: 1.7; margin-bottom: 32px; }

.feature-list { list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 15px; }
.feature-list i { color: #a78bfa; }

.login-form-side {
    width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 24px;
}

.login-logo.forgot { background: linear-gradient(135deg, #f59e0b, #d97706); }
.login-logo.register { background: linear-gradient(135deg, #8b5cf6, #6366f1); }

.login-title { text-align: center; font-size: 24px; font-weight: 700; color: #1f2937; margin-bottom: 8px; }
.login-subtitle { text-align: center; color: #6b7280; margin-bottom: 32px; }

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 18px 16px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(17, 153, 142, 0.1);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 11px;
    color: var(--primary);
}

.btn-login {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-login.forgot { background: linear-gradient(135deg, #f59e0b, #d97706); }
.btn-login.register { background: linear-gradient(135deg, #8b5cf6, #6366f1); }

.forgot-link, .register-link { color: var(--primary); text-decoration: none; font-weight: 500; font-size: 14px; }
.forgot-link:hover, .register-link:hover { text-decoration: underline; }

.login-footer { text-align: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; color: #9ca3af; font-size: 13px; }

.success-icon { text-align: center; font-size: 64px; color: #10b981; margin-bottom: 16px; }

/* ── Şifre göster/gizle ── */
.form-group-password { position: relative; }
.form-group-password input { padding-right: 52px !important; }
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 17px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    z-index: 3;
    flex-shrink: 0;
}
.password-toggle:hover { color: #6366f1; background: rgba(99,102,241,0.08); }
.password-toggle.active { color: #6366f1; }

/* ── Beni Hatırla checkbox ── */
.login-card .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.login-card .form-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin: 0;
    padding: 0;
}
.login-card .form-check input[type="checkbox"]:checked {
    background: #6366f1;
    border-color: #6366f1;
}
.login-card .form-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.login-card .form-check input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.login-card .form-check span {
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
}


/* Dashboard Cards - portal specific overrides */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card .value { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-card .label { color: var(--text-muted); font-size: 14px; }

/* Data Table */
.data-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.data-card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.data-card-header h3 { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0; }
.data-card-body { padding: 0; overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-tertiary); padding: 12px 20px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* Badges */
.badge-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-inactive { background: var(--danger-light); color: var(--danger); }
.badge-suspended { background: var(--warning-light); color: var(--warning); }
.badge-pending { background: var(--info-light); color: var(--info); }
.badge-role { background: rgba(139,92,246,0.12); color: #a78bfa; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; margin-right: 4px; display: inline-block; }
.badge-owner { background: linear-gradient(135deg, var(--warning), #d97706); color: white; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }

/* Action buttons */
.btn-action { width: 32px; height: 32px; border: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-base); font-size: 14px; }
.btn-action-edit { background: var(--info-light); color: var(--info); }
.btn-action-edit:hover { background: rgba(59,130,246,0.25); }
.btn-action-delete { background: var(--danger-light); color: var(--danger); }
.btn-action-delete:hover { background: rgba(239,68,68,0.25); }
.btn-action-view { background: var(--success-light); color: var(--success); }
.btn-action-view:hover { background: rgba(16,185,129,0.25); }


/* App Modal (JS-created modal via openModal) */
#app-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(4px); }
#app-modal.show { opacity: 1; visibility: visible; }
.modal-box { background: var(--modal-bg); border: 1px solid var(--border); border-radius: var(--radius-xl); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; transform: scale(0.9); transition: transform 0.3s; }
#app-modal.show .modal-box { transform: scale(1); }
.modal-box .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-box .modal-header h3 { font-size: 18px; font-weight: 600; margin: 0; }
.modal-box .modal-close { width: 32px; height: 32px; border: none; background: var(--bg-tertiary); border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-primary); }
.modal-box .modal-close:hover { background: var(--bg-hover); }
.modal-box .modal-body { padding: 24px; }
.modal-box .modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* Form controls */
.form-label-sm { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; display: block; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; transition: border-color 0.2s; background: var(--input-bg); color: var(--text-primary); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--input-bg); color: var(--text-primary); }
.form-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* Profile page */
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.profile-avatar { width: 80px; height: 80px; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 36px; color: white; overflow: hidden; }
.profile-avatar:hover .avatar-overlay { opacity: 1 !important; }
@media (max-width: 1024px) {
    .profile-avatar { width: 100px; height: 100px; border-radius: 50%; font-size: 42px; }
    .col-lg-4 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
}

/* Permission grid */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-tertiary); border-radius: 8px; font-size: 13px; color: var(--text-secondary); }
.perm-item input[type="checkbox"] { accent-color: var(--accent); }

/* Toast */
.toast-msg { padding: 12px 20px; border-radius: var(--radius-md); color: white; font-size: 14px; margin-bottom: 8px; animation: slideIn 0.3s; box-shadow: var(--shadow-lg); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 16px; }
.empty-state h4 { color: var(--text-secondary); margin-bottom: 8px; }

/* Loading */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 60px; }
.loading-spinner::after { content: ''; width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Service Cards (Dashboard) */
.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--svc-color, var(--accent));
}
.service-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.service-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.service-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; flex: 1; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-users { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* Service Management Cards */
.service-manage-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}
.smc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
}
.smc-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.smc-info { flex: 1; min-width: 0; }
.smc-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.smc-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smc-badge { flex-shrink: 0; }
.smc-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}
.smc-stat { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* Service User Assignment List (in modal) */
.service-user-list { max-height: 400px; overflow-y: auto; }
.service-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.service-user-item:hover { background: var(--bg-tertiary); }
.service-user-item input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.sui-info { flex: 1; line-height: 1.4; color: var(--text-secondary); }

/* ── RESPONSIVE OVERRIDES for portal-specific components ──── */
@media (max-width: 1024px) {
    .login-container { flex-direction: column; }
    .login-branding { display: none; }
    .login-form-side { width: 100%; max-width: 480px; margin: 0 auto; padding: 20px; }
    .data-card-header { padding: 16px; }
    .data-table th, .data-table td { padding: 10px 14px; }
}

@media (max-width: 768px) {
    .data-table th.mobile-hide, .data-table td.mobile-hide { display: none; }
    .smc-header { padding: 16px; }
    .smc-body { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 576px) {
    .login-card { padding: 32px 24px; }
    .stat-card { padding: 16px; }
    .stat-card .value { font-size: 22px; }
    .stat-card .icon { width: 40px; height: 40px; font-size: 20px; margin-bottom: 12px; }
    .data-card-header { flex-direction: column; align-items: stretch; }
    .data-card-header h3 { font-size: 16px; }
    .profile-card { padding: 20px; }
    .profile-avatar { width: 60px; height: 60px; font-size: 28px; }
    .perm-grid { grid-template-columns: 1fr; }
}

/* ── Bootstrap grid compatibility (for dashboard JS-generated content) ── */
.row { display: flex; flex-wrap: wrap; margin: -0.375rem; }
.row > [class*="col"] { padding: 0.375rem; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.g-3 { margin: -0.5rem; }
.g-3 > [class*="col"] { padding: 0.5rem; }
.g-4 { margin: -0.75rem; }
.g-4 > [class*="col"] { padding: 0.75rem; }

@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
}

/* Bootstrap helper classes used in JS-generated content */
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.text-start { text-align: left; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-100 { width: 100%; }
hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* Hide hamburger and footer on mobile - bottom nav handles navigation */
@media (max-width: 1024px) {
    .mobile-menu-btn { display: none !important; }
    .footer { display: none !important; }
}

/* Mobile responsive table columns */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .mobile-hide { display: none !important; }
    .mobile-only { display: inline; }
    .mobile-only br { display: block; }
}

/* Spinner for login buttons */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; }
.spinner-sm { width: 0.875rem; height: 0.875rem; }

/* Alert box for service user modal */
.alert-warning { background: var(--warning-light); color: var(--warning); padding: 10px 14px; border-radius: 8px; }

/* Small button variants (used by supports and other modules) */
.btn-accent-sm { display: inline-flex; align-items: center; gap: 0.25rem; background: var(--accent); color: white; border: none; border-radius: 8px; padding: 0.375rem 0.75rem; font-size: 0.8125rem; font-weight: 500; cursor: pointer; text-decoration: none !important; transition: opacity 0.15s; }
.btn-accent-sm:hover { opacity: 0.9; }

/* =================================================================
   Supports Module Styles (sp- prefix)
   ================================================================= */
.sp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; }
.sp-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem; text-align: center; }
.sp-stat i { font-size: 1.25rem; display: block; margin-bottom: 0.25rem; }
.sp-stat strong { font-size: 1.25rem; display: block; }
.sp-stat small { font-size: 0.6875rem; color: var(--text-muted); }

.sp-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.sp-header h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 0.375rem; }

.sp-pill-tabs { display: flex; gap: 0.375rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.sp-pill { padding: 0.3rem 0.75rem; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 0.75rem; cursor: pointer; transition: all 0.15s; }
.sp-pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.sp-pill:hover:not(.active) { background: var(--bg-tertiary); }

.sp-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem; margin-bottom: 0.5rem; cursor: pointer; transition: border-color 0.15s; }
.sp-card:hover { border-color: var(--accent); }
.sp-card.unread { border-left: 3px solid var(--accent); }
.sp-card-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.sp-no { font-size: 0.6875rem; color: var(--text-muted); font-family: monospace; }
.sp-card-subj { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.sp-card-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.sp-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.65rem; font-weight: 600; white-space: nowrap; }
.sp-badge-info { background: var(--info-light); color: var(--info); }
.sp-badge-warning { background: var(--warning-light); color: var(--warning); }
.sp-badge-success { background: var(--success-light); color: var(--success); }
.sp-badge-danger { background: var(--danger-light); color: var(--danger); }
.sp-badge-secondary { background: var(--bg-tertiary); color: var(--text-muted); }

.sp-empty { text-align: center; padding: 2rem 1rem; color: var(--text-muted); }
.sp-empty i { font-size: 2.5rem; margin-bottom: 0.5rem; display: block; }
.sp-empty h4 { margin: 0.5rem 0 0.25rem; color: var(--text-primary); }
.sp-empty p { margin: 0; font-size: 0.8125rem; }

.sp-back { display: inline-flex; align-items: center; gap: 0.25rem; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 0.375rem 0.75rem; font-size: 0.8125rem; cursor: pointer; margin-bottom: 0.5rem; transition: all 0.15s; }
.sp-back:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.sp-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.875rem; margin-bottom: 0.625rem; }
.sp-section h3 { margin: 0 0 0.5rem; font-size: 1rem; display: flex; align-items: center; gap: 0.375rem; }
.sp-section-title { margin: 0 0 0.625rem; font-size: 0.875rem; display: flex; align-items: center; gap: 0.375rem; }
.sp-sub { color: var(--text-muted); font-size: 0.8125rem; margin: 0 0 0.75rem; display: block; }

.sp-detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 0.625rem; align-items: start; }
.sp-detail-left { display: flex; flex-direction: column; gap: 0.625rem; }
.sp-detail-right { display: flex; flex-direction: column; gap: 0.625rem; }
.sp-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.sp-detail-subj { font-size: 1rem; margin: 0.5rem 0 0.25rem; }

.sp-messages { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-msg { padding: 0.75rem; border-radius: var(--radius-lg); background: var(--bg-tertiary); font-size: 0.8125rem; }
.sp-msg.sp-msg-admin { background: rgba(0, 200, 150, 0.08); border-left: 3px solid var(--accent); }
.sp-msg.sp-msg-system { background: var(--bg-secondary); font-style: italic; font-size: 0.75rem; }
.sp-msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.375rem; }
.sp-msg-sender { font-weight: 600; font-size: 0.8125rem; display: flex; align-items: center; gap: 0.25rem; }
.sp-msg-time { font-size: 0.6875rem; color: var(--text-muted); }
.sp-msg-body { line-height: 1.5; }

.sp-att { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-top: 1px solid var(--border); font-size: 0.8125rem; }
.sp-att:first-of-type { border-top: none; }
.sp-att-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-att-size { font-size: 0.6875rem; color: var(--text-muted); }
.sp-att-link { cursor: pointer; text-decoration: none; color: inherit; border-radius: 8px; padding: 0.5rem 0.625rem; transition: background 0.15s; }
.sp-att-link:hover { background: var(--bg-tertiary); }

/* Lightbox popup for images */
.sp-lightbox-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; padding: 1rem; }
.sp-lightbox-overlay.active { opacity: 1; visibility: visible; }
.sp-lightbox-close { position: absolute; top: 0.75rem; right: 1rem; font-size: 2rem; color: white; cursor: pointer; line-height: 1; z-index: 10000; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.15s; }
.sp-lightbox-close:hover { background: rgba(255,255,255,0.15); }
.sp-lightbox-title { color: rgba(255,255,255,0.8); font-size: 0.8125rem; margin-bottom: 0.5rem; max-width: 90%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-lightbox-img { max-width: 90vw; max-height: 75vh; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); object-fit: contain; }
.sp-lightbox-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; z-index: 10000; }
.sp-lightbox-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.8125rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.15s; background: rgba(255,255,255,0.95); color: #1a1a2e; }
.sp-lightbox-btn:hover { background: #fff; }
.sp-lightbox-btn-outline { background: transparent; color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.4); }
.sp-lightbox-btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

.sp-field { margin-bottom: 0.625rem; }
.sp-field label { display: block; font-size: 0.75rem; font-weight: 500; margin-bottom: 0.25rem; color: var(--text-secondary); }
.sp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.sp-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.sp-btn-outline { display: inline-flex; align-items: center; gap: 0.25rem; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 0.375rem 0.75rem; font-size: 0.8125rem; cursor: pointer; transition: all 0.15s; }
.sp-btn-outline:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* File input styling */
input[type="file"].form-input { padding: 0.5rem; font-size: 0.8125rem; cursor: pointer; }
input[type="file"].form-input::file-selector-button { background: var(--accent); color: white; border: none; border-radius: 6px; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 500; cursor: pointer; margin-right: 0.5rem; transition: opacity 0.15s; }
input[type="file"].form-input::file-selector-button:hover { opacity: 0.85; }

/* Message attachments (inline under message body) */
.sp-msg-attachments { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(128,128,128,0.2); display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sp-msg-att-img { display: inline-block; max-width: 200px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); transition: opacity 0.15s; }
.sp-msg-att-img:hover { opacity: 0.85; }
.sp-msg-att-img img { display: block; width: 100%; height: auto; max-height: 160px; object-fit: cover; }
.sp-msg-att-file { display: inline-flex; align-items: center; gap: 0.375rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 0.375rem 0.625rem; font-size: 0.75rem; color: var(--text-secondary); text-decoration: none; transition: all 0.15s; }
.sp-msg-att-file:hover { background: var(--bg-tertiary); color: var(--accent); }
.sp-msg-att-file small { color: var(--text-muted); }

@media (max-width: 768px) {
    .sp-row2 { grid-template-columns: 1fr; }
    .sp-detail-grid { grid-template-columns: 1fr; }
    .sp-detail-head { gap: 0.25rem; }
    .sp-stats { grid-template-columns: repeat(3, 1fr); gap: 0.375rem; }
    .sp-stat { padding: 0.5rem; }
    .sp-stat i { font-size: 1rem; }
    .sp-stat strong { font-size: 1rem; }
}
.sp-detail-left .sp-section,
.sp-detail-right .sp-section { margin-bottom: 0; }

/* =================================================================
   Cookie Consent Banner (KVKK/GDPR)
   ================================================================= */
.cc-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; padding: 1rem; }
.cc-overlay.active { opacity: 1; visibility: visible; }
.cc-banner { width: 100%; max-width: 680px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: 0 -4px 40px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; }
.cc-main { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.cc-icon { font-size: 2rem; color: var(--accent); flex-shrink: 0; }
.cc-title { margin: 0 0 0.375rem; font-size: 1.05rem; color: var(--text-primary); }
.cc-text { margin: 0; font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6; }

.cc-category { background: var(--bg-tertiary); border-radius: 10px; padding: 0.875rem; margin-bottom: 0.5rem; }
.cc-cat-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cc-cat-info { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-primary); }
.cc-cat-info i { color: var(--accent); }
.cc-cat-desc { margin: 0.375rem 0 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }
.cc-badge-required { font-size: 0.65rem; background: var(--accent-light); color: var(--accent); padding: 0.15rem 0.5rem; border-radius: 10px; font-weight: 600; }

/* Toggle switch */
.cc-toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: background 0.2s; }
.cc-toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: transform 0.2s; }
.cc-toggle input:checked + .cc-toggle-slider { background: var(--accent); }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(18px); }
.cc-toggle input:disabled + .cc-toggle-slider { opacity: 0.6; cursor: not-allowed; }

.cc-info-box { display: flex; gap: 0.625rem; align-items: flex-start; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }
.cc-info-box i { color: var(--accent); font-size: 1rem; flex-shrink: 0; margin-top: 0.125rem; }
.cc-info-box a { color: var(--accent); text-decoration: underline; }

.cc-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.cc-actions-detail { justify-content: center; margin-top: 0.75rem; }
.cc-btn { padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.8125rem; font-weight: 500; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 0.375rem; transition: all 0.15s; }
.cc-btn-accept { background: var(--accent); color: white; }
.cc-btn-accept:hover { opacity: 0.9; }
.cc-btn-reject { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.cc-btn-reject:hover { background: var(--bg-tertiary); }
.cc-btn-manage { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.cc-btn-manage:hover { color: var(--accent); }
.cc-btn-save { background: var(--accent); color: white; width: 100%; justify-content: center; padding: 0.625rem; }
.cc-btn-save:hover { opacity: 0.9; }

@media (max-width: 576px) {
    .cc-banner { padding: 1.25rem; border-radius: 16px 16px 0 0; }
    .cc-main { flex-direction: column; gap: 0.5rem; }
    .cc-actions { flex-direction: column; }
    .cc-btn { width: 100%; justify-content: center; }
}
