:root {
    --almas-primary: #4f46e5;
    --almas-input-border: rgba(0, 0, 0, 0.08);
    --almas-text-main: #0f172a;
    --almas-text-muted: #64748b;
    --almas-input-bg: rgba(255, 255, 255, 0.6);
    --almas-radius: 18px;
}

body.dark-mode {
    --almas-text-main: #f8fafc;
    --almas-text-muted: #94a3b8;
    --almas-input-bg: rgba(30, 41, 59, 0.5);
    --almas-primary: #6366f1;
    --almas-input-border: rgba(255, 255, 255, 0.08);
}

.almas-report-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(var(--almas-glass-blur)); -webkit-backdrop-filter: blur(var(--almas-glass-blur));
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
    padding: 16px; box-sizing: border-box;
    will-change: opacity;
}

.almas-report-overlay.active { opacity: 1; visibility: visible; }

.almas-report-panel {
    width: 100%; max-width: 400px;
    background: var(--almas-glass-bg);
    border: 1px solid var(--almas-glass-border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    border-radius: var(--almas-radius);
    padding: 20px 16px;
    position: relative;
    transform: scale(0.96) translateZ(0);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    direction: rtl; text-align: right;
    font-family: inherit;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    will-change: transform;
}

.almas-report-panel::-webkit-scrollbar { display: none; }

.almas-report-overlay.active .almas-report-panel { transform: scale(1) translateZ(0); }

.almas-close-modal {
    position: absolute; top: 10px; left: 12px;
    background: transparent !important;
    border: none;
    color: var(--almas-text-muted);
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 28px; height: 28px;
    transition: color 0.2s;
    display: flex; align-items: center; justify-content: center;
    outline: none;
}

@media (hover: hover){
.almas-close-modal:hover { color: #ef4444; }
}

.almas-modal-header { margin-bottom: 14px; text-align: center; }
.almas-modal-header h3 { margin: 0; font-size: 16px; color: var(--almas-text-main); font-weight: 700; letter-spacing: -0.01em; }

.almas-section-label {
    display: block; width: 100%; font-size: 11px; font-weight: 600;
    margin-bottom: 6px; color: var(--almas-text-muted);
}

.almas-user-profile-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px;
}

.almas-user-profile-header.logged-in-box {
    border: 1px solid var(--almas-glass-border);
    padding: 9px 12px;
    border-radius: var(--almas-radius-element, 14px);
    background: var(--almas-input-bg);
}

.almas-user-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.almas-user-info-text { display: flex; flex-direction: column; }
.almas-user-name { font-size: 12px; font-weight: 600; color: var(--almas-text-main); }
.almas-user-email { font-size: 10.5px; font-weight: 500; color: var(--almas-text-muted); margin-top: 2px; }

.almas-input-group { margin-bottom: 10px; width: 100%; }
.almas-row-inputs { display: flex; gap: 8px; margin-bottom: 10px; }
.almas-field-col { flex: 1; }

.almas-report-panel input, .almas-report-panel textarea, .almas-request-card input, .almas-request-card textarea {
    width: 100%; padding: 10px 12px;
    border-radius: var(--almas-radius-field, 12px); border: 1px solid var(--almas-input-border);
    background: var(--almas-input-bg);
    color: var(--almas-text-main);
    font-family: inherit; font-size: 12.5px;
    outline: none; transition: 0.2s;
    box-sizing: border-box;
}

.almas-report-panel input::placeholder, .almas-report-panel textarea::placeholder, .almas-request-card input::placeholder, .almas-request-card textarea::placeholder {
    color: var(--almas-text-muted); opacity: 0.7;
}

.almas-report-panel input:focus, .almas-report-panel textarea:focus, .almas-request-card input:focus, .almas-request-card textarea:focus {
    background: var(--almas-glass-bg);
    border-color: var(--almas-primary);
}

.almas-report-panel textarea, .almas-request-card textarea { height: 68px; resize: none; }

.almas-report-panel input[name="market_link"], .almas-request-card input[name="market_link"] { direction: ltr; text-align: left; padding-left: 40px; }
.almas-report-panel input[name="market_link"]:placeholder-shown, .almas-request-card input[name="market_link"]:placeholder-shown { direction: rtl; text-align: right; }

.almas-input-wrapper { position: relative; width: 100%; }
.almas-has-icon input { padding-left: 40px !important; }

.almas-market-icon-container {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; pointer-events: none; opacity: 0; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.almas-market-icon-container.show { opacity: 1; }
.almas-market-icon-container svg, .almas-market-icon-container img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

.almas-files-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; width: 100%; }
#almas-select-all-btn {
    background: transparent !important; border: none; color: var(--almas-primary);
    font-size: 11px; font-weight: 600; cursor: pointer; padding: 0;
    white-space: nowrap; flex-shrink: 0; outline: none;
}

