*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #0e0e0e;--bg-card: #212121;--bg-hover: #2c2c2c;--border: #363636;--text: #e4e6eb;--text-dim: #8b8fa3;--accent: #8774e1;--accent-hover: #7b6ad8;--success: #4caf50;--warning: #ff9800;--danger: #f44336;--radius: 16px;--radius-sm: 10px}body{font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;background:var(--bg);color:var(--text);min-height:100vh}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{cursor:pointer;border:none;border-radius:var(--radius-sm);font-family:inherit;font-size:14px;padding:10px 20px;transition:all .2s}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-hover)}.btn-secondary{background:var(--bg-hover);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover{background:var(--border)}.btn-danger{background:var(--danger);color:#fff}input,textarea{background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 14px;font-family:inherit;font-size:14px;outline:none;transition:border-color .2s}input:focus,textarea:focus{border-color:var(--accent)}.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:20px}.badge{display:inline-block;padding:2px 10px;border-radius:12px;font-size:12px;font-weight:500}.badge-success{background:#4caf5026;color:var(--success)}.badge-warning{background:#ff980026;color:var(--warning)}.badge-danger{background:#f4433626;color:var(--danger)}.badge-info{background:#5b8def26;color:var(--accent)}.tg-auth-page{--tg-bg: #212121;--tg-card: #1c1c1c;--tg-accent: #8774e1;--tg-accent-hover: #7b6ad8;--tg-text: #e1e3e6;--tg-text-secondary: #aaaaaa;--tg-text-link: #8774e1;--tg-border: #3a3a3a;--tg-input-bg: transparent;--tg-hover: rgba(255, 255, 255, .05);--tg-divider: #363636;min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#1a0a2e,#0d0d0d 40%,#0d0d0d);position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.tg-auth-page:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:url(/pattern.svg) repeat center / 420px;opacity:.15;filter:invert(1) brightness(2) sepia(1) hue-rotate(220deg) saturate(3);pointer-events:none}.tg-auth-page:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;background:radial-gradient(ellipse at center,transparent 0%,rgba(10,5,15,.4) 70%);pointer-events:none}.tg-auth-wrap{position:relative;z-index:2;width:100%;max-width:420px;padding:16px}.tg-auth-card{background:var(--tg-card);border-radius:16px;padding:40px 32px 28px;text-align:center}.tg-auth-card--phone{padding:48px 40px 28px}.tg-logo{width:120px;height:120px;margin:0 auto 24px;display:block}.tg-qr-area{width:280px;height:280px;margin:0 auto 28px;border-radius:12px;overflow:hidden;background:#2a2a2a;display:flex;align-items:center;justify-content:center;padding:16px}.tg-qr-img{width:100%;height:100%;object-fit:contain}.tg-qr-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:transparent}.tg-spinner{width:36px;height:36px;border:3px solid rgba(135,116,225,.2);border-top-color:var(--tg-accent);border-radius:50%;animation:tg-spin .8s linear infinite}@keyframes tg-spin{to{transform:rotate(360deg)}}.tg-title{font-size:24px;font-weight:700;color:var(--tg-text);margin-bottom:8px;line-height:1.3}.tg-desc{font-size:15px;color:var(--tg-text-secondary);line-height:1.5;margin-bottom:28px}.tg-hint{font-size:13px;color:var(--tg-text-secondary);margin-bottom:12px}.tg-error{color:#e53935;font-size:14px;margin-bottom:12px}.tg-steps{text-align:left;margin:0 0 28px;padding:0;counter-reset:tg-step;list-style:none}.tg-steps li{position:relative;padding-left:34px;margin-bottom:16px;font-size:15px;line-height:1.5;color:var(--tg-text)}.tg-steps li:before{counter-increment:tg-step;content:counter(tg-step);position:absolute;left:0;top:1px;color:var(--tg-accent);font-size:13px;font-weight:700;line-height:1;width:22px;height:22px;border:2px solid var(--tg-accent);border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;line-height:22px}.tg-steps li strong{font-weight:600}.tg-text-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;background:none;border:none;color:var(--tg-accent);font-size:14px;font-weight:500;padding:16px 0 8px;cursor:pointer;text-align:center;letter-spacing:.3px;text-transform:uppercase;border-radius:0}.tg-text-btn:hover{color:var(--tg-accent-hover)}.tg-text-btn:disabled{opacity:.6;cursor:default}.tg-btn-icon{width:18px;height:18px;flex-shrink:0}.tg-btn-arrow{width:14px;height:14px;flex-shrink:0;margin-left:-2px}.tg-auth-divider{height:1px;background:var(--tg-divider);margin:4px 0}.tg-input-wrap{position:relative;border:2px solid var(--tg-border);border-radius:12px;padding:0;margin-bottom:16px;cursor:text;transition:border-color .15s;background:transparent}.tg-input-wrap.focused{border-color:var(--tg-accent)}.tg-float-label{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:16px;color:var(--tg-text-secondary);pointer-events:none;transition:all .15s;background:var(--tg-card);padding:0;line-height:1}.tg-float-label.up{top:-1px;transform:translateY(-50%);font-size:12px;color:var(--tg-accent);padding:0 4px}.tg-country-wrap{position:relative;margin-bottom:0}button.tg-input-wrap,.tg-country-wrap .tg-input-wrap{cursor:pointer;-webkit-user-select:none;user-select:none;width:100%;text-align:left;font-family:inherit;font-size:inherit}.tg-country-value{display:flex;align-items:center;justify-content:space-between;padding:18px 14px 6px;font-size:16px;color:var(--tg-text);min-height:54px}.tg-chevron{width:20px;height:20px;color:var(--tg-text-secondary);transition:transform .2s;flex-shrink:0}.tg-chevron.open{transform:rotate(180deg)}.tg-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#2b2b2b;border-radius:12px;box-shadow:0 4px 24px #00000080;z-index:100;overflow:hidden;max-height:320px;display:flex;flex-direction:column}.tg-dropdown-search{width:100%;background:transparent;border:none;border-bottom:1px solid #393939;padding:12px 16px;font-size:14px;color:var(--tg-text);outline:none;border-radius:0}.tg-dropdown-list{overflow-y:auto;flex:1}.tg-dropdown-item{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer;transition:background .1s;font-size:14px;color:var(--tg-text)}.tg-dropdown-item:hover{background:#ffffff0f}.tg-dropdown-item.active{background:#8774e11f}.tg-dropdown-flag{font-size:20px;line-height:1}.tg-dropdown-name{flex:1}.tg-dropdown-code{color:var(--tg-text-secondary);font-size:13px}.tg-phone-row{display:flex;align-items:center;padding:18px 14px 6px;min-height:54px}.tg-phone-code{color:var(--tg-text);font-size:16px;margin-right:8px;white-space:nowrap;padding-top:1px}.tg-phone-input{flex:1;background:none;border:none;outline:none;color:var(--tg-text);font-size:16px;font-family:inherit;padding:0}.tg-phone-input::placeholder{color:var(--tg-text-secondary);opacity:.5}.tg-text-input{width:100%;background:none;border:none;outline:none;color:var(--tg-text);font-size:16px;font-family:inherit;padding:18px 14px 6px;min-height:54px}.tg-checkbox{display:flex;align-items:center;gap:12px;margin-bottom:24px;cursor:pointer;font-size:14px;color:var(--tg-text);-webkit-user-select:none;user-select:none}.tg-checkbox input{display:none}.tg-checkmark{width:22px;height:22px;border:2px solid var(--tg-border);border-radius:6px;flex-shrink:0;position:relative;transition:all .15s}.tg-checkbox input:checked+.tg-checkmark{background:var(--tg-accent);border-color:var(--tg-accent)}.tg-checkbox input:checked+.tg-checkmark:after{content:"";position:absolute;left:5px;top:2px;width:7px;height:12px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.tg-submit-btn{width:100%;padding:14px;border:none;border-radius:12px;background:var(--tg-accent);color:#fff;font-size:15px;font-weight:500;letter-spacing:.5px;cursor:pointer;transition:background .15s;margin-bottom:4px}.tg-submit-btn:hover:not(:disabled){background:var(--tg-accent-hover)}.tg-submit-btn:disabled{opacity:.5;cursor:default}.tg-lock-icon{width:100px;height:100px;margin:0 auto 20px;color:var(--tg-accent)}.tg-lock-icon svg{width:100%;height:100%}.tg-done-icon{width:80px;height:80px;margin:0 auto 20px}.tg-done-icon svg{width:100%;height:100%}@media (max-width: 480px){.tg-auth-card--phone{padding:32px 20px 24px}.tg-auth-wrap{padding:8px}}.tg-theme-toggle{position:fixed;top:16px;right:16px;width:40px;height:40px;border:none;border-radius:50%;background:#ffffff1a;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:200;transition:background .2s;padding:0}.tg-theme-toggle:hover{background:#ffffff2e}.tg-theme-toggle svg{width:22px;height:22px}.tg-curtain{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}.tg-curtain--light{background:linear-gradient(135deg,#dbddbb,#6ba587 40%,#d5d88d,#88b884)}.tg-curtain--dark{background:linear-gradient(180deg,#1a0a2e,#0d0d0d 40%,#0d0d0d)}.tg-curtain--circle{animation:tg-circle-expand 1.2s ease-in-out forwards}@keyframes tg-circle-expand{0%{clip-path:circle(0% at calc(100% - 36px) 36px);opacity:1}55%{clip-path:circle(150% at calc(100% - 36px) 36px);opacity:1}to{clip-path:circle(150% at calc(100% - 36px) 36px);opacity:0}}.tg-auth-page.tg-light{--tg-bg: #e8ecef;--tg-card: #ffffff;--tg-accent: #3390ec;--tg-accent-hover: #2b7fd4;--tg-text: #222222;--tg-text-secondary: #707579;--tg-text-link: #3390ec;--tg-border: #d9d9d9;--tg-divider: #e0e0e0;background:linear-gradient(135deg,#dbddbb,#6ba587 40%,#d5d88d,#88b884)}.tg-auth-page.tg-light:after{opacity:.45;filter:none}.tg-auth-page.tg-light:before{background:radial-gradient(ellipse at center,transparent 0%,rgba(100,160,120,.1) 70%)}.tg-auth-page.tg-light .tg-auth-card,.tg-auth-page.tg-light .tg-auth-card--phone{background:#fff;box-shadow:none}.tg-auth-page.tg-light .tg-qr-area{background:#f0f0f0}.tg-auth-page.tg-light .tg-input-wrap{border-color:#d9d9d9}.tg-auth-page.tg-light .tg-input-wrap.focused{border-color:var(--tg-accent)}.tg-auth-page.tg-light .tg-float-label{background:#fff}.tg-auth-page.tg-light .tg-float-label.up{color:var(--tg-accent)}.tg-auth-page.tg-light .tg-country-btn{color:var(--tg-text)}.tg-auth-page.tg-light .tg-country-arrow{color:var(--tg-text-secondary)}.tg-auth-page.tg-light .tg-dropdown{background:#fff;box-shadow:0 4px 24px #0000001f}.tg-auth-page.tg-light .tg-dropdown-search{border-bottom-color:#e0e0e0;color:var(--tg-text)}.tg-auth-page.tg-light .tg-dropdown-item{color:var(--tg-text)}.tg-auth-page.tg-light .tg-dropdown-item:hover{background:#0000000a}.tg-auth-page.tg-light .tg-dropdown-item.active{background:#3390ec14}.tg-auth-page.tg-light .tg-checkmark{border-color:#c4c4c4}.tg-auth-page.tg-light .tg-theme-toggle{background:#0000000f;color:#555}.tg-auth-page.tg-light .tg-theme-toggle:hover{background:#0000001a}.tg-auth-page.tg-light .tg-text-btn{color:var(--tg-accent)}.tg-auth-page.tg-light .tg-auth-divider{background:var(--tg-divider)}.tg-auth-page.tg-light .tg-steps li{color:var(--tg-text-secondary)}.dashboard{display:flex;min-height:100vh}.sidebar{width:260px;background:var(--bg-card);border-right:1px solid var(--border);padding:20px;display:flex;flex-direction:column}.sidebar h2{font-size:18px;margin-bottom:24px}.sidebar-nav{display:flex;flex-direction:column;gap:4px}.sidebar-link{padding:10px 14px;border-radius:var(--radius-sm);color:var(--text-dim);font-weight:500;display:block}.sidebar-link:hover,.sidebar-link.active{background:var(--bg-hover);color:var(--text);text-decoration:none}.main-content{flex:1;padding:24px;overflow-y:auto}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.page-header h1{font-size:24px}.users-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.user-card{cursor:pointer;transition:transform .15s}.user-card:hover{transform:translateY(-2px)}.user-card-header{display:flex;align-items:center;gap:12px;margin-bottom:12px}.user-avatar{width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:18px;color:#fff}.user-card-stats{display:flex;gap:16px;color:var(--text-dim);font-size:13px}.contacts-list{display:flex;flex-direction:column;gap:4px}.contact-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:var(--radius-sm);cursor:pointer;transition:background .15s}.contact-row:hover{background:var(--bg-hover)}.contact-name{font-weight:500}.contact-preview{color:var(--text-dim);font-size:13px}.messages-view{display:flex;flex-direction:column;gap:8px;max-height:600px;overflow-y:auto;padding:16px}.message-bubble{max-width:70%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.5}.message-outgoing{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:4px}.message-incoming{align-self:flex-start;background:var(--bg-hover);border-bottom-left-radius:4px}.message-time{font-size:11px;opacity:.7;margin-top:4px}.message-sender{font-size:12px;font-weight:600;color:var(--accent);margin-bottom:4px}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center}.login-form{width:100%;max-width:360px;display:flex;flex-direction:column;gap:16px;text-align:center}.login-form h1{font-size:24px;margin-bottom:8px}.login-form input{width:100%}.error-text{color:var(--danger);font-size:14px}@media (max-width: 768px){.dashboard{flex-direction:column}.sidebar{width:100%;border-right:none;border-bottom:1px solid var(--border)}.sidebar-nav{flex-direction:row;overflow-x:auto}.users-grid{grid-template-columns:1fr}}
