/* ============================================
   MESSENGER — Modern Chat UI
   Clean, sleek, messaging-app aesthetic
   Auth: full-screen, no card, no radius
   ============================================ */

/* ── Variables ─────────────────────────────── */
:root {
    --primary:        #1a73e8;
    --primary-dark:   #1558c0;
    --primary-light:  #74a9f5;
    --secondary:      #00cec9;
    --danger:         #e74c3c;
    --warning:        #f9ca24;
    --info:           #74b9ff;
    --success:        #00b894;

    --bg:             #f0f2f5;
    --surface:        #ffffff;
    --text:           #111b21;
    --text-light:     #54656f;
    --text-lighter:   #8696a0;
    --border:         #e9edef;

    --shadow:         0 1px 3px rgba(11,20,26,.08);
    --shadow-lg:      0 4px 20px rgba(11,20,26,.12);

    --radius:         12px;
    --radius-sm:      8px;
    --radius-lg:      16px;

    --transition:     all .2s cubic-bezier(.4,0,.2,1);

    --chat-bg:        #efeae2;
    --hover-bg:       #f5f6f6;
    --input-bg:       #f0f2f5;
    --modal-overlay:  rgba(11,20,26,.6);

    --msg-out-bg:     #d9fdd3;
    --msg-in-bg:      #ffffff;

    --system-msg-bg:  rgba(255,255,255,.9);
    --system-msg-color: #54656f;
    --readonly-bg:    #fff3cd;
    --readonly-color: #856404;
    --profile-gradient: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    --reply-bar-bg:   #f0f2f5;
    --ai-notice-bg:   #fff8e1;

    --nav-height:     58px;
}

[data-theme="dark"] {
    --bg:             #111b21;
    --surface:        #202c33;
    --text:           #e9edef;
    --text-light:     #8696a0;
    --text-lighter:   #4a555d;
    --border:         #2a3942;

    --shadow:         0 1px 3px rgba(0,0,0,.3);
    --shadow-lg:      0 4px 20px rgba(0,0,0,.5);

    --chat-bg:        #0b141a;
    --hover-bg:       #2a3942;
    --input-bg:       #2a3942;
    --modal-overlay:  rgba(0,0,0,.75);

    --msg-out-bg:     #005c4b;
    --msg-in-bg:      #202c33;

    --system-msg-bg:  rgba(17,27,33,.9);
    --system-msg-color: #8696a0;
    --readonly-bg:    #3d3520;
    --readonly-color: #f0c040;
    --profile-gradient: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
    --reply-bar-bg:   #1f2c34;
    --ai-notice-bg:   #3d3520;
}


/* ── Reset ─────────────────────────────────── */
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    height: 100vh; height: 100dvh;
    overflow: hidden;
    user-select: none;
    color: var(--text);
    transition: background-color .4s ease, color .4s ease;
    -webkit-font-smoothing: antialiased;
}

/* ── Screens ───────────────────────────────── */
.screen { display:none; height:100vh; height:100dvh; width:100%; flex-direction:column; }
.screen.active { display:flex; }

/* ══════════════════════════════════════════════
   AUTH SCREEN — full-screen, no card, no radius
   ══════════════════════════════════════════════ */
#auth-screen {
    background: var(--surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Top accent strip */
#auth-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 2;
}

[data-theme="dark"] #auth-screen {
    background: var(--bg);
}

/* Remove blob / particle decorations entirely */
.auth-particles { display: none; }
.auth-particle  { display: none; }

/* The "card" becomes a full-screen panel */
.auth-container {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    animation: none;
    text-align: center;
}

[data-theme="dark"] .auth-container {
    background: transparent;
    backdrop-filter: none;
    border: none;
}

/* Auth inner wrapper — constrains content width */
.auth-inner {
    width: 100%;
    max-width: 380px;
    padding: 48px 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo */
.auth-logo {
    width: 72px; height: 72px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 24px rgba(26,115,232,.28);
    animation: none;
}
.auth-logo img { width:100%; height:100%; object-fit:cover; }

.auth-container h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -.4px;
}
.auth-container .subtitle {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--input-bg);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 28px;
    gap: 3px;
    border: 1px solid var(--border);
    width: 100%;
}
.auth-tab {
    flex: 1; padding: 9px 12px;
    border-radius: 6px; border: none; cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: inherit;
    transition: var(--transition);
    color: var(--text-light); background: transparent;
}
.auth-tab.active {
    background: var(--primary); color: #fff;
    box-shadow: 0 2px 8px rgba(26,115,232,.25);
}
.auth-tab:hover:not(.active) { color: var(--primary); }

/* Inputs */
.auth-input-wrap {
    position: relative;
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
}
.auth-input-wrap .auth-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-lighter); font-size: 14px; pointer-events: none; transition: var(--transition);
}
.auth-input-wrap input {
    width: 100%; padding: 13px 14px 13px 42px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text); font-family: inherit;
    outline: none; transition: var(--transition);
}
.auth-input-wrap input::placeholder { color: var(--text-lighter); }
.auth-input-wrap input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(26,115,232,.1);
}
.auth-input-wrap input:focus ~ .auth-input-icon { color: var(--primary); }

/* Auth button */
.btn-auth {
    width: 100%; padding: 14px; border: none;
    border-radius: var(--radius-sm); margin-top: 8px;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,115,232,.3);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-auth:hover  { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(26,115,232,.35); }
.btn-auth:active { transform: scale(.98); box-shadow: 0 2px 8px rgba(26,115,232,.2); }

/* Feature badges */
.auth-features {
    display: flex; justify-content: center; gap: 8px;
    flex-wrap: wrap; margin-top: 28px;
}
.auth-feature-badge {
    display: flex; align-items: center; gap: 5px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: 20px; padding: 4px 10px;
    font-size: 11px; color: var(--text-light);
}
.auth-feature-badge i { font-size: 10px; color: var(--primary); }

/* Forgot */
.auth-forgot {
    text-align: right; margin-bottom: 10px; font-size: 12px; width: 100%;
}
.auth-forgot a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-forgot a:hover { text-decoration: underline; }

/* Divider between logo/brand and form for full-screen feel */
.auth-divider {
    width: 32px; height: 2px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 28px;
}

/* Error */
.error-message {
    color: var(--danger); text-align: center; margin-top: 12px; font-size: 13px;
    display: none; padding: 10px 14px;
    background: rgba(231,76,60,.08); border: 1px solid rgba(231,76,60,.15);
    border-radius: var(--radius-sm);
    width: 100%;
}
.error-message.show { display:block; animation: fadeIn .2s ease-out; }