.almas-files-list {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 12px; max-height: 185px; overflow-y: auto;
    width: 100%; padding-left: 3px; box-sizing: border-box;
    scrollbar-width: thin; scrollbar-color: var(--almas-input-border) transparent;
}
.almas-files-list::-webkit-scrollbar { width: 4px; }
.almas-files-list::-webkit-scrollbar-track { background: transparent; }
.almas-files-list::-webkit-scrollbar-thumb { background: var(--almas-input-border); border-radius: 4px; }

.almas-checkbox-wrapper { cursor: pointer; display: block; }
.almas-checkbox-wrapper input { display: none; }
.almas-cb-card {
    display: flex; align-items: center; padding: 9px 10px;
    background: var(--almas-input-bg);
    border: 1px solid var(--almas-input-border);
    border-radius: 10px; transition: border-color 0.2s, background-color 0.2s;
}

@media (hover: hover){
.almas-checkbox-wrapper .almas-cb-card:hover { border-color: var(--almas-primary); }
}

.almas-checkbox-wrapper input:checked + .almas-cb-card {
    background: transparent; border-color: var(--almas-primary);
}

.almas-cb-card.static {
    cursor: default; background: transparent; border-color: var(--almas-primary);
}

.almas-cb-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; margin-left: 8px; color: var(--almas-text-muted); flex-shrink: 0; }
.almas-checkbox-wrapper input:checked + .almas-cb-card .almas-cb-icon, .almas-cb-card.static .almas-cb-icon { color: var(--almas-primary); }

.almas-cb-info { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.almas-cb-info .fname { font-size: 11.5px; font-weight: 600; color: var(--almas-text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.almas-cb-info .fver { font-size: 9.5px; color: var(--almas-text-muted); margin-top: 1px; }
.almas-cb-tick {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--almas-input-border);
    color: transparent; transition: 0.2s;
}
.almas-checkbox-wrapper input:checked + .almas-cb-card .almas-cb-tick { background: var(--almas-primary); border-color: var(--almas-primary); color: #fff; }
.almas-cb-card.static .almas-cb-tick { background: var(--almas-primary); border-color: var(--almas-primary); color: #fff; }

.almas-submit-report-btn {
    width: 100%; background: var(--almas-primary);
    color: #ffffff; border: none; height: 40px; padding: 0 14px;
    border-radius: var(--almas-radius-button, 12px); font-weight: 600; font-size: 13px;
    cursor: pointer; transition: opacity 0.2s;
    display: flex; justify-content: center; align-items: center;
    outline: none;
}
body.dark-mode .almas-submit-report-btn { background: var(--almas-primary); color: #fff; }
.almas-submit-report-btn:active { opacity: 0.8; }

.almas-submit-report-btn .btn-loader { width: 15px; height: 15px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: almasSpin 0.6s infinite linear; display: none; margin-right: 8px; }
.almas-submit-report-btn.loading .btn-loader { display: block; }
.almas-submit-report-btn.loading .btn-text { display: none; }
@keyframes almasSpin { to { transform: rotate(360deg); } }

.almas-success-message { text-align: center; padding: 18px 0; }
.almas-success-anim { width: 44px; height: 44px; margin: 0 auto 10px; color: #10b981; }
.almas-success-anim .tick { stroke-dasharray: 50; stroke-dashoffset: 50; }
@keyframes almasDash { to { stroke-dashoffset: 0; } }
.almas-success-message h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--almas-text-main); }
.almas-success-message p { margin: 6px 0 0; font-size: 11.5px; font-weight: 600; color: var(--almas-text-muted); opacity: 0.9; }

@media (max-width: 600px) {
    .almas-report-overlay { padding: 12px; }
    .almas-report-panel { padding: 16px 14px; max-height: 92vh; }
    .almas-report-panel input, .almas-report-panel textarea, .almas-request-card input, .almas-request-card textarea { font-size: 12px; }
    .almas-row-inputs { gap: 6px; }
    .almas-report-panel input { padding: 9px 10px; }
    .almas-cb-info .fname { font-size: 11px; }
}

@media (max-width: 1024px) {
    .almas-report-overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(15, 23, 42, 0.45) !important; }
}

.almas-request-page { display: flex; justify-content: center; padding: 10px 0 40px; }
.almas-request-card {
    width: 100%; max-width: 480px;
    background: var(--almas-glass-bg);
    border: 1px solid var(--almas-glass-border);
    border-radius: var(--almas-radius, 18px);
    padding: 24px 20px;
    direction: rtl; text-align: right;
    font-family: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.almas-request-header { text-align: center; margin-bottom: 16px; }
.almas-request-header h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--almas-text-main); }
.almas-request-header p { margin: 0; font-size: 12px; font-weight: 500; color: var(--almas-text-muted); line-height: 1.8; }
.almas-request-card .almas-user-profile-header { margin-bottom: 12px; }

@media (max-width: 600px) {
    .almas-request-page { padding: 8px 14px 32px; }
    .almas-request-card { padding: 18px 14px; }
}
