*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;background:#0f1117;color:#e8eaf6;line-height:1.6;min-height:100vh}.app-header{background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:1.25rem 2rem}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;flex-wrap:wrap}.header-inner h1{font-size:1.5rem;font-weight:700;color:#fff;letter-spacing:-.02em}.header-subtitle{font-size:.875rem;color:#ffffffb8;margin-top:.2rem}.ghl-settings-wrapper{position:relative;flex-shrink:0}.ghl-settings-toggle{display:flex;align-items:center;gap:.5rem;padding:.45rem 1rem;background:#ffffff1f;border:1px solid rgba(255,255,255,.25);border-radius:8px;color:#fff;font-size:.82rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s;white-space:nowrap}.ghl-settings-toggle:hover,.ghl-settings-toggle.active{background:#ffffff38}.ghl-logo{background:#f97316;color:#fff;font-size:.65rem;font-weight:800;padding:.1rem .35rem;border-radius:4px;letter-spacing:.03em}.ghl-settings-panel{position:absolute;right:0;top:calc(100% + .75rem);width:420px;background:#1a1d27;border:1px solid #2d3047;border-radius:12px;padding:1.25rem;z-index:100;box-shadow:0 8px 40px #00000080}.ghl-settings-title{font-size:.95rem;font-weight:700;color:#e8eaf6;margin-bottom:.4rem}.ghl-settings-desc{font-size:.78rem;color:#9094b0;margin-bottom:1rem;line-height:1.5}.ghl-settings-desc code{background:#222535;padding:.1rem .35rem;border-radius:4px;font-size:.75rem;color:#818cf8}.ghl-field-group{display:flex;flex-direction:column;gap:.6rem;margin-bottom:.85rem}.ghl-field{display:flex;flex-direction:column;gap:.3rem;margin-bottom:.6rem}.ghl-field label{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}.ghl-input{padding:.45rem .7rem;background:#222535;border:1px solid #2d3047;border-radius:6px;color:#e8eaf6;font-size:.82rem;font-family:inherit;outline:none;width:100%;transition:border-color .15s}.ghl-input:focus{border-color:#f97316}.ghl-accounts-section{margin-top:1rem;padding-top:1rem;border-top:1px solid #2d3047}.ghl-accounts-found{font-size:.78rem;color:#34d399;margin-bottom:.75rem}.ghl-fetch-error{font-size:.78rem;color:#f87171;margin-top:.6rem;line-height:1.5}.ghl-save-ok{font-size:.78rem;color:#34d399;margin-top:.6rem}.ghl-save-result{margin-top:.6rem}.ghl-help{margin-top:1rem;padding-top:.85rem;border-top:1px solid #2d3047;font-size:.75rem;color:#555a7a;line-height:1.6}.ghl-help strong{color:#9094b0;display:block;margin-bottom:.35rem}.ghl-help ul{list-style:disc;padding-left:1.1rem}.controls-bar{display:flex;align-items:center;gap:1.5rem;padding:.9rem 2rem;background:#1a1d27;border-bottom:1px solid #2d3047;flex-wrap:wrap;position:sticky;top:0;z-index:10}.control-group{display:flex;align-items:center;gap:.6rem}.control-label{font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;white-space:nowrap}.toggle-group{display:flex;gap:.3rem}.toggle-btn{padding:.38rem .8rem;border-radius:6px;border:1px solid #2d3047;background:#222535;color:#9094b0;font-size:.82rem;font-family:inherit;cursor:pointer;transition:all .15s ease;white-space:nowrap}.toggle-btn:hover:not(:disabled){border-color:#6366f1;color:#c7d2fe}.toggle-btn.active{background:#6366f1;border-color:#6366f1;color:#fff;font-weight:600}.toggle-btn:disabled{opacity:.45;cursor:not-allowed}.tone-select{padding:.38rem .75rem;background:#222535;border:1px solid #2d3047;border-radius:6px;color:#e8eaf6;font-size:.82rem;font-family:inherit;cursor:pointer;outline:none;transition:border-color .15s}.clinic-select{min-width:220px}.tone-select:hover:not(:disabled),.tone-select:focus{border-color:#6366f1}.tone-select:disabled{opacity:.45;cursor:not-allowed}.run-btn{padding:.55rem 1.5rem;background:#6366f1;color:#fff;border:none;border-radius:8px;font-size:.9rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .2s ease,transform .1s ease;white-space:nowrap}.run-btn:hover:not(:disabled){background:#818cf8}.run-btn:active:not(:disabled){transform:scale(.98)}.run-btn:disabled{opacity:.5;cursor:not-allowed}.mode-tabs{display:flex;align-items:center;gap:0;padding:0 2rem;background:#111320;border-bottom:1px solid #2d3047;flex-wrap:wrap}.mode-tab{padding:.7rem 1.4rem;background:none;border:none;border-bottom:3px solid transparent;color:#6b7280;font-size:.88rem;font-weight:600;font-family:inherit;cursor:pointer;transition:all .15s;white-space:nowrap;margin-bottom:-1px}.mode-tab:hover:not(:disabled){color:#c7d2fe}.mode-tab-active{color:#a5b4fc;border-bottom-color:#6366f1}.mode-tab:disabled{opacity:.4;cursor:not-allowed}.mode-tab-desc{margin-left:1rem;font-size:.78rem;color:#4b5280;font-style:italic;padding:.7rem 0}.run-group{margin-left:auto;display:flex;align-items:center;gap:.6rem}.mode-badge{font-size:.72rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:.25rem .6rem;border-radius:20px;white-space:nowrap}.mode-research{background:#6366f126;color:#818cf8;border:1px solid rgba(99,102,241,.3)}.mode-topic{background:#f9731626;color:#fb923c;border:1px solid rgba(249,115,22,.3)}.custom-topic-bar{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 2rem;background:#141620;border-bottom:1px solid #2d3047}.topic-label{padding-top:.5rem;white-space:nowrap}.topic-textarea{flex:1;padding:.5rem .75rem;background:#222535;border:1px solid #2d3047;border-radius:8px;color:#e8eaf6;font-size:.85rem;font-family:inherit;resize:vertical;line-height:1.5;outline:none;transition:border-color .15s;min-height:52px}.topic-textarea::placeholder{color:#4b5280}.topic-textarea:focus{border-color:#f97316}.topic-textarea:disabled{opacity:.45;cursor:not-allowed}.clear-topic-btn{margin-top:.35rem;background:none;border:1px solid #3d3f55;color:#9094b0;border-radius:6px;padding:.3rem .55rem;font-size:.8rem;cursor:pointer;transition:all .15s;flex-shrink:0}.clear-topic-btn:hover{border-color:#f97316;color:#f97316}.app-main{padding:1.5rem 2rem 4rem;max-width:1440px;margin:0 auto}.error-banner{display:flex;align-items:center;gap:.6rem;padding:.85rem 1.1rem;background:#f871711a;border:1px solid rgba(248,113,113,.3);border-radius:8px;color:#f87171;font-size:.875rem;margin:1.25rem 0}.error-dismiss{margin-left:auto;background:none;border:none;color:#f87171;cursor:pointer;font-size:.9rem;line-height:1;padding:.1rem .3rem;border-radius:4px;transition:background .15s}.error-dismiss:hover{background:#f8717126}.loading-banner{display:flex;align-items:center;gap:.9rem;padding:.85rem 1.1rem;background:#6366f114;border:1px solid rgba(99,102,241,.25);border-radius:8px;color:#818cf8;font-size:.875rem;margin:1.25rem 0}.spinner{width:18px;height:18px;border:2px solid rgba(129,140,248,.25);border-top-color:#818cf8;border-radius:50%;animation:spin .75s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.panels-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.5rem}.panel{background:#1a1d27;border:1px solid #2d3047;border-radius:12px;overflow:hidden;display:flex;flex-direction:column}.panel-header{display:flex;justify-content:space-between;align-items:center;padding:.9rem 1.1rem;border-bottom:1px solid #2d3047;gap:.75rem;flex-wrap:wrap}.panel-title{font-size:.95rem;font-weight:600;color:#e8eaf6}.timestamp{font-size:.72rem;color:#555a7a;white-space:nowrap}.research-panel{border-top:3px solid #6366f1}.section-heading{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#555a7a;padding:.85rem 1.1rem .25rem}.themes-list,.sources-list{list-style:none;padding:.5rem 1.1rem 1rem;display:flex;flex-direction:column;gap:.85rem}.theme-item{padding-bottom:.85rem;border-bottom:1px solid #222535}.theme-item:last-child{border-bottom:none;padding-bottom:0}.theme-title{font-size:.84rem;font-weight:600;color:#c7d2fe}.theme-summary{font-size:.8rem;color:#9094b0;margin-top:.2rem;line-height:1.55}.source-item{display:flex;flex-direction:column;gap:.2rem}.source-link{font-size:.82rem;font-weight:500;color:#818cf8;text-decoration:none;line-height:1.4}.source-link:hover{text-decoration:underline;color:#a5b4fc}.source-snippet{font-size:.77rem;color:#555a7a;line-height:1.45}.post-panel.accent-facebook{border-top:3px solid #1877f2}.post-panel.accent-linkedin{border-top:3px solid #0a66c2}.platform-label{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}.image-clinic-badge{position:absolute;bottom:12px;left:12px;background:#1908379e;color:#ede9fe;font-size:.78rem;font-weight:700;padding:.3rem .75rem;border-radius:20px;letter-spacing:.04em;backdrop-filter:blur(12px) saturate(180%);-webkit-backdrop-filter:blur(12px) saturate(180%);border:1px solid rgba(167,139,250,.35);box-shadow:0 2px 12px #1e0a3c66;pointer-events:none;z-index:2}.clinic-badge{display:inline-block;background:#6366f12e;color:#a5b4fc;border:1px solid rgba(99,102,241,.35);border-radius:20px;font-size:.7rem;font-weight:600;padding:.18rem .6rem;letter-spacing:.02em;white-space:nowrap}.platform-icon{width:26px;height:26px;display:flex;align-items:center;justify-content:center;border-radius:6px;font-size:.68rem;font-weight:800;color:#fff;flex-shrink:0;letter-spacing:-.03em}.accent-facebook .platform-icon{background:#1877f2}.accent-linkedin .platform-icon{background:#0a66c2}.post-actions{display:flex;gap:.45rem}.action-btn{padding:.32rem .8rem;border-radius:6px;font-size:.78rem;font-weight:500;font-family:inherit;cursor:pointer;transition:all .15s ease;white-space:nowrap}.copy-btn{background:#222535;border:1px solid #2d3047;color:#9094b0}.copy-btn:hover:not(:disabled){border-color:#6366f1;color:#c7d2fe}.copy-btn.copied{border-color:#34d399;color:#34d399}.regen-btn{background:#6366f1;border:1px solid #6366f1;color:#fff}.regen-btn:hover:not(:disabled){background:#818cf8;border-color:#818cf8}.action-btn:disabled{opacity:.4;cursor:not-allowed}.post-textarea{width:100%;flex:1;padding:1rem 1.1rem;background:transparent;border:none;color:#e8eaf6;font-family:inherit;font-size:.86rem;line-height:1.75;resize:vertical;outline:none;min-height:220px}.post-textarea::placeholder{color:#3a3e58}.word-count{font-size:.72rem;color:#3a3e58}.post-footer{display:flex;align-items:center;justify-content:space-between;padding:.35rem 1.1rem .75rem;gap:.75rem;flex-wrap:wrap}.ghl-action{display:flex;align-items:center;gap:.6rem}.ghl-btn{background:#f97316;border:1px solid #f97316;color:#fff;padding:.32rem .85rem;border-radius:6px;font-size:.78rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s;white-space:nowrap}.ghl-btn:hover:not(:disabled){background:#fb923c;border-color:#fb923c}.ghl-btn:disabled{opacity:.45;cursor:not-allowed}.ghl-btn-sent{background:#16a34a!important;border-color:#16a34a!important;opacity:1!important;cursor:default!important}.ghl-status{font-size:.75rem;font-weight:500}.ghl-success{color:#34d399}.ghl-error{color:#f87171;cursor:help}.ghl-unconfigured{font-size:.72rem;color:#3a3e58;font-style:italic}.image-section{border-bottom:1px solid #2d3047}.image-wrapper{position:relative;width:100%;aspect-ratio:1.91 / 1;background:#111320;overflow:hidden}.image-placeholder{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;color:#555a7a;font-size:.82rem}.image-error{gap:.9rem;color:#f87171}.generated-image{width:100%;height:100%;object-fit:cover;display:block}.image-actions{display:flex;align-items:center;gap:.5rem;padding:.6rem 1.1rem;border-top:1px solid #2d3047;background:#15182a}.image-prompt-input{flex:1;padding:.35rem .65rem;background:#222535;border:1px solid #2d3047;border-radius:6px;color:#e8eaf6;font-size:.8rem;font-family:inherit;outline:none;transition:border-color .15s;min-width:0}.image-prompt-input::placeholder{color:#4b5280}.image-prompt-input:focus{border-color:#6366f1}.image-style-toggle{display:flex;gap:.4rem;padding:.4rem .75rem 0;background:#15182a}.style-btn{padding:.25rem .75rem;border-radius:20px;border:1px solid #2d3047;background:#1a1d2e;color:#7b83b4;font-size:.78rem;cursor:pointer;transition:all .15s ease;font-family:inherit}.style-btn:hover{border-color:#6366f1;color:#a5b4fc}.style-btn-active{background:#2d2f5e;border-color:#6366f1;color:#a5b4fc;font-weight:600}.history-section{margin-top:2.5rem}.history-heading-row{display:flex;align-items:center;justify-content:space-between;padding-bottom:.75rem}.history-heading-row .section-heading{padding:0;margin:0;font-size:.72rem}.clear-history-btn{background:transparent;border:1px solid rgba(255,255,255,.15);color:#ffffff73;font-size:.7rem;padding:.25rem .65rem;border-radius:4px;cursor:pointer;transition:all .2s}.clear-history-btn:hover{border-color:#ff505080;color:#ff6464cc}.history-section .section-heading{padding:0 0 .75rem;font-size:.72rem}.history-grid{display:flex;gap:.9rem;overflow-x:auto;padding-bottom:.5rem;scrollbar-width:thin;scrollbar-color:#2d3047 transparent}.history-card{min-width:210px;max-width:210px;background:#1a1d27;border:1px solid #2d3047;border-radius:10px;padding:.9rem;cursor:pointer;transition:border-color .15s ease,background .15s ease;flex-shrink:0}.history-card:hover{border-color:#6366f1;background:#1e2130}.history-card-header{display:flex;gap:.35rem;margin-bottom:.6rem;flex-wrap:wrap}.history-badge{padding:.18rem .55rem;border-radius:4px;font-size:.7rem;font-weight:600;background:#222535;color:#6b7280}.tone-badge{color:#818cf8}.ghl-sent-badge{background:#dc262626;color:#fca5a5;border:1px solid rgba(220,38,38,.35)}.service-badge{background:#f9731626;color:#fb923c;border:1px solid rgba(249,115,22,.3)}.custom-badge{background:#8b5cf626;color:#a78bfa;border:1px solid rgba(139,92,246,.3)}.history-theme-title{font-size:.77rem;color:#6b7280;margin-bottom:.22rem;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-custom-topic{color:#fb923c;font-style:italic}.history-timestamp{font-size:.7rem;color:#3a3e58;margin-top:.6rem}@media (max-width: 1024px){.panels-grid{grid-template-columns:1fr 1fr}.research-panel{grid-column:1 / -1}}@media (max-width: 640px){.panels-grid{grid-template-columns:1fr}.research-panel{grid-column:auto}.controls-bar{flex-direction:column;align-items:flex-start;gap:.9rem}.run-btn{margin-left:0;width:100%;text-align:center}.app-main{padding:1rem 1rem 3rem}.app-header{padding:1rem}}