/* Slideup kept for modals only */
@keyframes slideUp {
    from { transform: translateY(30px) scale(.97); opacity:0; }
    to   { transform: translateY(0) scale(1); opacity:1; }
}
@keyframes fadeIn {
    from { opacity:0; transform:translateY(-6px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ══════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════ */
.verified-badge    { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; background:var(--info); border-radius:50%; color:#fff; font-size:9px; margin-right:4px; flex-shrink:0; }
.verified-badge.small { width:13px; height:13px; font-size:7px; }
.admin-badge       { display:inline-block; background:var(--warning); color:#333; font-size:10px; padding:2px 7px; border-radius:10px; margin-right:4px; font-weight:600; }
.group-badge       { display:inline-block; background:var(--success); color:#fff; font-size:10px; padding:2px 7px; border-radius:10px; margin-right:4px; font-weight:600; }
.group-admin-badge { display:inline-block; background:var(--primary); color:#fff; font-size:9px; padding:2px 6px; border-radius:10px; margin-right:4px; font-weight:600; }

/* Form group */
.form-group { margin-bottom:16px; text-align:right; }
.form-group label { display:block; margin-bottom:6px; color:var(--text); font-weight:600; font-size:13px; }
.form-group input, .form-group textarea {
    width:100%; padding:12px 14px; border:1.5px solid var(--border);
    border-radius:var(--radius-sm); font-size:14px; background:var(--input-bg);
    font-family:inherit; resize:none; transition:var(--transition); color:var(--text);
}
.form-group input:focus, .form-group textarea:focus {
    outline:none; border-color:var(--primary); background:var(--surface);
    box-shadow:0 0 0 3px rgba(26,115,232,.1);
}

/* Buttons */
.btn-group { display:flex; gap:10px; margin-top:20px; }
.btn {
    flex:1; padding:12px 18px; border:none; border-radius:var(--radius-sm);
    font-size:14px; font-weight:600; cursor:pointer; font-family:inherit;
    text-align:center; transition:var(--transition);
    display:flex; align-items:center; justify-content:center; gap:8px;
}
.btn:active { transform:scale(.97); }
.btn-primary  { background:var(--primary); color:#fff; box-shadow:0 4px 12px rgba(26,115,232,.25); }
.btn-secondary{ background:var(--success); color:#fff; box-shadow:0 4px 12px rgba(0,184,148,.25); }
.btn-danger   { background:var(--danger);  color:#fff; }
.btn-warning  { background:var(--warning); color:#333; }
.btn-info     { background:var(--info);    color:#fff; }
.btn-outline  { background:transparent; border:1.5px solid var(--primary); color:var(--primary); }


/* ══════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════ */
.app-layout { display:flex; flex-direction:column; height:100%; background:var(--bg); transition:background-color .4s ease; }

/* Header */
.app-header {
    background:#fff;
    border-bottom:1px solid var(--border);
    padding: 0 16px;
    display:flex; justify-content:space-between; align-items:center;
    z-index:100; height:56px; min-height:56px;
    position:relative; transition:background-color .3s ease;
}
.app-header.hidden-header { display:none !important; }
.app-header .title { font-size:18px; font-weight:700; color:var(--text); }
.header-actions { display:flex; gap:4px; align-items:center; }

.header-logo-small {
    width:34px; height:34px; border-radius:10px; overflow:hidden;
    margin-right:10px; display:none;
}
.header-logo-small img { width:100%; height:100%; object-fit:cover; }

.icon-btn {
    width:38px; height:38px; border-radius:50%; border:none;
    background:transparent; color:var(--text-light); font-size:17px;
    cursor:pointer; display:flex; align-items:center; justify-content:center; transition:var(--transition);
}
.icon-btn:hover  { background:rgba(26,115,232,.08); color:var(--primary); }
.icon-btn:active { transform:scale(.9); }
/* ── Dropdown ───────────────────────────────── */
.dropdown-menu {
    position:absolute; top:56px; left:12px; background:var(--surface);
    border-radius:var(--radius); box-shadow:var(--shadow-lg); min-width:210px;
    z-index:200; display:none; overflow:hidden; border:1px solid var(--border);
}
.dropdown-menu.show { display:block; animation:fadeIn .15s ease-out; }

.dropdown-item {
    padding:13px 18px; cursor:pointer; display:flex; align-items:center;
    gap:12px; font-size:14px; color:var(--text);
    border-bottom:1px solid var(--border); transition:var(--transition);
}
.dropdown-item:last-child { border-bottom:none; }
.dropdown-item:hover  { background:var(--hover-bg); }
.dropdown-item.danger { color:var(--danger); }
.dropdown-backdrop { position:fixed; top:0; left:0; width:100%; height:100%; z-index:150; display:none; }
.dropdown-backdrop.show { display:block; }

/* ── Content ────────────────────────────────── */
.main-content { flex:1; overflow:hidden; position:relative; }
.tab-content  { display:none; height:100%; overflow-y:auto; }
.tab-content.active { display:block; }

/* ══════════════════════════════════════════════
   CONTACTS LIST
   ══════════════════════════════════════════════ */
.contacts-header {
    padding:10px 14px;
    background:var(--surface);
    border-bottom:1px solid var(--border);
    position:sticky; top:0; z-index:10;
}
.search-wrapper { position:relative; }
.search-wrapper i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--text-lighter); font-size:13px; }
.search-box {
    width:100%; padding:10px 14px 10px 38px;
    border:none; border-radius:8px;
    font-size:14px; background:var(--input-bg); font-family:inherit;
    transition:var(--transition); color:var(--text); outline:none;
}
.search-box:focus { background:var(--surface); box-shadow:0 0 0 2px var(--primary); }

.contact-item {
    display:flex; align-items:center; padding:12px 16px; cursor:pointer;
    border-bottom:1px solid var(--border); gap:12px;
    transition:background .15s ease; background:var(--surface);
}
.contact-item:hover  { background:var(--hover-bg); }
.contact-item:active { background:var(--hover-bg); }

.contact-avatar {
    width:50px; height:50px; border-radius:50%;
    background:linear-gradient(135deg, var(--primary), var(--primary-dark));
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:19px; font-weight:700; flex-shrink:0; overflow:hidden;
}
.group-avatar { background:linear-gradient(135deg, var(--success), #00a381) !important; }
.contact-avatar img { width:100%; height:100%; object-fit:cover; }

.contact-info { flex:1; min-width:0; }
.contact-name         { font-weight:600; color:var(--text); font-size:15px; margin-bottom:3px; }
.contact-last-message { color:var(--text-light); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.contact-meta         { text-align:left; flex-shrink:0; }
.contact-time         { font-size:11px; color:var(--text-lighter); }
.unread-badge         { background:var(--primary); color:#fff; font-size:11px; padding:2px 7px; border-radius:10px; margin-top:5px; display:inline-block; font-weight:600; }

/* ══════════════════════════════════════════════
   CHAT VIEW
   ══════════════════════════════════════════════ */
.chat-view {
    height:100%; display:flex; flex-direction:column;
    background:var(--chat-bg); transition:background-color .4s ease;
}

.chat-header-bar {
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:8px 12px;
    display:flex; align-items:center; gap:10px;
    cursor:pointer; transition:background .2s ease; position:relative;
    min-height:56px;
}
.chat-header-bar:hover { background:#f5f8ff; }

.back-btn {
    background:none; border:none; font-size:20px; cursor:pointer;
    color:var(--text); padding:6px 4px; flex-shrink:0;
}
.chat-partner-avatar {
    width:40px; height:40px; border-radius:50%;
    background:linear-gradient(135deg, var(--primary-light), var(--primary));
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:17px; font-weight:700; flex-shrink:0; overflow:hidden;
}
.chat-partner-avatar img { width:100%; height:100%; object-fit:cover; }
.chat-partner-info  { flex:1; min-width:0; }
.chat-partner-name  { font-weight:600; color:var(--text); font-size:15px; line-height:1.2; }
.chat-partner-status{ font-size:11px; color:var(--text-light); }

.call-buttons { display:flex; gap:6px; flex-shrink:0; }
.call-icon-btn {
    width:36px; height:36px; border-radius:50%; border:none;
    font-size:15px; cursor:pointer; display:flex; align-items:center;
    justify-content:center; transition:var(--transition); color:var(--text-light); background:transparent;
}
.call-icon-btn:hover { background:rgba(26,115,232,.08); color:var(--primary); }
.call-icon-btn:active { transform:scale(.9); }
.voice-call-btn {}
.video-call-btn {}

.chat-more-btn {
    width:36px; height:36px; border-radius:50%; border:none;
    font-size:18px; cursor:pointer; display:flex; align-items:center;
    justify-content:center; transition:var(--transition); color:var(--text-light); background:transparent;
}
.chat-more-btn:hover  { background:rgba(26,115,232,.08); color:var(--primary); }
.chat-more-btn:active { transform:scale(.9); }

.chat-more-menu {
    position:absolute; top:58px; right:8px; background:var(--surface);
    border-radius:var(--radius); box-shadow:var(--shadow-lg); min-width:190px;
    z-index:300; display:none; overflow:hidden; border:1px solid var(--border);
}
.chat-more-menu.show { display:block; animation:fadeIn .15s ease-out; }
.chat-more-backdrop  { position:fixed; top:0; left:0; width:100%; height:100%; z-index:299; display:none; }
.chat-more-backdrop.show { display:block; }

/* ── Messages ────────────────────────────────── */
.messages-area {
    flex:1; overflow-y:auto; padding:12px 10px;
    display:flex; flex-direction:column; gap:3px;
}
/* Scrollbar subtle */
.messages-area::-webkit-scrollbar { width:4px; }
.messages-area::-webkit-scrollbar-track { background:transparent; }
.messages-area::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }

.message-bubble {
    max-width: 78%;
    padding: 8px 12px 6px;
    border-radius: 10px;
    font-size: 14px; line-height: 1.55;
    word-wrap: break-word; position: relative;
    transition: transform .1s ease;
}
.message-bubble:active { transform:scale(.99); }

.message-sent {
    align-self: flex-end;
    background: var(--msg-out-bg);
    color: var(--text);
    border-bottom-right-radius: 3px;
}
.message-received {
    align-self: flex-start;
    background: var(--msg-in-bg);
    color: var(--text);
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
[data-theme="dark"] .message-sent     { color: var(--text); }
[data-theme="dark"] .message-received { box-shadow: 0 1px 2px rgba(0,0,0,.3); }

.message-sender-name  { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 3px; }
.message-time         { font-size: 10px; margin-top: 3px; opacity: .65; text-align: right; }
.message-image        { max-width: 220px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; display:block; }
.message-edited       { font-size: 9px; opacity: .5; margin-right: 4px; }

.reply-preview {
    background: rgba(0,0,0,.05); border-right: 3px solid var(--primary);
    padding: 5px 8px; border-radius: 6px; margin-bottom: 5px;
    font-size: 12px; color: var(--text-light); cursor: pointer;
}
.reply-preview .reply-name { font-weight: 600; color: var(--primary); font-size: 11px; }
[data-theme="dark"] .reply-preview { background: rgba(255,255,255,.06); }

.system-message {
    align-self: center;
    background: var(--system-msg-bg);
    color: var(--system-msg-color);
    padding: 5px 14px; border-radius: 20px;
    font-size: 11px; text-align: center; max-width: 90%;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.readonly-notice {
    text-align:center; font-size:11px; color:var(--readonly-color);
    padding:6px; background:var(--readonly-bg);
}

/* ── Input Area ─────────────────────────────── */
.reply-bar {
    background:var(--reply-bar-bg); padding:8px 14px;
    display:flex; align-items:center; justify-content:space-between;
    font-size:12px; border-top:1px solid var(--border);
}
.reply-bar .reply-preview-mini { flex:1; display:flex; align-items:center; gap:8px; color:var(--text-light); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reply-bar .reply-preview-mini .reply-mini-name { font-weight:600; color:var(--primary); font-size:11px; }
.reply-bar .reply-preview-mini .reply-mini-text { font-size:11px; opacity:.7; overflow:hidden; text-overflow:ellipsis; }
.reply-bar .cancel-reply { background:none; border:none; color:var(--danger); cursor:pointer; font-size:16px; padding:4px; flex-shrink:0; }

.message-input-area {
    background:var(--surface); padding:8px 10px;
    display:flex; gap:8px; align-items:flex-end; border-top:1px solid var(--border);
}
.msg-input {
    flex:1; padding:10px 16px;
    border:none; border-radius:24px;
    font-size:14px; font-family:inherit;
    background:var(--input-bg); outline:none; transition:background .2s;
    color:var(--text); max-height:120px; overflow-y:auto; resize:none;
}
.msg-input:focus { background:var(--input-bg); }

.send-msg-btn {
    width:42px; height:42px; border-radius:50%;
    background:var(--primary); color:#fff; border:none;
    font-size:16px; cursor:pointer; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    transition:var(--transition); box-shadow:0 2px 8px rgba(26,115,232,.3);
}
.send-msg-btn:hover  { background:var(--primary-dark); }
.send-msg-btn:active { transform:scale(.9); }
.send-msg-btn:disabled { opacity:.4; cursor:not-allowed; }

/* ── Message Ticks ──────────────────────────── */
.msg-tick { font-size: 13px; margin-right: 3px; transition: color .3s; }
.msg-tick.sent     { color: rgba(255,255,255,0.6); }
.msg-tick.delivered{ color: rgba(255,255,255,0.6); }
.msg-tick.read     { color: #53bdeb; }
.msg-tick.pending  { color: rgba(255,255,255,0.4); }

/* ── Typing / Recording Indicator ───────────── */
.partner-status-bar {
    font-size: 11px;
    color: var(--primary);
    font-style: italic;
    transition: all .3s;
}
.typing-dots span {
    display: inline-block;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 1px;
    animation: typingBounce .8s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .30s; }
@keyframes typingBounce {
    0%,60%,100% { transform: translateY(0); }
    30%          { transform: translateY(-4px); }
}

/* ── Online dot on contact avatar ───────────── */
.contact-item { position: relative; }
.online-dot {
    position: absolute;
    bottom: 2px; left: 2px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--surface);
    display: none;
}
.online-dot.show { display: block; }

/* pending clock icon */
.msg-clock { font-size: 11px; color: rgba(255,255,255,0.5); margin-right: 2px; }


/* Search messages bar */
.search-messages-bar {
    background:var(--surface); padding:7px 12px;
    display:none; align-items:center; gap:8px;
    border-bottom:1px solid var(--border);
}
.search-messages-bar.show { display:flex; }
.search-messages-bar input {
    flex:1; padding:9px 12px; border:1.5px solid var(--primary);
    border-radius:8px; font-size:14px; font-family:inherit;
    background:var(--input-bg); outline:none; color:var(--text);
}
.search-result-count { font-size:12px; color:var(--text-light); text-align:center; padding:3px; }

/* ══════════════════════════════════════════════
   CONTEXT MENUS
   ══════════════════════════════════════════════ */
.context-menu, .contact-context-menu {
    position:fixed; background:var(--surface);
    border-radius:var(--radius); box-shadow:var(--shadow-lg);
    min-width:180px; z-index:500;
    display:none; overflow:hidden; border:1px solid var(--border);
}
.context-menu.show, .contact-context-menu.show { display:block; animation:fadeIn .12s ease-out; }
.context-menu-item, .contact-context-item {
    padding:12px 16px; cursor:pointer; display:flex; align-items:center;
    gap:10px; font-size:13px; color:var(--text);
    border-bottom:1px solid var(--border); transition:background .12s;
}
.context-menu-item:last-child, .contact-context-item:last-child { border-bottom:none; }
.context-menu-item:active, .contact-context-item:active { background:var(--hover-bg); }
.context-menu-item.danger, .contact-context-item.danger { color:var(--danger); }
.contact-context-backdrop { position:fixed; top:0; left:0; width:100%; height:100%; z-index:499; display:none; }
.contact-context-backdrop.show { display:block; }

/* Edit inline */
.edit-input {
    width:100%; padding:7px 10px; border:1.5px solid var(--primary);
    border-radius:8px; font-size:14px; font-family:inherit;
    background:var(--surface); color:var(--text); outline:none; margin-bottom:4px;
}
.edit-actions { display:flex; gap:6px; margin-top:4px; }
.edit-actions button { padding:3px 10px; border-radius:6px; border:none; font-size:11px; cursor:pointer; font-family:inherit; font-weight:600; }
.edit-save   { background:var(--primary); color:#fff; }
.edit-cancel { background:var(--border); color:var(--text); }

/* AI notice */
.ai-unavailable-notice {
    background:var(--ai-notice-bg); border:1px solid var(--warning);
    border-radius:var(--radius-sm); padding:10px 14px; margin:12px;
    text-align:center; font-size:13px; color:#856404;
}

/* ══════════════════════════════════════════════
   BOTTOM NAV
   ══════════════════════════════════════════════ */
.bottom-nav {
    display:flex; background:var(--surface);
    border-top:1px solid var(--border); z-index:50;
    height:var(--nav-height); padding-bottom:env(safe-area-inset-bottom);
}
.nav-item {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:6px 4px; cursor:pointer; color:var(--text-lighter); transition:var(--transition);
    font-size:10px; gap:3px; font-weight:500; position:relative;
}
.nav-item.active { color:var(--primary); }
.nav-item i { font-size:20px; }
/* Active indicator dot */
.nav-item.active::after {
    content:''; position:absolute; bottom:4px;
    width:4px; height:4px; border-radius:50%; background:var(--primary);
}

/* ── FAB ────────────────────────────────────── */
.fab {
    position:fixed; bottom:calc(var(--nav-height) + 16px); left:20px;
    width:52px; height:52px; border-radius:50%;
    background:var(--primary); color:#fff; border:none; font-size:20px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 4px 18px rgba(26,115,232,.4); z-index:50; transition:var(--transition);
}
.fab:hover  { background:var(--primary-dark); }
.fab:active { transform:scale(.9); }
.fab.hidden { display:none; }

.fab-menu { position:fixed; bottom:calc(var(--nav-height) + 82px); left:20px; display:none; flex-direction:column; gap:10px; z-index:49; }
.fab-menu.show { display:flex; }
.fab-menu-item { display:flex; align-items:center; gap:10px; cursor:pointer; }
.fab-menu-label {
    background:var(--surface); padding:7px 13px; border-radius:20px;
    font-size:13px; font-weight:600; color:var(--text); box-shadow:var(--shadow); white-space:nowrap;
}
.fab-menu-btn {
    width:44px; height:44px; border-radius:50%; border:none; font-size:17px;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    color:#fff; box-shadow:0 4px 12px rgba(0,0,0,.2);
}
.fab-menu-btn:active { transform:scale(.9); }
.fab-add-contact  { background:var(--primary); }
.fab-create-group { background:var(--success); }
.fab-backdrop { position:fixed; top:0; left:0; width:100%; height:100%; z-index:48; display:none; }
.fab-backdrop.show { display:block; }

/* ── New-Chat Screen (WhatsApp-style) ───────── */
.new-chat-screen {
    position:fixed; top:0; left:0; width:100%; height:100%;
    background:var(--bg); z-index:200;
    display:none; flex-direction:column; overflow:hidden;
    animation: slideInFromRight .22s cubic-bezier(.4,0,.2,1);
}
.new-chat-screen.active { display:flex; }
@keyframes slideInFromRight {
    from { transform:translateX(-40px); opacity:0; }
    to   { transform:translateX(0);     opacity:1; }
}
@keyframes spin {
    from { transform:rotate(0deg); }
    to   { transform:rotate(360deg); }
}
.new-chat-header {
    background:var(--primary);
    padding:0 8px 0 16px;
    display:flex; align-items:center; gap:12px;
    height:56px; min-height:56px; flex-shrink:0;
}
.new-chat-header-info { flex:1; min-width:0; }
.new-chat-header h2 { font-size:18px; font-weight:700; color:#fff; margin:0; }
.new-chat-header small { font-size:12px; color:rgba(255,255,255,.8); }
.new-chat-back {
    width:38px; height:38px; background:none; border:none;
    color:#fff; font-size:18px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    border-radius:50%; flex-shrink:0; transition:var(--transition);
}
.new-chat-back:active { background:rgba(255,255,255,.15); }
.new-chat-body { flex:1; overflow-y:auto; }
.new-chat-option {
    display:flex; align-items:center; padding:14px 16px; gap:16px;
    cursor:pointer; border-bottom:1px solid var(--border);
    background:var(--surface); transition:background .15s;
}
.new-chat-option:hover, .new-chat-option:active { background:var(--hover-bg); }
.new-chat-option-icon {
    width:52px; height:52px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:22px; color:#fff; flex-shrink:0;
}
.new-chat-option-text strong { display:block; font-size:15px; font-weight:600; color:var(--text); }
.new-chat-option-text small  { font-size:12px; color:var(--text-light); }
.new-chat-section-header {
    padding:10px 16px 6px;
    font-size:11px; font-weight:700; color:var(--text-lighter);
    letter-spacing:.8px; text-transform:uppercase;
    background:var(--bg); border-bottom:1px solid var(--border);
}
.new-chat-synced-item {
    display:flex; align-items:center; padding:12px 16px; gap:12px;
    cursor:pointer; border-bottom:1px solid var(--border);
    background:var(--surface); transition:background .15s;
}
.new-chat-synced-item:hover, .new-chat-synced-item:active { background:var(--hover-bg); }
.new-chat-empty {
    padding:40px 24px; text-align:center; color:var(--text-lighter);
    font-size:14px; line-height:1.6;
}
.new-chat-empty i { font-size:40px; margin-bottom:12px; display:block; color:var(--border); }
.sync-status-bar {
    background:var(--ai-notice-bg); padding:10px 16px;
    font-size:12px; color:var(--text-light);
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:8px;
}
.sync-status-bar i { color:var(--primary); }

/* ══════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════ */
.profile-header {
    text-align:center; padding:40px 20px 32px;
    background:var(--profile-gradient); position:relative;
}
.profile-avatar-large {
    width:96px; height:96px; border-radius:50%;
    background:rgba(255,255,255,.25);
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:38px; font-weight:700; margin:0 auto 16px; cursor:pointer;
    position:relative; overflow:hidden;
    border:3px solid rgba(255,255,255,.4);
}
.profile-avatar-large img { width:100%; height:100%; object-fit:cover; }
.avatar-edit-badge {
    position:absolute; bottom:0; right:0; background:var(--success);
    color:#fff; width:28px; height:28px; border-radius:50%; font-size:13px;
    display:flex; align-items:center; justify-content:center; border:3px solid #fff;
}
.profile-name  { font-size:22px; font-weight:700; color:#fff; margin-bottom:4px; }
.profile-email { font-size:13px; color:rgba(255,255,255,.75); margin-bottom:4px; }
.profile-bio   { font-size:13px; color:rgba(255,255,255,.65); font-style:italic; }

.profile-section { padding:14px 18px; background:var(--surface); margin:10px 0; }
.profile-section h3 { font-size:11px; color:var(--text-lighter); margin-bottom:10px; font-weight:600; text-transform:uppercase; letter-spacing:1.2px; }
.profile-item {
    display:flex; align-items:center; padding:13px 0; cursor:pointer;
    border-bottom:1px solid var(--border); gap:12px; transition:var(--transition);
}
.profile-item:last-child { border-bottom:none; }
.profile-item:hover { color:var(--primary); }
.profile-item i { font-size:17px; width:26px; text-align:center; color:var(--text-light); }
.profile-item span { flex:1; font-size:14px; color:var(--text); }
.profile-item .arrow { color:var(--text-lighter); font-size:12px; }

/* ══════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════ */
.modal {
    display:none; position:fixed; top:0; left:0; width:100%; height:100%;
    background:var(--modal-overlay); backdrop-filter:blur(4px);
    z-index:1000; justify-content:center; align-items:flex-end; padding:0;
}
.modal.active { display:flex; }
.modal-content {
    background:var(--surface);
    border-radius:var(--radius-lg) var(--radius-lg) 0 0;
    padding:24px 22px 32px;
    width:100%; max-width:480px;
    max-height:88vh; overflow-y:auto;
    box-shadow:0 -4px 30px rgba(0,0,0,.15);
    animation:slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
.modal-title { font-size:18px; font-weight:700; color:var(--text); margin-bottom:20px; text-align:center; }
.modal-close {
    float:left; background:none; border:none; font-size:20px;
    cursor:pointer; color:var(--text-lighter); transition:var(--transition);
}
.modal-close:hover { color:var(--danger); }

/* ── Empty State ────────────────────────────── */
.empty-state { text-align:center; padding:60px 24px; color:var(--text-lighter); }
.empty-state i { font-size:48px; margin-bottom:14px; color:var(--text-lighter); opacity:.4; display:block; }
.empty-state p { font-size:14px; line-height:1.6; }

/* ── Upload Progress ────────────────────────── */
.upload-progress {
    position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
    background:var(--surface); padding:28px; border-radius:var(--radius);
    text-align:center; box-shadow:var(--shadow-lg); z-index:2000; display:none;
}
.upload-progress.show { display:block; }
.spinner {
    width:40px; height:40px; border:3px solid var(--border);
    border-top:3px solid var(--primary); border-radius:50%;
    animation:spin 1s linear infinite; margin:0 auto 14px;
}
@keyframes spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

/* ── Member chips ───────────────────────────── */
.member-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.member-chip {
    background:var(--primary-light); color:#fff; padding:5px 10px;
    border-radius:16px; font-size:12px; display:flex; align-items:center; gap:5px;
}
.member-chip i { cursor:pointer; font-size:10px; }
.member-chip i:hover { color:var(--danger); }

/* ── Group member list ──────────────────────── */
.group-member-item {
    display:flex; align-items:center; justify-content:space-between;
    padding:11px 12px; border-bottom:1px solid var(--border); gap:12px;
}
.group-member-avatar {
    width:34px; height:34px; border-radius:50%;
    background:linear-gradient(135deg, var(--primary), var(--primary-dark));
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:13px; flex-shrink:0; overflow:hidden;
}
.group-member-avatar img { width:100%; height:100%; object-fit:cover; }
.group-member-info    { flex:1; min-width:0; }
.group-member-name    { font-weight:600; font-size:13px; color:var(--text); }
.group-member-role    { font-size:10px; color:var(--text-light); }

/* ── Toggle ─────────────────────────────────── */
.toggle-switch { position:relative; display:inline-block; width:46px; height:25px; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider {
    position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0;
    background:#ccc; transition:.3s; border-radius:25px;
}
.toggle-slider:before {
    position:absolute; content:""; height:19px; width:19px;
    left:3px; bottom:3px; background:#fff; transition:.3s; border-radius:50%;
    box-shadow:0 1px 4px rgba(0,0,0,.2);
}
input:checked + .toggle-slider { background:var(--primary); }
input:checked + .toggle-slider:before { transform:translateX(21px); }

/* ── Invite link ────────────────────────────── */
.invite-link-box {
    background:var(--input-bg); border:1.5px dashed var(--primary);
    border-radius:var(--radius-sm); padding:11px; margin:10px 0;
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    font-size:12px; word-break:break-all; color:var(--text);
}

/* ── Group photo preview ────────────────────── */
#gm-group-photo-preview { cursor:pointer; transition:var(--transition); }
#gm-group-photo-preview:hover { opacity:.8; }
#gm-group-photo-preview img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

/* ── Theme switch ───────────────────────────── */
.theme-switch-wrapper {
    display:flex; align-items:center; justify-content:space-between;
    padding:13px 0; border-bottom:1px solid var(--border);
    cursor:pointer; transition:var(--transition);
}
.theme-switch-wrapper:hover { color:var(--primary); }
.theme-switch-label { display:flex; align-items:center; gap:12px; font-size:14px; color:var(--text); }
.theme-switch-label i { font-size:17px; width:26px; text-align:center; color:var(--text-light); transition:var(--transition); }

.theme-toggle { position:relative; display:inline-block; width:52px; height:28px; }
.theme-toggle input { opacity:0; width:0; height:0; }
.theme-toggle-slider {
    position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0;
    background:linear-gradient(135deg, #fdcb6e, #f39c12);
    transition:.35s; border-radius:28px;
    display:flex; align-items:center; justify-content:space-between; padding:0 6px;
}
.theme-toggle-slider:before {
    position:absolute; content:""; height:22px; width:22px;
    left:3px; bottom:3px; background:#fff; transition:.35s; border-radius:50%;
    z-index:1; box-shadow:0 2px 6px rgba(0,0,0,.2);
}
input:checked + .theme-toggle-slider { background:linear-gradient(135deg, #2c3e50, #1a1a2e); }
input:checked + .theme-toggle-slider:before { transform:translateX(24px); }
.theme-toggle-slider .sun-icon, .theme-toggle-slider .moon-icon { font-size:13px; z-index:0; }
.theme-toggle-slider .sun-icon  { color:#f39c12; margin-left:2px; }
.theme-toggle-slider .moon-icon { color:#f1c40f; margin-right:2px; }

/* ══════════════════════════════════════════════
   DARK MODE PATCHES
   ══════════════════════════════════════════════ */
[data-theme="dark"] .contact-item       { border-bottom-color:var(--border); }
[data-theme="dark"] .chat-header-bar    { background:var(--surface); border-bottom-color:var(--border); }
[data-theme="dark"] .chat-header-bar:hover { background:var(--hover-bg); }
[data-theme="dark"] .app-header        { background:var(--surface); border-bottom-color:var(--border); }
[data-theme="dark"] .app-header .title { color:var(--text); }
[data-theme="dark"] .icon-btn          { color:var(--text-light); }
[data-theme="dark"] .icon-btn:hover    { background:var(--hover-bg); color:var(--primary); }
[data-theme="dark"] .back-btn          { color:var(--primary); }
[data-theme="dark"] .chat-partner-name { color:var(--text); }
[data-theme="dark"] .chat-partner-status { color:var(--text-light); }
[data-theme="dark"] .call-icon-btn     { color:var(--text-light); }
[data-theme="dark"] .call-icon-btn:hover { background:var(--hover-bg); }
[data-theme="dark"] .chat-more-btn     { color:var(--text-light); }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea { background:var(--input-bg); color:var(--text); border-color:var(--border); }
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus { background:var(--surface); border-color:var(--primary); }
[data-theme="dark"] .msg-input         { background:var(--input-bg); color:var(--text); }
[data-theme="dark"] .search-box        { background:var(--input-bg); color:var(--text); }
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .chat-more-menu,
[data-theme="dark"] .context-menu,
[data-theme="dark"] .contact-context-menu { background:var(--surface); border:1px solid var(--border); }
[data-theme="dark"] .upload-progress   { background:var(--surface); }
[data-theme="dark"] .empty-state i     { opacity:.25; }
[data-theme="dark"] .error-message     { background:rgba(231,76,60,.15); }

/* ══════════════════════════════════════════════
   CALL UI
   ══════════════════════════════════════════════ */
.call-overlay {
    position:fixed; inset:0; z-index:2000;
    display:flex; flex-direction:column;
    align-items:center; justify-content:center;
    background:linear-gradient(160deg, #1a0a3e 0%, #0d1a3a 50%, #0a2a1a 100%);
    animation:callFadeIn .4s ease-out;
}
@keyframes callFadeIn { from{opacity:0;transform:scale(1.03)} to{opacity:1;transform:scale(1)} }

#remote-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; background:#000; display:none; }
#remote-video.active { display:block; }

#local-video {
    position:absolute; top:18px; right:14px;
    width:90px; height:130px; border-radius:14px;
    object-fit:cover; z-index:10;
    border:2px solid rgba(255,255,255,.25);
    box-shadow:0 4px 16px rgba(0,0,0,.5);
    display:none; background:#111; cursor:pointer;
}
#local-video.active { display:block; }

.call-overlay-content {
    position:relative; z-index:5;
    display:flex; flex-direction:column; align-items:center;
    width:100%; padding:60px 30px 40px;
    flex:1; justify-content:space-between;
}
.call-avatar-wrap { display:flex; flex-direction:column; align-items:center; gap:14px; }
.call-avatar-ring { position:relative; display:flex; align-items:center; justify-content:center; }
.call-avatar-ring::before, .call-avatar-ring::after {
    content:''; position:absolute; border-radius:50%;
    border:2px solid rgba(255,255,255,.15);
    animation:callRingPulse 2.4s ease-out infinite;
}
.call-avatar-ring::before { width:130px; height:130px; animation-delay:0s; }
.call-avatar-ring::after  { width:170px; height:170px; animation-delay:.6s; }
@keyframes callRingPulse { 0%{transform:scale(.8);opacity:.8} 100%{transform:scale(1.2);opacity:0} }

.call-avatar-img {
    width:96px; height:96px; border-radius:50%;
    background:linear-gradient(135deg, var(--primary), var(--primary-dark));
    display:flex; align-items:center; justify-content:center;
    font-size:38px; font-weight:700; color:#fff;
    box-shadow:0 8px 28px rgba(0,0,0,.4);
    overflow:hidden; z-index:1; position:relative;
}
.call-avatar-img img { width:100%; height:100%; object-fit:cover; }

.call-partner-name { font-size:24px; font-weight:700; color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.3); }
.call-status-text  { font-size:13px; color:rgba(255,255,255,.55); display:flex; align-items:center; gap:6px; }
.call-status-dot   { width:6px; height:6px; border-radius:50%; background:var(--success); animation:dotBlink 1.2s ease-in-out infinite; }
@keyframes dotBlink { 0%,100%{opacity:1} 50%{opacity:.2} }
.call-timer { font-size:17px; color:rgba(255,255,255,.75); font-variant-numeric:tabular-nums; }

.call-controls { display:flex; justify-content:center; gap:20px; flex-wrap:wrap; width:100%; }
.call-ctrl-btn { display:flex; flex-direction:column; align-items:center; gap:7px; background:none; border:none; cursor:pointer; color:#fff; }
.call-ctrl-icon {
    width:56px; height:56px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:21px; transition:all .2s ease;
}
.call-ctrl-btn:active .call-ctrl-icon { transform:scale(.9); }
.call-ctrl-icon.muted   { background:rgba(255,255,255,.15); }
.call-ctrl-icon.unmuted { background:rgba(255,255,255,.15); }
.call-ctrl-icon.cam-on  { background:rgba(255,255,255,.15); }
.call-ctrl-icon.cam-off { background:rgba(255,85,85,.35); }
.call-ctrl-icon.speaker { background:rgba(255,255,255,.15); }
.call-ctrl-icon.hangup  { background:#e74c3c; box-shadow:0 4px 18px rgba(231,76,60,.5); }
.call-ctrl-label { font-size:11px; color:rgba(255,255,255,.55); }

/* Incoming call */
.incoming-call-overlay {
    position:fixed; inset:0; z-index:3000;
    display:flex; flex-direction:column;
    align-items:center; justify-content:flex-end;
    background:rgba(0,0,0,.7); backdrop-filter:blur(8px);
    animation:callFadeIn .3s ease-out;
}
.incoming-call-card {
    background:linear-gradient(160deg, #1e1048 0%, #102040 100%);
    border-radius:28px 28px 0 0;
    padding:32px 28px 48px;
    width:100%; max-width:480px;
    display:flex; flex-direction:column; align-items:center; gap:18px;
    box-shadow:0 -8px 32px rgba(0,0,0,.4);
    animation:slideUpCard .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUpCard { from{transform:translateY(100%)} to{transform:translateY(0)} }

.incoming-call-label { font-size:11px; color:rgba(255,255,255,.45); letter-spacing:2px; text-transform:uppercase; }
.incoming-call-avatar {
    width:84px; height:84px; border-radius:50%;
    background:linear-gradient(135deg, var(--primary), var(--primary-dark));
    display:flex; align-items:center; justify-content:center;
    font-size:34px; font-weight:700; color:#fff;
    overflow:hidden; box-shadow:0 0 0 6px rgba(26,115,232,.2);
}
.incoming-call-avatar img { width:100%; height:100%; object-fit:cover; }
.incoming-call-name { font-size:22px; font-weight:700; color:#fff; }
.incoming-call-type { font-size:13px; color:rgba(255,255,255,.5); }
.incoming-call-actions { display:flex; gap:48px; margin-top:8px; }
.inc-action { display:flex; flex-direction:column; align-items:center; gap:9px; background:none; border:none; cursor:pointer; color:#fff; font-family:inherit; }
.inc-action-icon {
    width:64px; height:64px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:24px; transition:transform .2s ease;
}
.inc-action:active .inc-action-icon { transform:scale(.9); }
.inc-action-icon.reject { background:#e74c3c; box-shadow:0 4px 18px rgba(231,76,60,.4); animation:rejectShake 1.2s ease-in-out infinite; }
.inc-action-icon.accept { background:#00b894; box-shadow:0 4px 18px rgba(0,184,148,.4); animation:acceptPulse 1.2s ease-in-out infinite; }
@keyframes rejectShake { 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} }
@keyframes acceptPulse { 0%,100%{box-shadow:0 4px 18px rgba(0,184,148,.4)} 50%{box-shadow:0 4px 28px rgba(0,184,148,.7)} }
.inc-action-label { font-size:12px; color:rgba(255,255,255,.55); }

/* ── AI loading dot ──────────────────────────── */
.icon-btn {
    width:38px; height:38px; border-radius:50%; border:none;
    background:transparent; color:var(--text-light); font-size:17px;
    cursor:pointer; display:flex; align-items:center; justify-content:center; transition:var(--transition);
}
.icon-btn:hover  { background:rgba(26,115,232,.08); color:var(--primary); }
.icon-btn:active { transform:scale(.9); }

        /* ═══════════════════════════════════════════
           AUTH SCREEN — FULL SCREEN (NO CARD)
           بدون کارت، فول‌اسکرین
        ═══════════════════════════════════════════ */

        /* ── کنترل نمایش صفحه‌ها ── */
        .screen { display: none !important; }
        .screen.active { display: flex !important; }

        /* پایه کامل صفحه ورود */
        #auth-screen {
            position: fixed;
            inset: 0;
            flex-direction: column;
            background: #0d1117;
            overflow: hidden;
        }

        /* ── بخش بالا: هیرو ── */
        .auth-hero {
            flex: 0 0 42%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            background: linear-gradient(160deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
        }
        /* حلقه‌های درخشان پس‌زمینه */
        .auth-hero::before {
            content: '';
            position: absolute;
            width: 340px; height: 340px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(26,115,232,0.22) 0%, transparent 68%);
            top: -60px; right: -60px;
        }
        .auth-hero::after {
            content: '';
            position: absolute;
            width: 260px; height: 260px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(0,184,148,0.12) 0%, transparent 70%);
            bottom: -50px; left: -50px;
        }

        /* ذرات شناور */
        .auth-particles {
            position: absolute;
            inset: 0;
            pointer-events: none;
        }
        .auth-particle {
            position: absolute;
            width: 3px; height: 3px;
            background: rgba(162,155,254,0.5);
            border-radius: 50%;
            animation: floatUp 7s infinite ease-in;
        }
        .auth-particle:nth-child(1){left:8%;  animation-delay:0s;   animation-duration:8s;}
        .auth-particle:nth-child(2){left:25%; animation-delay:1.5s; animation-duration:6s;}
        .auth-particle:nth-child(3){left:45%; animation-delay:0.8s; animation-duration:9s;}
        .auth-particle:nth-child(4){left:65%; animation-delay:2s;   animation-duration:7s;}
        .auth-particle:nth-child(5){left:82%; animation-delay:0.3s; animation-duration:8s;}
        .auth-particle:nth-child(6){left:18%; animation-delay:3s;   animation-duration:6s;}
        @keyframes floatUp {
            0%   { transform: translateY(120px) scale(0); opacity: 0; }
            15%  { opacity: 0.8; }
            85%  { opacity: 0.8; }
            100% { transform: translateY(-120px) scale(1.2); opacity: 0; }
        }

        /* لوگو */
        .auth-logo-wrap {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }
        .auth-logo-ring {
            width: 100px; height: 100px;
            border-radius: 28px;
            background: linear-gradient(135deg, #1a73e8, #74a9f5);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow:
                0 0 0 10px rgba(26,115,232,0.12),
                0 0 0 20px rgba(26,115,232,0.06),
                0 12px 40px rgba(26,115,232,0.5);
            animation: pulseLogo 3s ease-in-out infinite;
        }
        .auth-logo-ring img {
            width: 72px; height: 72px;
            border-radius: 18px;
            object-fit: cover;
        }
        @keyframes pulseLogo {
            0%,100% { box-shadow: 0 0 0 10px rgba(26,115,232,0.12), 0 0 0 20px rgba(26,115,232,0.06), 0 12px 40px rgba(26,115,232,0.5); }
            50%      { box-shadow: 0 0 0 14px rgba(26,115,232,0.16), 0 0 0 28px rgba(26,115,232,0.08), 0 16px 50px rgba(26,115,232,0.55); }
        }
        .auth-app-name {
            color: #fff;
            font-size: 30px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }
        .auth-tagline {
            color: rgba(255,255,255,0.45);
            font-size: 13px;
            text-align: center;
        }
        /* نشان‌های ویژگی */
        .auth-badges {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 4px;
            position: relative;
            z-index: 2;
        }
        .auth-badge {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.45);
            border-radius: 20px;
            padding: 5px 12px;
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .auth-badge i { color: #74a9f5; }

        /* ── موج جداکننده ── */
        .auth-wave {
            flex: none;
            height: 36px;
            background: #0d1117;
            position: relative;
            margin-top: -1px;
        }
        .auth-wave::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 36px;
            background: linear-gradient(160deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
            border-radius: 0 0 50% 50% / 0 0 36px 36px;
        }

        /* ── بخش پایین: فرم ── */
        .auth-form-section {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            padding: 28px 24px 32px;
            background: #0d1117;
            position: relative;
        }

        /* پیشرفت */
        .otp-progress {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-bottom: 24px;
        }
        .otp-progress-dot {
            height: 4px;
            width: 32px;
            border-radius: 2px;
            background: rgba(255,255,255,0.12);
            transition: all 0.3s;
        }
        .otp-progress-dot.active {
            background: #1a73e8;
            width: 56px;
        }

        /* عنوان و زیرعنوان مرحله */
        .otp-step-title {
            color: #fff;
            font-size: 20px;
            font-weight: 700;
            text-align: center;
            margin-bottom: 6px;
        }
        .otp-step-subtitle {
            color: rgba(255,255,255,0.4);
            font-size: 13px;
            text-align: center;
            margin-bottom: 28px;
            line-height: 1.7;
        }
        .otp-step-subtitle span { color: #74a9f5; font-weight: 600; }

        /* ردیف شماره + کشور */
        .phone-input-row {
            display: flex;
            gap: 10px;
            margin-bottom: 14px;
        }
        .country-select-wrapper { position: relative; }
        .country-select-btn {
            display: flex;
            align-items: center;
            gap: 7px;
            background: #1c2336;
            border: 1.5px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 15px 14px;
            color: #fff;
            font-size: 14px;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color 0.2s, background 0.2s;
            min-width: 88px;
        }
        .country-select-btn:focus,
        .country-select-btn:hover {
            outline: none;
            border-color: #1a73e8;
            background: #1f2a47;
        }
        .country-flag { font-size: 18px; line-height: 1; }
        .country-code { font-size: 13px; font-weight: 600; }

        .phone-input-field {
            flex: 1;
            background: #1c2336;
            border: 1.5px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 15px 16px;
            color: #fff;
            font-size: 20px;
            font-weight: 600;
            font-family: 'Roboto Mono', 'Courier New', monospace;
            direction: ltr;
            letter-spacing: 2px;
            transition: border-color 0.2s, background 0.2s;
        }
        .phone-input-field::placeholder { color: rgba(255,255,255,0.2); letter-spacing: 0; font-weight: 400; font-size: 15px; }
        .phone-input-field:focus {
            outline: none;
            border-color: #1a73e8;
            background: #1f2a47;
        }

        /* دراپ‌داون کشور */
        .country-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            right: 0; left: 0;
            background: #1a2338;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 14px;
            box-shadow: 0 16px 48px rgba(0,0,0,0.6);
            z-index: 200;
            overflow: hidden;
            animation: dropDown 0.15s ease;
        }
        @keyframes dropDown {
            from { opacity:0; transform: translateY(-6px); }
            to   { opacity:1; transform: translateY(0); }
        }
        .country-option {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 13px 16px;
            color: #fff;
            cursor: pointer;
            transition: background 0.15s;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 14px;
        }
        .country-option:last-child { border-bottom: none; }
        .country-option:hover { background: rgba(26,115,232,0.18); }
        .country-option.disabled { opacity: 0.3; cursor: not-allowed; }
        .country-option.disabled:hover { background: transparent; }
        .country-option-name { flex: 1; }
        .country-option-code { font-size: 12px; color: rgba(255,255,255,0.4); }

        /* دکمه‌های اصلی */
        .otp-btn {
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 14px;
            background: linear-gradient(135deg, #1a73e8, #74a9f5);
            color: #fff;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
            box-shadow: 0 8px 24px rgba(26,115,232,0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .otp-btn:hover  { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(26,115,232,0.55); }
        .otp-btn:active { transform: translateY(0); }
        .otp-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
        .otp-btn.loading .btn-text { display: none; }
        .otp-btn .btn-spinner {
            display: none;
            width: 22px; height: 22px;
            border: 2.5px solid rgba(255,255,255,0.3);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }
        .otp-btn.loading .btn-spinner { display: block; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* باکس‌های OTP */
        .otp-digits-row {
            display: flex;
            gap: 8px;
            justify-content: center;
            direction: ltr;
            margin-bottom: 20px;
        }
        .otp-digit {
            flex: 1;
            max-width: 52px;
            height: 60px;
            background: #1c2336;
            border: 1.5px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            color: #fff;
            font-size: 24px;
            font-weight: 700;
            text-align: center;
            transition: all 0.18s;
            caret-color: #1a73e8;
        }
        .otp-digit:focus {
            outline: none;
            border-color: #1a73e8;
            background: #1f2a47;
            box-shadow: 0 0 0 3px rgba(26,115,232,0.2);
        }
        .otp-digit.filled {
            border-color: rgba(26,115,232,0.6);
            background: rgba(26,115,232,0.12);
            color: #74a9f5;
        }

        /* راهنما + ارسال مجدد */
        .otp-validity-hint {
            color: rgba(255,255,255,0.28);
            font-size: 11px;
            text-align: center;
            margin-top: 6px;
            margin-bottom: 4px;
        }
        .resend-row { text-align: center; margin-top: 18px; }
        .resend-timer { color: rgba(255,255,255,0.35); font-size: 13px; }
        .resend-timer span { color: #74a9f5; font-weight: 600; }
        .resend-btn {
            background: none;
            border: none;
            color: #74a9f5;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            transition: background 0.15s;
        }
        .resend-btn:hover { background: rgba(26,115,232,0.15); }
        .resend-btn:disabled { opacity: 0.35; cursor: not-allowed; }

        /* دکمه برگشت */
        .back-to-phone {
            display: flex;
            align-items: center;
            gap: 8px;
            background: none;
            border: none;
            color: rgba(255,255,255,0.35);
            font-size: 13px;
            cursor: pointer;
            padding: 4px 0;
            margin-bottom: 20px;
            transition: color 0.15s;
        }
        .back-to-phone:hover { color: rgba(255,255,255,0.7); }

        /* پیام خطا / موفقیت */
        .otp-error {
            background: rgba(255,71,87,0.12);
            border: 1px solid rgba(255,71,87,0.28);
            color: #ff6b7a;
            border-radius: 12px;
            padding: 12px 16px;
            font-size: 13px;
            text-align: center;
            margin-top: 14px;
            display: none;
            line-height: 1.5;
        }
        .otp-error.show { display: block; }
        .otp-success {
            background: rgba(0,184,148,0.12);
            border: 1px solid rgba(0,184,148,0.28);
            color: #00d2a8;
            border-radius: 12px;
            padding: 12px 16px;
            font-size: 13px;
            text-align: center;
            margin-top: 14px;
            display: none;
        }
        .otp-success.show { display: block; }


        /* ══════════════════════════════════════
           SOROUSH+ — هم‌گب Auth (v3 final)
        ══════════════════════════════════════ */

        #auth-screen {
            background: #fff !important;
            overflow: hidden !important;
            flex-direction: column !important;
            position: fixed !important;
            inset: 0 !important;
        }
        .auth-hero, .auth-wave { display: none !important; }
        .otp-progress           { display: none !important; }

        /* نوار بالا */
        .soroush-topbar {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            padding: 14px 18px 0;
            background: #fff;
            flex-shrink: 0;
        }
        .soroush-skip-btn {
            background: none; border: none;
            font-size: 30px; color: #555;
            cursor: pointer; padding: 4px 6px; line-height: 1;
        }

        /* بدنه فرم */
        .auth-form-section {
            background: #fff !important;
            padding: 0 26px 36px !important;
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
        }

        /* لوگو */
        .sr-logo-wrap { display: flex; justify-content: center; padding: 24px 0 28px; }
        .sr-logo-img  { width: 68px; height: 68px; border-radius: 20px; object-fit: cover; box-shadow: 0 2px 12px rgba(0,0,0,0.12); }

        /* عنوان */
        .otp-step-title {
            color: #111 !important;
            font-size: 20px !important;
            font-weight: 700 !important;
            text-align: center !important;
            margin-bottom: 10px !important;
            line-height: 1.5 !important;
        }
        /* زیرعنوان */
        .otp-step-subtitle {
            color: #666 !important;
            font-size: 13.5px !important;
            text-align: center !important;
            margin-bottom: 34px !important;
            line-height: 2 !important;
        }
        .otp-step-subtitle span, .otp-phone-link { color: #1a73e8 !important; font-weight: 600 !important; }

        /* ردیف شماره */
        .phone-input-row {
            background: #f5f5f5 !important;
            border: 1.5px solid #e2e2e2 !important;
            border-radius: 10px !important;
            display: flex !important;
            align-items: center !important;
            overflow: hidden !important;
            gap: 0 !important;
            margin-bottom: 16px !important;
            padding: 0 !important;
            direction: ltr !important;
        }
        .phone-input-row:focus-within { border-color: #1a73e8 !important; background: #fafcff !important; }
        .country-select-wrapper {
            border-left: 1.5px solid #e2e2e2 !important;
            border-right: none !important;
            flex-shrink: 0 !important;
            position: relative !important;
        }
        .phone-input-row:focus-within .country-select-wrapper { border-left-color: #1a73e8 !important; }
        .country-select-btn {
            background: transparent !important; border: none !important; border-radius: 0 !important;
            padding: 14px 10px !important; color: #333 !important; min-width: 88px !important;
            gap: 5px !important; display: flex !important; align-items: center !important; cursor: pointer !important;
        }
        .country-select-btn:hover { background: rgba(0,0,0,0.03) !important; }
        .country-flag { font-size: 20px !important; line-height: 1 !important; }
        .country-code { color: #333 !important; font-size: 14px !important; font-weight: 600 !important; }
        .phone-input-field {
            background: transparent !important; border: none !important; border-radius: 0 !important;
            color: #222 !important; font-size: 17px !important; padding: 14px 10px !important;
            letter-spacing: 2px !important; flex: 1 !important; min-width: 0 !important;
            font-family: 'Courier New', monospace !important;
            direction: ltr !important; text-align: left !important;
        }
        .phone-input-field::placeholder { color: #c5c5c5 !important; letter-spacing: 3px !important; font-size: 14px !important; }
        .phone-input-field:focus { outline: none !important; }

        /* دراپ‌داون */
        .country-dropdown {
            background: #fff !important; border: 1px solid #e8e8e8 !important;
            box-shadow: 0 6px 24px rgba(0,0,0,0.10) !important;
            left: 0 !important; right: auto !important; min-width: 210px !important; z-index: 300 !important;
        }
        .country-option       { color: #333 !important; border-color: #f5f5f5 !important; }
        .country-option:hover { background: #f0f5ff !important; }
        .country-option-code  { color: #999 !important; }

        /* چک‌باکس همگام‌سازی */
        .soroush-sync-row {
            display: flex; align-items: center; gap: 12px;
            justify-content: flex-end; margin-bottom: 24px;
            cursor: pointer; user-select: none; direction: ltr;
        }
        .soroush-sync-label { font-size: 14px; color: #333; font-weight: 500; }
        .soroush-sync-checkbox {
            width: 22px; height: 22px; border: 2px solid #c0c0c0;
            border-radius: 5px; background: #fff;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; transition: all 0.15s;
        }
        .soroush-sync-checkbox.checked { background: #1a73e8; border-color: #1a73e8; }
        .soroush-sync-checkbox.checked::after { content: '\2713'; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }

        /* دکمه بعدی */
        .otp-btn {
            background: #d0d0d0 !important; box-shadow: none !important;
            border-radius: 10px !important; color: #fff !important;
            font-size: 17px !important; font-weight: 600 !important;
            padding: 15px !important; transition: background 0.2s !important;
        }
        .otp-btn:hover { transform: none !important; box-shadow: none !important; }
        .otp-btn:not(:disabled) { background: #1a73e8 !important; box-shadow: 0 3px 10px rgba(26,115,232,0.28) !important; }
        .otp-btn:not(:disabled):active { background: #1558c0 !important; }
        .otp-btn:disabled { opacity: 1 !important; cursor: default !important; }
        .otp-btn.loading .btn-text { display: none !important; }

        /* قوانین */
        .soroush-terms { text-align: center; font-size: 12px; color: #888; margin-top: 16px; line-height: 2; direction: rtl; }
        .soroush-terms a { color: #1a73e8; text-decoration: none; }

        /* باکس‌های OTP */
        .otp-digits-row { gap: 8px !important; margin-bottom: 20px !important; justify-content: center !important; flex-wrap: nowrap !important; }
        .otp-digit {
            background: #efefef !important; border: 2px solid #e0e0e0 !important;
            border-radius: 12px !important; color: #111 !important;
            font-size: 22px !important; font-weight: 700 !important;
            width: 50px !important; max-width: 50px !important; height: 54px !important;
            flex: none !important; caret-color: #1a73e8 !important;
            transition: border-color 0.18s, background 0.18s !important;
        }
        .otp-digit:focus { border-color: #1a73e8 !important; background: #fff !important; box-shadow: none !important; outline: none !important; }
        .otp-digit.filled { border-color: #d0d0d0 !important; background: #efefef !important; color: #111 !important; }

        /* تایمر */
        .otp-validity-hint { display: none !important; }
        .resend-row { text-align: center !important; margin-top: 12px !important; }
        .resend-timer { color: #555 !important; font-size: 13px !important; line-height: 1.8 !important; }
        .resend-timer span { color: #1a73e8 !important; font-weight: 600 !important; }
        .resend-btn { color: #1a73e8 !important; font-size: 14px !important; background: none !important; border: none !important; cursor: pointer !important; padding: 6px 0 !important; font-weight: 600 !important; }

        /* خطا */
        .otp-error { background: rgba(211,47,47,0.06) !important; border-color: rgba(211,47,47,0.2) !important; color: #c62828 !important; }
    
        /* ══════════════════════════════════════════════
           VOICE MESSAGE
           ══════════════════════════════════════════════ */
        .voice-record-btn {
            width:42px; height:42px; border-radius:50%;
            background:var(--input-bg); color:var(--text-light); border:none;
            font-size:16px; cursor:pointer; flex-shrink:0;
            display:flex; align-items:center; justify-content:center;
            transition:var(--transition);
        }
        .voice-record-btn:hover { background:var(--hover-bg); color:var(--primary); }
        .voice-record-btn.recording {
            background:var(--danger) !important; color:#fff !important;
            animation: pulse-rec 1.2s infinite;
        }
        @keyframes pulse-rec {
            0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.4); }
            50%      { box-shadow: 0 0 0 8px rgba(231,76,60,0); }
        }

        .voice-recording-bar {
            display:none; flex:1; align-items:center; gap:10px;
            background:var(--input-bg); border-radius:24px;
            padding:8px 14px; font-size:13px; color:var(--text-light);
        }
        .voice-recording-bar.active { display:flex; }
        .voice-recording-bar .rec-dot {
            width:10px; height:10px; border-radius:50%; background:var(--danger);
            animation: blink-dot 1s infinite;
        }
        @keyframes blink-dot { 0%,100%{opacity:1} 50%{opacity:0.2} }
        .voice-recording-bar .rec-time { font-weight:600; color:var(--danger); min-width:36px; }
        .voice-recording-bar .rec-cancel {
            margin-right:auto; background:none; border:none; color:var(--text-lighter);
            cursor:pointer; font-size:12px; padding:2px 6px;
        }

        /* voice bubble player */
        .voice-bubble {
            display:flex; align-items:center; gap:10px;
            min-width:180px; max-width:240px;
        }
        .voice-play-btn {
            width:36px; height:36px; border-radius:50%; border:none;
            background:var(--primary); color:#fff; font-size:14px; cursor:pointer; flex-shrink:0;
            display:flex; align-items:center; justify-content:center; transition:var(--transition);
        }
        .voice-play-btn:hover { background:var(--primary-dark); }
        .voice-progress-wrap { flex:1; display:flex; flex-direction:column; gap:4px; }
        .voice-progress {
            -webkit-appearance:none; appearance:none;
            width:100%; height:3px; border-radius:2px;
            background:rgba(0,0,0,.15); outline:none; cursor:pointer;
        }
        .voice-progress::-webkit-slider-thumb {
            -webkit-appearance:none; width:12px; height:12px;
            border-radius:50%; background:var(--primary); cursor:pointer;
        }
        .voice-duration { font-size:10px; color:var(--text-lighter); }
/* ===== METHOD SELECTION PAGE (Bashir's design) ===== */
.ms-list {
    display: flex;
    flex-direction: column;
    margin-top: 32px;
    width: 100%;
}

.ms-option-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ms-option-card.selected {
    border-color: #f0f0f0;
    background-color: #fcfcfc;
}

.ms-radio-section {
    display: flex;
    align-items: center;
}

.ms-radio {
    width: 24px;
    height: 24px;
    border: 2px solid #cfcfcf;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.ms-radio.selected {
    border-color: #2b2b2b;
}

.ms-radio.selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-color: #2b2b2b;
    border-radius: 50%;
}

.ms-text-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-right: 16px;
    padding-left: 8px;
}

.ms-title-text {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.ms-number {
    font-size: 12px;
    color: #a3a3a3;
    direction: ltr;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
}

.ms-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ms-icon-box.selected {
    background-color: #2b2b2b;
    color: white;
}

.ms-icon-box.unselected {
    background-color: #ebebeb;
    color: #333;
}

.ms-icon-box svg {
    width: 45%;
    height: 45%;
}

.ms-btn-continue {
    width: 100%;
    background-color: #2b2b2b;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 24px;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.ms-btn-continue.disabled {
    background-color: #d1d1d1;
    color: #a0a0a0;
    cursor: not-allowed;
    pointer-events: none;
}

.ms-btn-continue:active {
    background-color: #111;
}

.ms-footer {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

@media (max-width: 400px) {
    .ms-option-card { padding: 14px 16px; }
    .ms-icon-box { width: 44px; height: 44px; }
    .ms-title-text { font-size: 14px; }
    .ms-number { font-size: 11px; }
    .ms-btn-continue { padding: 14px; font-size: 15px; }
}
