/* Font Preview Styles - Each font name displays in its own font */
#fontFamilySelect option[value='Arial'],
#fontFamily option[value='Arial'] {
    font-family: 'Arial', sans-serif;
}

#fontFamilySelect option[value='Helvetica'],
#fontFamily option[value='Helvetica'] {
    font-family: 'Helvetica', sans-serif;
}

#fontFamilySelect option[value='Times New Roman'],
#fontFamily option[value='Times New Roman'] {
    font-family: 'Times New Roman', serif;
}

#fontFamilySelect option[value='Courier New'],
#fontFamily option[value='Courier New'] {
    font-family: 'Courier New', monospace;
}

#fontFamilySelect option[value='Verdana'],
#fontFamily option[value='Verdana'] {
    font-family: 'Verdana', sans-serif;
}

#fontFamilySelect option[value='Georgia'],
#fontFamily option[value='Georgia'] {
    font-family: 'Georgia', serif;
}

#fontFamilySelect option[value='Palatino'],
#fontFamily option[value='Palatino'] {
    font-family: 'Palatino', serif;
}

#fontFamilySelect option[value='Garamond'],
#fontFamily option[value='Garamond'] {
    font-family: 'Garamond', serif;
}

#fontFamilySelect option[value='Comic Sans MS'],
#fontFamily option[value='Comic Sans MS'] {
    font-family: 'Comic Sans MS', sans-serif;
}

#fontFamilySelect option[value='Impact'],
#fontFamily option[value='Impact'] {
    font-family: 'Impact', sans-serif;
}

#fontFamilySelect option[value='Trebuchet MS'],
#fontFamily option[value='Trebuchet MS'] {
    font-family: 'Trebuchet MS', sans-serif;
}

#fontFamilySelect option[value='Inter'],
#fontFamily option[value='Inter'] {
    font-family: 'Inter', sans-serif;
}

#fontFamilySelect option[value='Roboto'],
#fontFamily option[value='Roboto'] {
    font-family: 'Roboto', sans-serif;
}

#fontFamilySelect option[value='Open Sans'],
#fontFamily option[value='Open Sans'] {
    font-family: 'Open Sans', sans-serif;
}

#fontFamilySelect option[value='Lato'],
#fontFamily option[value='Lato'] {
    font-family: 'Lato', sans-serif;
}

#fontFamilySelect option[value='Montserrat'],
#fontFamily option[value='Montserrat'] {
    font-family: 'Montserrat', sans-serif;
}

#fontFamilySelect option[value='Poppins'],
#fontFamily option[value='Poppins'] {
    font-family: 'Poppins', sans-serif;
}

#fontFamilySelect option[value='Afrah'],
#fontFamily option[value='Afrah'] {
    font-family: 'Afrah', sans-serif;
}

#fontFamilySelect option[value='Agrandir'],
#fontFamily option[value='Agrandir'] {
    font-family: 'Agrandir', sans-serif;
}

#fontFamilySelect option[value='Aileron'],
#fontFamily option[value='Aileron'] {
    font-family: 'Aileron', sans-serif;
}

#fontFamilySelect option[value='AlexBrush'],
#fontFamily option[value='AlexBrush'] {
    font-family: 'AlexBrush', sans-serif;
}

#fontFamilySelect option[value='AlfaSlabOne'],
#fontFamily option[value='AlfaSlabOne'] {
    font-family: 'AlfaSlabOne', sans-serif;
}

#fontFamilySelect option[value='Amsterdam'],
#fontFamily option[value='Amsterdam'] {
    font-family: 'Amsterdam', sans-serif;
}

#fontFamilySelect option[value='Anton'],
#fontFamily option[value='Anton'] {
    font-family: 'Anton', sans-serif;
}

#fontFamilySelect option[value='Antonio'],
#fontFamily option[value='Antonio'] {
    font-family: 'Antonio', sans-serif;
}

#fontFamilySelect option[value='Arapey'],
#fontFamily option[value='Arapey'] {
    font-family: 'Arapey', serif;
}

#fontFamilySelect option[value='ArchivoBlack'],
#fontFamily option[value='ArchivoBlack'] {
    font-family: 'ArchivoBlack', sans-serif;
}

#fontFamilySelect option[value='ArialUnicodeMS'],
#fontFamily option[value='ArialUnicodeMS'] {
    font-family: 'ArialUnicodeMS', sans-serif;
}

#fontFamilySelect option[value='Arimo'],
#fontFamily option[value='Arimo'] {
    font-family: 'Arimo', sans-serif;
}

#fontFamilySelect option[value='BakerieSmooth'],
#fontFamily option[value='BakerieSmooth'] {
    font-family: 'BakerieSmooth', sans-serif;
}

#fontFamilySelect option[value='Barlow'],
#fontFamily option[value='Barlow'] {
    font-family: 'Barlow', sans-serif;
}

#fontFamilySelect option[value='BebasNeue'],
#fontFamily option[value='BebasNeue'] {
    font-family: 'BebasNeue', sans-serif;
}

#fontFamilySelect option[value='BebasNeueCyrillic'],
#fontFamily option[value='BebasNeueCyrillic'] {
    font-family: 'BebasNeueCyrillic', sans-serif;
}

#fontFamilySelect option[value='BERNIER'],
#fontFamily option[value='BERNIER'] {
    font-family: 'BERNIER', sans-serif;
}

#fontFamilySelect option[value='BeVietnam'],
#fontFamily option[value='BeVietnam'] {
    font-family: 'BeVietnam', sans-serif;
}

#fontFamilySelect option[value='BigShouldersDisplay'],
#fontFamily option[value='BigShouldersDisplay'] {
    font-family: 'BigShouldersDisplay', sans-serif;
}

#fontFamilySelect option[value='Blueberry'],
#fontFamily option[value='Blueberry'] {
    font-family: 'Blueberry', sans-serif;
}

#fontFamilySelect option[value='BricolageGrotesque'],
#fontFamily option[value='BricolageGrotesque'] {
    font-family: 'BricolageGrotesque', sans-serif;
}

#fontFamilySelect option[value='Bristol'],
#fontFamily option[value='Bristol'] {
    font-family: 'Bristol', sans-serif;
}

#fontFamilySelect option[value='BrittanySignature'],
#fontFamily option[value='BrittanySignature'] {
    font-family: 'BrittanySignature', sans-serif;
}

#fontFamilySelect option[value='CAGenerated'],
#fontFamily option[value='CAGenerated'] {
    font-family: 'CAGenerated', sans-serif;
}

#fontFamilySelect option[value='CanvaSans'],
#fontFamily option[value='CanvaSans'] {
    font-family: 'CanvaSans', sans-serif;
}

#fontFamilySelect option[value='CaveatBrush'],
#fontFamily option[value='CaveatBrush'] {
    font-family: 'CaveatBrush', sans-serif;
}

#fontFamilySelect option[value='CerebriSans'],
#fontFamily option[value='CerebriSans'] {
    font-family: 'CerebriSans', sans-serif;
}

#fontFamilySelect option[value='Cheddar'],
#fontFamily option[value='Cheddar'] {
    font-family: 'Cheddar', sans-serif;
}

#fontFamilySelect option[value='CHILDRENONE'],
#fontFamily option[value='CHILDRENONE'] {
    font-family: 'CHILDRENONE', sans-serif;
}

#fontFamilySelect option[value='ChunkFive'],
#fontFamily option[value='ChunkFive'] {
    font-family: 'ChunkFive', sans-serif;
}

#fontFamilySelect option[value='DejaVuSans'],
#fontFamily option[value='DejaVuSans'] {
    font-family: 'DejaVuSans', sans-serif;
}

#fontFamilySelect option[value='DejaVuSerif'],
#fontFamily option[value='DejaVuSerif'] {
    font-family: 'DejaVuSerif', serif;
}

#fontFamilySelect option[value='DMSans'],
#fontFamily option[value='DMSans'] {
    font-family: 'DMSans', sans-serif;
}

#fontFamilySelect option[value='DrunkenHour'],
#fontFamily option[value='DrunkenHour'] {
    font-family: 'DrunkenHour', sans-serif;
}

#fontFamilySelect option[value='Eczar'],
#fontFamily option[value='Eczar'] {
    font-family: 'Eczar', serif;
}

#fontFamilySelect option[value='EmilysCandy'],
#fontFamily option[value='EmilysCandy'] {
    font-family: 'EmilysCandy', sans-serif;
}

#fontFamilySelect option[value='Extenda'],
#fontFamily option[value='Extenda'] {
    font-family: 'Extenda', sans-serif;
}

#fontFamilySelect option[value='FeelingPassionate'],
#fontFamily option[value='FeelingPassionate'] {
    font-family: 'FeelingPassionate', sans-serif;
}

#fontFamilySelect option[value='FormulaCondensed'],
#fontFamily option[value='FormulaCondensed'] {
    font-family: 'FormulaCondensed', sans-serif;
}

#fontFamilySelect option[value='FredokaOne'],
#fontFamily option[value='FredokaOne'] {
    font-family: 'FredokaOne', sans-serif;
}

#fontFamilySelect option[value='FrutigerLTPro'],
#fontFamily option[value='FrutigerLTPro'] {
    font-family: 'FrutigerLTPro', sans-serif;
}

#fontFamilySelect option[value='Funtastic'],
#fontFamily option[value='Funtastic'] {
    font-family: 'Funtastic', sans-serif;
}

#fontFamilySelect option[value='Gaegu'],
#fontFamily option[value='Gaegu'] {
    font-family: 'Gaegu', sans-serif;
}

#fontFamilySelect option[value='Garet'],
#fontFamily option[value='Garet'] {
    font-family: 'Garet', sans-serif;
}

#fontFamilySelect option[value='Gilam'],
#fontFamily option[value='Gilam'] {
    font-family: 'Gilam', sans-serif;
}

#fontFamilySelect option[value='Gistesy'],
#fontFamily option[value='Gistesy'] {
    font-family: 'Gistesy', sans-serif;
}

#fontFamilySelect option[value='GlacialIndifference'],
#fontFamily option[value='GlacialIndifference'] {
    font-family: 'GlacialIndifference', sans-serif;
}

#fontFamilySelect option[value='Gordita'],
#fontFamily option[value='Gordita'] {
    font-family: 'Gordita', sans-serif;
}

#fontFamilySelect option[value='Halimun'],
#fontFamily option[value='Halimun'] {
    font-family: 'Halimun', sans-serif;
}

#fontFamilySelect option[value='HandyCasualCondensed'],
#fontFamily option[value='HandyCasualCondensed'] {
    font-family: 'HandyCasualCondensed', sans-serif;
}

#fontFamilySelect option[value='Helios'],
#fontFamily option[value='Helios'] {
    font-family: 'Helios', sans-serif;
}

#fontFamilySelect option[value='HeliosExt'],
#fontFamily option[value='HeliosExt'] {
    font-family: 'HeliosExt', sans-serif;
}

#fontFamilySelect option[value='HelveticaNowText'],
#fontFamily option[value='HelveticaNowText'] {
    font-family: 'HelveticaNowText', sans-serif;
}

#fontFamilySelect option[value='HelveticaWorld'],
#fontFamily option[value='HelveticaWorld'] {
    font-family: 'HelveticaWorld', sans-serif;
}

#fontFamilySelect option[value='Horizon'],
#fontFamily option[value='Horizon'] {
    font-family: 'Horizon', sans-serif;
}

#fontFamilySelect option[value='ITCAvantGardePro'],
#fontFamily option[value='ITCAvantGardePro'] {
    font-family: 'ITCAvantGardePro', sans-serif;
}

#fontFamilySelect option[value='JustAnotherHand'],
#fontFamily option[value='JustAnotherHand'] {
    font-family: 'JustAnotherHand', sans-serif;
}

#fontFamilySelect option[value='KaushanScript'],
#fontFamily option[value='KaushanScript'] {
    font-family: 'KaushanScript', sans-serif;
}

#fontFamilySelect option[value='KawitFreeItalic'],
#fontFamily option[value='KawitFreeItalic'] {
    font-family: 'KawitFreeItalic', sans-serif;
}

#fontFamilySelect option[value='Knockout'],
#fontFamily option[value='Knockout'] {
    font-family: 'Knockout', sans-serif;
}

#fontFamilySelect option[value='Lazydog'],
#fontFamily option[value='Lazydog'] {
    font-family: 'Lazydog', sans-serif;
}

#fontFamilySelect option[value='LeagueGothic'],
#fontFamily option[value='LeagueGothic'] {
    font-family: 'LeagueGothic', sans-serif;
}

#fontFamilySelect option[value='LeagueSpartan'],
#fontFamily option[value='LeagueSpartan'] {
    font-family: 'LeagueSpartan', sans-serif;
}

#fontFamilySelect option[value='LiberationSans'],
#fontFamily option[value='LiberationSans'] {
    font-family: 'LiberationSans', sans-serif;
}

#fontFamilySelect option[value='LilitaOne'],
#fontFamily option[value='LilitaOne'] {
    font-family: 'LilitaOne', sans-serif;
}

#fontFamilySelect option[value='LLKARATULA'],
#fontFamily option[value='LLKARATULA'] {
    font-family: 'LLKARATULA', sans-serif;
}

#fontFamilySelect option[value='Lora'],
#fontFamily option[value='Lora'] {
    font-family: 'Lora', serif;
}

#fontFamilySelect option[value='Lovelo'],
#fontFamily option[value='Lovelo'] {
    font-family: 'Lovelo', sans-serif;
}

#fontFamilySelect option[value='Mali'],
#fontFamily option[value='Mali'] {
    font-family: 'Mali', sans-serif;
}

#fontFamilySelect option[value='Mistrully'],
#fontFamily option[value='Mistrully'] {
    font-family: 'Mistrully', sans-serif;
}

#fontFamilySelect option[value='Mommi'],
#fontFamily option[value='Mommi'] {
    font-family: 'Mommi', sans-serif;
}

#fontFamilySelect option[value='MoonTime'],
#fontFamily option[value='MoonTime'] {
    font-family: 'MoonTime', sans-serif;
}

#fontFamilySelect option[value='Mozer'],
#fontFamily option[value='Mozer'] {
    font-family: 'Mozer', sans-serif;
}

#fontFamilySelect option[value='Norwester'],
#fontFamily option[value='Norwester'] {
    font-family: 'Norwester', sans-serif;
}

#fontFamilySelect option[value='OpenSauceOne'],
#fontFamily option[value='OpenSauceOne'] {
    font-family: 'OpenSauceOne', sans-serif;
}

#fontFamilySelect option[value='Oswald'],
#fontFamily option[value='Oswald'] {
    font-family: 'Oswald', sans-serif;
}

#fontFamilySelect option[value='PaalalabasDisplayCondensBETA'],
#fontFamily option[value='PaalalabasDisplayCondensBETA'] {
    font-family: 'PaalalabasDisplayCondensBETA', sans-serif;
}

#fontFamilySelect option[value='Pacifico'],
#fontFamily option[value='Pacifico'] {
    font-family: 'Pacifico', sans-serif;
}

#fontFamilySelect option[value='Pattaya'],
#fontFamily option[value='Pattaya'] {
    font-family: 'Pattaya', sans-serif;
}

#fontFamilySelect option[value='Petapon'],
#fontFamily option[value='Petapon'] {
    font-family: 'Petapon', sans-serif;
}

#fontFamilySelect option[value='PlacardNext'],
#fontFamily option[value='PlacardNext'] {
    font-family: 'PlacardNext', sans-serif;
}

#fontFamilySelect option[value='Playlist'],
#fontFamily option[value='Playlist'] {
    font-family: 'Playlist', sans-serif;
}

#fontFamilySelect option[value='Questrial'],
#fontFamily option[value='Questrial'] {
    font-family: 'Questrial', sans-serif;
}

#fontFamilySelect option[value='RadnikaNext'],
#fontFamily option[value='RadnikaNext'] {
    font-family: 'RadnikaNext', sans-serif;
}

#fontFamilySelect option[value='RedHatDisplay'],
#fontFamily option[value='RedHatDisplay'] {
    font-family: 'RedHatDisplay', sans-serif;
}

#fontFamilySelect option[value='RegularBrush'],
#fontFamily option[value='RegularBrush'] {
    font-family: 'RegularBrush', sans-serif;
}

#fontFamilySelect option[value='Ribeye'],
#fontFamily option[value='Ribeye'] {
    font-family: 'Ribeye', sans-serif;
}

#fontFamilySelect option[value='RobotoCondensed'],
#fontFamily option[value='RobotoCondensed'] {
    font-family: 'RobotoCondensed', sans-serif;
}

#fontFamilySelect option[value='Sanchez'],
#fontFamily option[value='Sanchez'] {
    font-family: 'Sanchez', serif;
}

#fontFamilySelect option[value='Scripter'],
#fontFamily option[value='Scripter'] {
    font-family: 'Scripter', sans-serif;
}

#fontFamilySelect option[value='SigmarOne'],
#fontFamily option[value='SigmarOne'] {
    font-family: 'SigmarOne', sans-serif;
}

#fontFamilySelect option[value='SomeTimeLater'],
#fontFamily option[value='SomeTimeLater'] {
    font-family: 'SomeTimeLater', sans-serif;
}

#fontFamilySelect option[value='SueEllenFrancisco'],
#fontFamily option[value='SueEllenFrancisco'] {
    font-family: 'SueEllenFrancisco', sans-serif;
}

#fontFamilySelect option[value='Sunborn'],
#fontFamily option[value='Sunborn'] {
    font-family: 'Sunborn', sans-serif;
}

#fontFamilySelect option[value='Telegraf'],
#fontFamily option[value='Telegraf'] {
    font-family: 'Telegraf', sans-serif;
}

#fontFamilySelect option[value='TeXGyreTermes'],
#fontFamily option[value='TeXGyreTermes'] {
    font-family: 'TeXGyreTermes', serif;
}

#fontFamilySelect option[value='Touvlo'],
#fontFamily option[value='Touvlo'] {
    font-family: 'Touvlo', sans-serif;
}

#fontFamilySelect option[value='TTNormsPro'],
#fontFamily option[value='TTNormsPro'] {
    font-family: 'TTNormsPro', sans-serif;
}

#fontFamilySelect option[value='Ubuntu'],
#fontFamily option[value='Ubuntu'] {
    font-family: 'Ubuntu', sans-serif;
}

#fontFamilySelect option[value='Virtual'],
#fontFamily option[value='Virtual'] {
    font-family: 'Virtual', sans-serif;
}

#fontFamilySelect option[value='YesevaOne'],
#fontFamily option[value='YesevaOne'] {
    font-family: 'YesevaOne', sans-serif;
}

/* Brand — Qhora */
:root {
    --brand-primary: #2596be;
    --brand-primary-hover: #1e7a9a;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

/* Studio Container */
.studio-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo i {
    font-size: 1.5rem;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.design-title {
    color: #cccccc;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: text;
    outline: none;
    min-width: 150px;
    text-align: center;
}

.design-title:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.design-title:focus {
    background-color: #404040;
    color: #ffffff;
    border: 1px solid var(--brand-primary);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.header-share {
    position: relative;
    display: inline-flex;
}

.header-share-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1000;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 0.35rem;
    min-width: 190px;
}

.header-share-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #e6e6e6;
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.header-share-item:hover {
    background: rgba(37, 150, 190, 0.18);
    color: #ffffff;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn .user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
}

.btn .user-avatar .user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.btn .user-name {
    font-weight: 600;
    line-height: 1;
}

.btn-light {
    background-color: #404040;
    color: white;
}

.btn-light:hover {
    background-color: #4a4a4a;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
}

.btn-success {
    background-color: var(--brand-primary);
    color: white;
}

.btn-success:hover {
    background-color: var(--brand-primary-hover);
}

.btn-icon {
    background-color: transparent;
    color: #cccccc;
    padding: 0.5rem 0.75rem;
    min-width: 36px;
}

.btn-icon:hover {
    background-color: #404040;
    color: #ffffff;
}

.btn-icon.active {
    background-color: var(--brand-primary);
    color: white;
}

/* Main Layout */
.studio-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Navigation */
.left-nav {
    width: 90px;
    background-color: #1f1f1f;
    border-right: 1px solid #404040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-btn {
    width: 100%;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
}

.nav-btn:hover {
    background-color: #2d2d2d;
    color: #ffffff;
}

.nav-btn.active {
    background-color: #2d2d2d;
    color: var(--brand-primary);
}

.nav-btn i {
    font-size: 1.3rem;
}

.nav-btn .nav-icon-letter {
    display: inline-block;
    font-size: 1.65rem;
    font-weight: 800;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1;
    letter-spacing: -0.04em;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: #2d2d2d;
    border-right: 1px solid #404040;
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.panel {
    display: none;
    padding: 1.5rem;
    min-height: 100%;
}

.panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Text Panel */
.text-quick-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.text-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    background-color: #404040;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-option:hover {
    background-color: #4a4a4a;
}

.text-option:focus {
    outline: 2px solid #4fb0ff;
    outline-offset: 2px;
}

.text-option:focus:not(:focus-visible) {
    outline: none;
}

.text-preview {
    flex: 1;
    padding: 0.5rem;
    text-align: left;
}

.text-preview.large-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.text-preview.medium-text {
    font-size: 1rem;
    font-weight: 600;
}

.text-preview.small-text {
    font-size: 0.9rem;
}

.text-preview.huge-text {
    font-size: 2rem;
    font-weight: 700;
}

.text-preview.impact-text {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
}

.text-style-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-style-section .section-title {
    margin-bottom: 0;
}

.section-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.section-toggle-icon {
    transition: transform 0.2s ease;
}

.section-toggle-btn[aria-expanded='false'] .section-toggle-icon {
    transform: rotate(-90deg);
}

#styledTextContent {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#styledTextContent.is-collapsed {
    display: none;
}

.styled-font-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.styled-font-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0.8rem 1rem;
    background-color: #404040;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: #f3f3f3;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    word-break: break-word;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.styled-font-card:hover {
    background-color: #4a4a4a;
    border-color: #5a5a5a;
}

.styled-font-card:focus {
    outline: 2px solid #4fb0ff;
    outline-offset: 2px;
}

.styled-font-card:focus:not(:focus-visible) {
    outline: none;
}

.styled-fonts-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.styled-fonts-nav-btn {
    min-width: 74px;
}

.styled-fonts-nav-btn--with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.styled-fonts-nav-btn--with-icon i {
    font-size: 0.75rem;
    opacity: 0.95;
}

.styled-fonts-page-track {
    flex: 1;
    text-align: center;
    color: #cfcfcf;
    font-size: 0.85rem;
}

.section-title {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Upload Panel */
.upload-categories {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #404040;
    background: linear-gradient(180deg, #2a2a2a 0%, #252525 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.upload-category-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    background: linear-gradient(180deg, #333333 0%, #2d2d2d 100%);
    border: 1.5px solid #404040;
    border-radius: 8px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.upload-category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.upload-category-btn:hover::before {
    left: 100%;
}

.upload-category-btn i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    z-index: 1;
}

.upload-category-btn:hover i {
    transform: scale(1.1);
}

.upload-category-btn span {
    z-index: 1;
    position: relative;
}

.upload-category-btn:hover {
    background: linear-gradient(180deg, #3a3a3a 0%, #353535 100%);
    border-color: #555555;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.upload-category-btn.active {
    background: linear-gradient(180deg, #4a90e2 0%, #3a7bc8 100%);
    border-color: #5ba0f2;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transform: translateY(-1px);
}

.upload-category-btn.active i {
    transform: scale(1.15);
}

.upload-category-btn.active:hover {
    background: linear-gradient(180deg, #5ba0f2 0%, #4a90e2 100%);
    border-color: #6bb0ff;
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
    transform: translateY(-2px);
}

.upload-lists {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.upload-lists::-webkit-scrollbar {
    width: 6px;
}

.upload-lists::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.upload-lists::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

.upload-lists::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

.upload-list {
    display: none;
    padding: 0.75rem;
    gap: 0.75rem;
    min-height: 100px;
}

.upload-list.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
}

.upload-list:empty::after {
    content: 'No images uploaded yet';
    display: block;
    text-align: center;
    color: #666666;
    padding: 2rem;
    font-size: 0.85rem;
    font-style: italic;
}

.upload-area {
    border: 2.5px dashed #555555;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0.75rem;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.5) 0%, rgba(35, 35, 35, 0.5) 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(74, 144, 226, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: #4a90e2;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(58, 123, 200, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.upload-area.dragover {
    border-color: #4a90e2;
    border-style: solid;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(58, 123, 200, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-content i {
    font-size: 3.5rem;
    color: #666666;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: block;
}

.upload-area:hover .upload-content i,
.upload-area.dragover .upload-content i {
    color: #4a90e2;
    transform: scale(1.1) translateY(-5px);
}

.upload-content p {
    color: #b0b0b0;
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.upload-area:hover .upload-content p,
.upload-area.dragover .upload-content p {
    color: #ffffff;
}

/* Upload List - now handled by .upload-list.active above */

.upload-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #404040;
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.upload-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.upload-item:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: #4a90e2;
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.upload-item:hover::before {
    opacity: 1;
}

.upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.upload-item:hover img {
    transform: scale(1.1);
}

.upload-item-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem 0.5rem;
    text-align: center;
    pointer-events: none;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-item .delete-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: scale(0.8);
}

.upload-item:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.upload-item .delete-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.5);
}

.upload-item .delete-btn i {
    font-size: 0.75rem;
}

.upload-item.is-uploading {
    pointer-events: none;
    opacity: 0.65;
}

.upload-item.is-uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23fff' stroke-width='4' stroke-dasharray='31.4 31.4' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.7s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center/28px no-repeat;
    border-radius: 6px;
    z-index: 5;
}

/* Photos Panel */
.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-bar i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 4px;
    color: white;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.photos-panel-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.photos-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8c8c8;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.photos-tab-btn:hover {
    color: #fff;
    background: #4a4a4a;
    border-color: #666;
}

.photos-tab-btn.active {
    color: #fff;
    background: var(--brand-primary);
    border-color: #0066dd;
}

.photos-tab-section {
    display: none;
}

.photos-tab-section.active {
    display: block;
}

.photos-tab-hint {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #9a9a9a;
    margin: 0 0 0.85rem;
}

.photos-empty-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.75rem 0.75rem;
    color: #888;
    font-size: 0.88rem;
    line-height: 1.5;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #555555;
    background-color: #2d2d2d;
    transition: all 0.2s ease;
}

.photo-item:hover {
    border-color: var(--brand-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.3);
    z-index: 10;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Shapes Panel */
.shapes-panel-inner {
    position: relative;
    padding: 0;
}

.shapes-panel-hint {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #9a9a9a;
    margin: 0 0 1.1rem;
}

.shapes-panel-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.shapes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.shape-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.9rem 0.75rem 0.85rem;
    margin: 0;
    border: 1px solid #4a4a4a;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(165deg, #3d3d3d 0%, #353535 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    color: #e8e8e8;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.shape-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px rgba(37, 150, 190, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.shape-card:focus {
    outline: 2px solid #4fb0ff;
    outline-offset: 2px;
}

.shape-card:focus:not(:focus-visible) {
    outline: none;
}

.shape-card:active {
    transform: translateY(0);
}

.shape-card-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin: 0 0.15rem;
    padding: 0.45rem 0.35rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-sizing: border-box;
}

.shape-card-preview--line {
    padding: 0.5rem 0.35rem;
}

.shape-card-preview svg {
    width: 100%;
    max-width: 52px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.shape-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #c8c8c8;
}

/* Icons Panel */
.icons-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.icon-btn {
    padding: 0.55rem;
    margin: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 6px;
    color: white;
    cursor: grab;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    user-select: none;
    -webkit-user-drag: element;
    position: relative;
    min-height: 0;
    aspect-ratio: 1;
}

.icon-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.icon-btn:hover {
    background-color: #4a4a4a;
    border-color: var(--brand-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.3);
}

.icon-btn.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.icon-btn i {
    font-size: 1.35rem;
    line-height: 1;
    pointer-events: none;
}

/* Background Panel */
.background-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
}

.color-item {
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.color-item:hover {
    transform: scale(1.1);
    border-color: white;
}

.gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.gradient-item {
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.gradient-item:hover {
    transform: scale(1.05);
    border-color: white;
}

/* My Designs Panel */
.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.new-design-card {
    aspect-ratio: 4/3;
    background-color: #404040;
    border: 2px dashed #555555;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 1rem;
}

.new-design-card:hover {
    border-color: var(--brand-primary);
    background-color: #4a4a4a;
}

.new-design-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.new-design-card:hover .new-design-icon {
    background-color: var(--brand-primary);
}

.new-design-icon i {
    font-size: 1.5rem;
    color: #cccccc;
    transition: all 0.2s ease;
}

.new-design-card:hover .new-design-icon i {
    color: white;
}

.new-design-text {
    color: #cccccc;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.new-design-card:hover .new-design-text {
    color: white;
}

.mined-brand-assets-wrap {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mined-brand-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin-bottom: 0.5rem;
    text-align: center;
}

.mined-brand-assets {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    justify-content: stretch;
}

.mined-brand-item {
    width: 100%;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    background: #2d2d2d;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mined-brand-item:hover {
    border-color: #1a9fff;
    box-shadow: 0 6px 16px rgba(26, 159, 255, 0.2);
    transform: translateY(-1px);
}

.mined-brand-item--active {
    border: 3px solid #1a9fff;
    box-shadow: 0 0 0 3px rgba(26, 159, 255, 0.28), 0 10px 20px rgba(26, 159, 255, 0.18);
    transform: translateY(-1px);
}

.mined-brand-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

@media (max-width: 1200px) {
    .mined-brand-assets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mined-brand-assets {
        grid-template-columns: 1fr;
    }
}

.mined-brand-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2d2d2d;
    margin: 2px;
    outline: 0;
    outline-offset: 0;
    transition: outline-offset 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mined-brand-thumb.is-active {
    border-color: #1a9fff;
    box-shadow: 0 0 0 2px rgba(26, 159, 255, 0.25), 0 10px 22px rgba(26, 159, 255, 0.14);
    outline: 2px solid #1a9fff;
    outline-offset: 4px; /* visual "margin highlight" */
    transform: translateY(-2px);
    animation: minedThumbPulse 1.1s ease-in-out infinite;
}

@keyframes minedThumbPulse {
    0% { opacity: 1; }
    50% { opacity: 0.85; }
    100% { opacity: 1; }
}

/* Right-click menu for canvas elements (copy / paste / duplicate / remove) */
.canvas-element-context-menu,
#canvasElementContextMenu {
    position: fixed;
    z-index: 99999;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 0.4rem;
    min-width: 200px;
}

.canvas-element-context-menu .mined-assets-menu-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Right-click dropdown menu for mined images */
#minedAssetsContextMenu {
    position: fixed;
    z-index: 99999;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 0.4rem;
    width: 190px;
}

/* Right-click dropdown menu for My Designs posters */
#posterContextMenu {
    position: fixed;
    z-index: 99999;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    padding: 0.4rem;
    width: 190px;
}

.mined-assets-menu-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: #e6e6e6;
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.mined-assets-menu-btn i {
    width: 1rem;
    margin-right: 0.5rem;
    text-align: center;
}

.mined-assets-menu-btn:hover {
    background: rgba(37, 150, 190, 0.18);
    color: #ffffff;
}

.mined-assets-menu-btn--danger:hover {
    background: rgba(220, 53, 69, 0.18);
}

.mined-assets-menu-btn--danger {
    color: #ffb3b8;
}

/* Brand save + website mining: fixed strip under modal body (auth modal lg only) */
.brand-setup-progress-dock {
    flex-shrink: 0;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #404040;
    background: linear-gradient(180deg, #252525 0%, #2d2d2d 100%);
}

.brand-setup-progress-dock[hidden] {
    display: none !important;
}

.brand-setup-progress-dock-inner {
    max-width: 520px;
    margin: 0 auto;
}

.brand-setup-progress-dock-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
}

.brand-setup-progress-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.brand-setup-progress-sub {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #9a9a9a;
}

.brand-setup-progress-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #1a1a1a;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.brand-setup-progress-bar--done {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0066cc, #1a9fff);
    transition: width 0.45s ease;
    z-index: 1;
}

/* Sliding indeterminate chunk while mining (no real % from server) */
.brand-setup-progress-dock.is-mining .brand-setup-progress-bar--done {
    width: 34%;
    left: 0;
    transition: none;
    animation: brandSetupProgressSlide 1.85s ease-in-out infinite alternate;
    box-shadow: 0 0 12px rgba(26, 159, 255, 0.45);
}

.brand-setup-progress-dock.is-complete .brand-setup-progress-bar--done {
    width: 100%;
    left: 0;
    animation: none;
    transition: width 0.5s ease, box-shadow 0.35s ease;
    box-shadow: 0 0 14px rgba(26, 159, 255, 0.35);
}

@keyframes brandSetupProgressSlide {
    0% {
        left: 0;
    }

    100% {
        left: 66%;
    }
}

.brand-setup-progress-bar--busy {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.brand-setup-progress-dock.is-mining .brand-setup-progress-bar--busy {
    opacity: 1;
}

.brand-setup-progress-bar--busy::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(80, 180, 255, 0.25),
        rgba(160, 220, 255, 0.65),
        rgba(80, 180, 255, 0.25),
        transparent
    );
    animation: brandSetupProgressShimmer 1.05s linear infinite;
    will-change: transform;
}

@keyframes brandSetupProgressShimmer {
    from {
        transform: translateX(-120%);
    }

    to {
        transform: translateX(340%);
    }
}

/* Fixed strip for M-Pesa / PNG download (reuses miner progress animations above) */
.download-payment-progress-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    margin: 0;
    border-top: 1px solid #404040;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.45);
}

.download-payment-progress-dock .brand-setup-progress-hint:empty {
    display: none;
}

.download-payment-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download-payment-progress-heading .brand-setup-progress-title {
    margin: 0;
}

.download-payment-cancel-btn {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
}

.design-card {
    aspect-ratio: 4/3;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.design-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.3);
}

.design-card-thumbnail {
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.designs-brand-hint {
    grid-column: 1 / -1;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #888888;
    text-align: center;
}

.design-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 0.5rem;
    color: white;
    font-size: 0.85rem;
    text-align: center;
}

/* Empty Panels */
.empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: #888888;
}

.empty-panel i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-panel p {
    font-size: 0.9rem;
}

.draw-panel-inner {
    padding: 0;
    color: #cccccc;
}

.draw-panel-hint {
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
    color: #9a9a9a;
}

.draw-tool-card {
    background: linear-gradient(180deg, #3a3a3a 0%, #353535 100%);
    border: 1px solid #484848;
    border-radius: 8px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.draw-tool-card .section-title {
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #4a4a4a;
}

.draw-field {
    margin-bottom: 1.15rem;
}

.draw-field:last-of-type {
    margin-bottom: 0;
}

.draw-field-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c8c8c8;
    letter-spacing: 0.02em;
}

.draw-field-label i {
    width: 1rem;
    text-align: center;
    color: #7eb8ff;
    font-size: 0.85rem;
    opacity: 0.95;
}

.draw-color-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.draw-color-swatch-hit {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #555;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.draw-color-swatch-hit:hover {
    border-color: var(--brand-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(37, 150, 190, 0.45);
}

.draw-color-swatch-hit:focus-within {
    outline: 2px solid #4fb0ff;
    outline-offset: 2px;
}

.draw-color-swatch {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background-color: #1a1a1a;
    pointer-events: none;
}

.draw-color-input-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
}

.draw-color-hex {
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 0.8rem;
    color: #b0b0b0;
    letter-spacing: 0.06em;
    user-select: all;
}

.draw-width-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.draw-width-header .draw-field-label {
    margin: 0;
}

.draw-width-badge {
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e8e8e8;
    background: #2a2a2a;
    border: 1px solid #505050;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    min-width: 3.25rem;
    text-align: center;
}

.draw-width-slider {
    display: block;
    width: 100%;
    height: 6px;
    margin: 0;
    padding: 0.5rem 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.draw-width-slider:focus {
    outline: none;
}

.draw-width-slider:focus-visible {
    outline: 2px solid #4fb0ff;
    outline-offset: 4px;
    border-radius: 4px;
}

.draw-width-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #555 0%, var(--brand-primary) 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.draw-width-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #555 0%, var(--brand-primary) 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.draw-width-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border-radius: 50%;
    background: #f2f2f2;
    border: 2px solid var(--brand-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease;
}

.draw-width-slider::-webkit-slider-thumb:hover {
    transform: scale(1.06);
}

.draw-width-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2f2f2;
    border: 2px solid var(--brand-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.draw-width-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #888;
    margin-top: -0.15rem;
    margin-bottom: 0.6rem;
}

.draw-width-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.draw-width-preset {
    flex: 1;
    min-width: 2.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ccc;
    background: #404040;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.draw-width-preset:hover {
    background: #4a4a4a;
    border-color: #666;
    color: #fff;
}

.draw-width-preset.is-active {
    background: rgba(37, 150, 190, 0.22);
    border-color: var(--brand-primary);
    color: #7eb8ff;
}

.draw-brush-preview {
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #4a4a4a;
}

.draw-brush-preview-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 0.5rem;
}

.draw-brush-preview-track {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    background: #2f2f2f;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
}

.draw-brush-preview-line {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background-color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: height 0.12s ease, border-radius 0.12s ease, background-color 0.12s ease;
}

.canvas-container-.draw-mode-active #designCanvas,
#designCanvas.draw-mode-active {
    cursor: crosshair;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cccccc;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #555555;
    border-radius: 4px;
    background-color: #404040;
    color: #ffffff;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
}

/* Top Toolbar */
.top-toolbar {
    padding: 0.75rem 1rem;
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-left {
    display: flex;
    gap: 0.5rem;
}

.toolbar-separator {
    width: 1px;
    background-color: #404040;
    margin: 0 0.5rem;
}

.tool-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background-color: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.tool-btn:hover {
    background-color: #404040;
    color: #ffffff;
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-btn.active {
    background-color: #4fb0ff;
    color: #ffffff;
    border-color: #4fb0ff;
}

.tool-btn.active:hover:not(:disabled) {
    background-color: #3a9de5;
    border-color: #3a9de5;
}

.tool-select {
    height: 36px;
    padding: 0 0.5rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.tool-select:hover:not(:disabled) {
    background-color: #4a4a4a;
    border-color: #666666;
}

.tool-select:focus {
    outline: none;
    border-color: #4fb0ff;
}

.tool-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-input {
    height: 36px;
    width: 60px;
    padding: 0 0.5rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
}

.tool-input:hover:not(:disabled) {
    background-color: #4a4a4a;
    border-color: #666666;
}

.tool-input:focus {
    outline: none;
    border-color: #4fb0ff;
}

.tool-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tool-color-picker {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #555555;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    position: absolute;
    z-index: 2;
}

.tool-color-picker:hover:not(:disabled) {
    border-color: #666666;
}

.tool-color-picker:disabled {
    cursor: not-allowed;
}

.color-picker-label {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: none;
}

.tool-color-picker:not(:disabled)~.color-picker-label {
    pointer-events: auto;
    cursor: pointer;
}

.tool-color-picker:not(:disabled)~.color-picker-label:hover {
    background-color: #4a4a4a;
}

/* Opacity Slider Styles */
.opacity-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.opacity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opacity-btn:hover:not(:disabled) {
    background-color: #4a4a4a;
}

.opacity-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.opacity-slider-container {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    display: none;
    align-items: center;
    background-color: #2a2a2a;
    border: 1px solid #555555;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    white-space: nowrap;
}

.opacity-slider-wrapper.active .opacity-slider-container {
    display: flex;
}

.opacity-slider {
    width: 120px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, transparent 0%, var(--brand-primary) 100%);
    outline: none;
    border-radius: 2px;
    margin: 0 8px;
    cursor: pointer;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--brand-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.opacity-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--brand-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.opacity-slider:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.opacity-percentage {
    min-width: 45px;
    text-align: center;
    color: #cccccc;
    font-size: 12px;
    font-weight: 500;
}


.tool-color-picker:disabled~.color-picker-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
    padding: 2rem;
}

.canvas-container- {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: transparent;
    overflow: auto;
    padding: 24px;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#designCanvas {
    border: 1px solid #cccccc;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: block;
    position: relative;
    flex-shrink: 0;
    max-width: min(65%, 680px);
    max-height: 80%;
    width: auto;
    height: auto;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    pointer-events: none;
}

.empty-state {
    text-align: center;
    color: #666666;
    pointer-events: auto;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #cccccc;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #333333;
}

.empty-state p {
    color: #666666;
}

/* Bottom Toolbar */
.bottom-toolbar {
    padding: 0.75rem 1rem;
    background-color: #2d2d2d;
    border-top: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.chat-input-wrapper {
    flex: 1;
    max-width: 500px;
    margin: 0 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.zoom-level {
    min-width: 50px;
    text-align: center;
    color: #cccccc;
    font-size: 0.9rem;
}

.pages-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f1f1f;
}

::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 400px;
    background-color: #2d2d2d;
    border-left: 1px solid #404040;
    display: none;
    flex-direction: column;
    position: relative;
}

.chat-sidebar.active {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #404040;
}

.chat-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar i {
    color: white;
    font-size: 0.9rem;
}

.chat-message.user .message-avatar {
    background-color: #28a745;
}

.chat-message.user .message-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.chat-message-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.chat-message.user:hover .chat-message-actions,
.chat-message.user:focus-within .chat-message-actions {
    opacity: 1;
    pointer-events: auto;
}

.chat-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
    font-size: 0.75rem;
    color: #b0b0b0;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chat-copy-btn:hover {
    color: #fff;
    border-color: var(--brand-primary);
    background: rgba(37, 150, 190, 0.12);
}

.chat-resubmit-btn {
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    color: #b0b0b0;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chat-resubmit-btn:hover {
    color: #fff;
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.12);
}

.message-content {
    flex: 1;
}

.message-content p {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    padding: 0.75rem 1rem;
    background-color: #404040;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 1px solid #404040;
}

.chat-input-container .chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.chat-input {
    flex: 1;
    min-width: 0;
    /* Prevents flex item from overflowing */
    padding: 0.5rem 1rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.chat-input:focus {
    border-color: var(--brand-primary);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background-color: var(--brand-primary-hover);
    transform: scale(1.05);
}

.chat-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #404040;
    border: 1px solid #555555;
    color: #e6e6e6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-attach-btn:hover {
    border-color: var(--brand-primary);
    color: #ffffff;
    background-color: #4a4a4a;
    transform: scale(1.05);
}

/* Chat image attachment previews (thumbnails + hover tooltip) */
.chat-image-preview-row {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.chat-image-thumb-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    overflow: visible;
}

.chat-image-thumb {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #555;
    background: #2d2d2d;
}

.chat-image-thumb-x {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    z-index: 2;
}

.chat-image-thumb-x:hover {
    background: rgba(220, 53, 69, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.chat-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hint-tag {
    padding: 0.5rem 0.75rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 16px;
    color: #cccccc;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hint-tag:hover {
    background-color: #4a4a4a;
    border-color: var(--brand-primary);
    color: white;
}

.mid-section {
    background-color: #f0ece6;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(139, 105, 20, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(160, 82, 45, 0.02) 0%, transparent 50%),
        linear-gradient(45deg, rgba(205, 170, 125, 0.02) 25%, transparent 25%, transparent 75%, rgba(205, 170, 125, 0.02) 75%),
        linear-gradient(-45deg, rgba(184, 134, 11, 0.01) 25%, transparent 25%, transparent 75%, rgba(184, 134, 11, 0.01) 75%);
    background-size: 20px 20px, 30px 30px, 40px 40px, 60px 60px;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* While brand website mining runs, discourage accidental dismiss (optional UX cue) */
.modal.brand-setup-progress-active {
    cursor: wait;
}

.modal.brand-setup-progress-active .modal-close {
    pointer-events: none;
    opacity: 0.45;
}

.modal-content {
    background-color: #2d2d2d;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-dialog.modal-lg {
    width: 90%;
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.modal-dialog.modal-lg .modal-content {
    width: 100% !important;
    max-width: 900px !important;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-dialog.modal-lg .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #404040;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #b0b0b0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: #404040;
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem 2rem 1.5rem 2rem;
}

/* Multi-step sign up wizard */
.signup-wizard-form .signup-wizard {
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

#businessDetailsForm .brand-details-steps {
    min-height: 260px;
    max-height: min(52vh, 440px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

/* Sidebar — poster brand colours panel (shares wizard blocks) */
#brand-colors-panel .brand-colors-sidebar-guest {
    padding: 0.5rem 0 1rem 0;
}

#brand-colors-panel .brand-colors-sidebar-guest-lead {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

#brand-colors-panel .brand-colors-sidebar-guest-sub {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #9a9a9a;
}

#brand-colors-panel .brand-colors-sidebar-intro {
    margin: 0 0 1rem 0;
}

#brand-colors-panel .brand-colors-sidebar-save {
    width: 100%;
    margin-top: 1rem;
}

/* Subtle secondary action — smaller, low-contrast */
#brand-colors-panel .brand-poster-from-poster-btn,
#businessDetailsForm .brand-poster-from-poster-btn {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    padding: 0.4rem 0.65rem;
    color: #8b8b8b;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

#brand-colors-panel .brand-poster-from-poster-btn:hover,
#brand-colors-panel .brand-poster-from-poster-btn:focus-visible,
#businessDetailsForm .brand-poster-from-poster-btn:hover,
#businessDetailsForm .brand-poster-from-poster-btn:focus-visible {
    color: #a8a8a8;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

#brand-colors-panel .brand-poster-from-poster-btn {
    width: 100%;
    margin-top: 0.65rem;
}

#businessDetailsForm .brand-poster-from-poster-btn {
    margin-top: 0.75rem;
}

/* Modal: pick poster to sample brand colours */
.poster-palette-picker-modal .poster-palette-picker-hint {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #b0b0b0;
}

.poster-palette-picker-modal .poster-palette-picker-busy {
    margin: 0.5rem 0;
    font-size: 0.88rem;
    color: #7eb8ff;
}

.poster-palette-picker-modal .poster-palette-picker-empty {
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #9a9a9a;
}

.poster-palette-picker-modal .poster-palette-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.85rem;
    max-height: min(55vh, 440px);
    overflow-y: auto;
    margin-top: 0.75rem;
    padding: 2px;
}

.poster-palette-picker-tile {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
    text-align: left;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.poster-palette-picker-tile:hover,
.poster-palette-picker-tile:focus-visible {
    box-shadow: 0 0 0 2px #4a90e2;
    transform: translateY(-1px);
    outline: none;
}

.poster-palette-picker-tile img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

.poster-palette-picker-tile-label {
    font-size: 0.72rem;
    color: #aaa;
    padding: 0.35rem 0.45rem 0.5rem;
    line-height: 1.25;
    max-height: 2.7em;
    overflow: hidden;
}

/* Brand wizard — poster palette step */
.brand-poster-colors {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.25rem;
}

.brand-poster-color-block {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#businessDetailsForm .brand-poster-color-block-head,
#brand-colors-panel .brand-poster-color-block-head {
    margin-bottom: 0.35rem;
}

.brand-poster-color-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e4e4e4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#businessDetailsForm .brand-poster-color-role,
#brand-colors-panel .brand-poster-color-role {
    margin: 0 0 0.65rem 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #9a9a9a;
}

#businessDetailsForm .brand-poster-color-inputs,
#brand-colors-panel .brand-poster-color-inputs {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

#businessDetailsForm .brand-poster-color-native,
#brand-colors-panel .brand-poster-color-native {
    flex-shrink: 0;
    width: 44px;
    height: 36px;
    padding: 2px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1e1e1e;
    cursor: pointer;
}

#businessDetailsForm .brand-poster-color-hex,
#brand-colors-panel .brand-poster-color-hex {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.85rem;
}

#businessDetailsForm .brand-poster-colors-footnote,
#brand-colors-panel .brand-poster-colors-footnote {
    margin: 1rem 0 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #6a7a8a;
}

.brand-setup-progress-hint {
    display: none;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #7a9cc4;
}

.brand-setup-progress-dock.is-mining .brand-setup-progress-hint {
    display: block;
}

/* Searchable brand type (native datalist + text input) */
#businessDetailsForm .brand-type-search {
    cursor: text;
}

/* Brand wizard: logo row aligns with form width — two equal columns, roomier landscape drop zones */
#businessDetailsForm .business-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
    margin-top: 0.5rem;
    align-items: stretch;
}

#businessDetailsForm .business-logo-cell {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#businessDetailsForm .business-logo-drop-zone {
    width: 100%;
    height: auto;
    min-height: 120px;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
}

@media (max-width: 380px) {
    #businessDetailsForm .business-logos {
        grid-template-columns: 1fr;
    }
}

.signup-wizard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: -0.25rem 0 0.75rem 0;
    min-height: 40px;
}

.signup-wizard-top-spacer {
    flex: 1;
    min-width: 0;
}

.signup-back-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #2f2f2f;
    color: #e8e8e8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.signup-back-arrow:hover {
    background: #3d3d3d;
    color: #ffffff;
}

.signup-back-arrow:active {
    transform: scale(0.96);
}

.signup-back-arrow.is-hidden {
    display: none;
}

.signup-skip-btn.is-hidden {
    display: none;
}

.signup-skip-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #8b9dc3;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.signup-skip-btn:hover {
    color: #a8b9e0;
}

.signup-progress {
    margin-bottom: 1.5rem;
}

.signup-progress-track {
    height: 4px;
    border-radius: 999px;
    background: #333;
    overflow: hidden;
}

.signup-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4a90e2, #6c5ce7);
    transition: width 0.35s ease;
}

.signup-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 0.65rem;
    padding: 0 2px;
}

.signup-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444;
    transition: background 0.25s ease, transform 0.2s ease;
}

.signup-progress-dot.is-active {
    background: #6c5ce7;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.25);
}

.signup-progress-dot.is-done {
    background: #4a90e2;
}

.signup-steps {
    position: relative;
    min-height: 220px;
}

.signup-step {
    display: none;
    animation: signup-step-in 0.28s ease;
}

.signup-step.is-active {
    display: block;
}

@keyframes signup-step-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.signup-step-lead {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
}

.signup-step-sub {
    font-size: 0.85rem;
    color: #9a9a9a;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.signup-optional {
    font-weight: 400;
    color: #888;
    font-size: 0.85em;
}

.form-field-hint {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #888888;
}

.form-field-hint strong {
    color: #aaaaaa;
    font-weight: 600;
}

.form-field-hint code {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.9em;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    padding: 0.05em 0.35em;
    color: #cccccc;
    word-break: break-all;
}

.signup-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.signup-wizard-actions .signup-nav {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Google onboarding: designation chips + terms beside submit */
.google-designation-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.google-designation-chip {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.google-designation-chip:hover {
    background: rgba(255, 255, 255, 0.08);
}

.google-designation-chip.is-selected {
    border-color: var(--success, #28a745);
    background: rgba(40, 167, 69, 0.15);
}

.google-onboarding-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
}

.google-onboarding-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    cursor: pointer;
    flex: 1 1 12rem;
    min-width: 0;
}

.google-onboarding-terms-label input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.google-onboarding-nav-actions.is-last-step .signup-nav {
    display: none;
}

.auth-inline-link {
    color: inherit;
    text-decoration: underline;
    opacity: 0.95;
}

.profile-pic-deactivated {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Create account split layout (60% inputs / 40% profile pic) */
.auth-create-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.auth-create-left {
    flex: 0 0 60%;
    min-width: 0;
}

.auth-create-right {
    flex: 0 0 40%;
    min-width: 0;
}

.profile-pic-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Square drop zone — 40% column width, square aspect */
.profile-pic-drop-zone {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-height: 280px;
    border: 2px dashed #555555;
    border-radius: 12px;
    background: #252525;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.profile-pic-drop-zone:hover,
.profile-pic-drop-zone.drag-over {
    border-color: #4a90e2;
    background: #2a2a2a;
}

.profile-pic-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.profile-pic-placeholder {
    color: #888888;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    pointer-events: none;
}

.profile-pic-drop-zone.has-image .profile-pic-placeholder {
    display: none;
}

.profile-pic-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    pointer-events: none;
}

.auth-create-right .muted-text {
    display: block;
    margin-top: 8px;
}

.muted-text {
    display: block;
    margin-top: 6px;
    color: #aaaaaa;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .auth-create-grid {
        flex-direction: column;
        gap: 16px;
    }

    .auth-create-left,
    .auth-create-right {
        flex: 0 0 100%;
    }

    .profile-pic-drop-zone {
        max-height: 240px;
    }
}

/* Business details form (after account creation) */
.business-details-intro {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.business-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.business-details-grid .form-group-full {
    grid-column: 1 / -1;
}

.business-logos-row {
    margin-top: 0.5rem;
}

.business-logos {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.business-logo-cell {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    max-width: 100%;
}

.small-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #cccccc;
    font-size: 0.85rem;
}

.business-logo-drop-zone {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 100px;
    aspect-ratio: 4 / 3;
    height: auto;
    border: 2px dashed #555555;
    border-radius: 8px;
    background: #252525;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.business-logo-drop-zone:hover,
.business-logo-drop-zone.drag-over {
    border-color: #4a90e2;
    background: #2a2a2a;
}

.business-logo-drop-zone .profile-pic-placeholder {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.3;
    text-align: center;
}

.business-logo-drop-zone.has-image .profile-pic-placeholder {
    display: none;
}

.business-logo-drop-zone.is-uploading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.business-logo-drop-zone.is-uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23fff' stroke-width='4' stroke-dasharray='31.4 31.4' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.7s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center/32px no-repeat;
    border-radius: 8px;
}

.business-logo-drop-zone .profile-pic-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-details-form .form-actions {
    margin-top: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #404040;
    border: 1px solid #555555;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-control::placeholder {
    color: #888888;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #404040;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #404040;
}

.form-footer p {
    margin: 0;
    color: #cccccc;
    font-size: 0.9rem;
}

.form-footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: #5ba3f5;
    text-decoration: underline;
}

.auth-oauth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.1rem 0;
    color: #888888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #404040;
}

.signup-oauth-divider {
    margin-top: 0;
}

.google-oauth-btn {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-weight: 500;
    border: 1px solid #555555;
    background: #2a2a2a;
    color: #eeeeee;
    margin-bottom: 0.5rem;
}

.google-oauth-btn:hover {
    background: #333333;
    border-color: #666666;
    color: #ffffff;
}

.google-oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.google-oauth-icon svg {
    display: block;
}

.account-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.account-summary-header-text {
    flex: 1;
    min-width: 0;
}
.account-summary-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.account-summary-subtitle {
    margin: 0.25rem 0 0;
    color: #cccccc;
    font-size: 0.95rem;
}

.account-summary-details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-summary-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.account-summary-details .label {
    font-weight: 500;
    color: #bbbbbb;
    font-size: 0.9rem;
}

.account-summary-details .value {
    color: #ffffff;
    font-size: 0.95rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.account-summary-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    min-width: 240px;
    max-width: 320px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateX(120%);
    opacity: 0;
    pointer-events: auto;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.toast-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.toast-icon {
    font-size: 1.1rem;
    display: inline-flex;
}

/* Responsive Design */

/* Small laptops (e.g. 1366px wide) */
@media (max-width: 1440px) {
    /* Header */
    .studio-header {
        padding: 0.5rem 1rem;
        height: 46px;
    }

    .logo-img {
        height: 28px;
    }

    .design-title {
        font-size: 0.82rem;
        padding: 0.35rem 0.75rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.78rem;
        gap: 0.35rem;
    }

    .btn-icon {
        padding: 0.35rem 0.5rem;
        min-width: 30px;
    }

    .message-avatar {
        width: 26px;
        height: 26px;
    }

    .message-avatar i {
        font-size: 0.75rem;
    }

    /* Top Toolbar */
    .top-toolbar {
        padding: 0.25rem 0.5rem;
    }

    .tool-btn {
        width: 24px;
        height: 24px;
    }

    .tool-btn i {
        font-size: 0.65rem;
    }

    .tool-select {
        height: 24px;
        font-size: 0.68rem;
        padding: 0 0.25rem;
        min-width: 80px;
    }

    .tool-input {
        height: 24px;
        width: 40px;
        font-size: 0.68rem;
        padding: 0 0.25rem;
    }

    .toolbar-separator {
        margin: 0 0.15rem;
    }

    .toolbar-left {
        gap: 0.15rem;
    }

    .opacity-btn {
        width: 24px;
        height: 24px;
    }

    .opacity-btn i {
        font-size: 0.65rem;
    }

    .tool-color-picker,
    .color-picker-label {
        width: 24px;
        height: 24px;
    }

    .color-picker-label i {
        font-size: 0.65rem;
    }

    /* Bottom Toolbar */
    .bottom-toolbar {
        padding: 0.25rem 0.5rem;
    }

    .zoom-level {
        font-size: 0.68rem;
        min-width: 36px;
    }

    .zoom-controls {
        gap: 0.2rem;
    }

    .chat-input {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .chat-send-btn {
        width: 28px;
        height: 28px;
    }

    .chat-send-btn i {
        font-size: 0.7rem;
    }

    .chat-attach-btn {
        width: 28px;
        height: 28px;
    }

    .chat-header {
        padding: 0.5rem 0.75rem;
    }

    .chat-header h3 {
        font-size: 0.78rem;
    }

    .chat-close-btn {
        font-size: 0.78rem;
    }

    .chat-messages {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .chat-message {
        gap: 0.4rem;
    }

    .message-content p {
        font-size: 0.72rem;
        line-height: 1.4;
        padding: 0.5rem 0.6rem;
    }

    .message-avatar {
        width: 24px;
        height: 24px;
    }

    .message-avatar i {
        font-size: 0.65rem;
    }

    .chat-attach-btn i {
        font-size: 0.8rem;
    }

    .chat-input-wrapper {
        max-width: 400px;
        margin: 0 0.5rem;
        gap: 0.35rem;
    }

    .chat-sidebar {
        width: 180px;
    }

    /* Modals (Sign In / Sign Up) */
    .modal-content {
        max-width: 380px;
        border-radius: 10px;
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

    .modal-header h3 {
        font-size: 0.95rem;
    }

    .modal-close {
        font-size: 1.1rem;
        width: 26px;
        height: 26px;
    }

    .modal-body {
        padding: 0.75rem 1rem;
    }

    .form-group {
        margin-bottom: 0.7rem;
    }

    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    .form-control {
        padding: 0.45rem 0.65rem;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .form-actions {
        gap: 0.5rem;
    }

    .form-actions .btn,
    .modal-body .btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.72rem;
    }

    .signup-wizard-form .signup-wizard {
        max-width: 340px;
    }

    .signup-wizard-top {
        margin: -0.15rem 0 0.5rem 0;
        min-height: 30px;
    }

    .signup-wizard-actions {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .auth-create-grid {
        gap: 14px;
    }

    .muted-text {
        font-size: 0.68rem;
    }

    .google-designation-chip {
        font-size: 0.72rem;
        padding: 0.3rem 0.6rem;
    }

    .modal-dialog.modal-lg {
        max-width: 700px;
    }

    .modal-dialog.modal-lg .modal-content {
        max-width: 700px !important;
    }

    /* Canvas */
    #designCanvas {
        max-width: min(60%, 600px);
    }

    /* Sidebar */
    .sidebar {
        width: 200px;
    }

    .left-nav {
        width: 80px;
    }

    .panel {
        padding: 0.75rem;
    }

    .designs-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .new-design-card {
        aspect-ratio: 1;
        padding: 0.5rem;
    }

    .new-design-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 0.3rem;
    }

    .new-design-icon i {
        font-size: 0.9rem;
    }

    .new-design-text {
        font-size: 0.72rem;
    }
}

@media (max-width: 1200px) {
    .studio-header {
        padding: 0.4rem 0.75rem;
        height: 42px;
    }

    .logo-img {
        height: 24px;
    }

    .design-title {
        font-size: 0.78rem;
    }

    .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.72rem;
    }

    .btn-icon {
        padding: 0.2rem 0.3rem;
        min-width: 22px;
    }

    .top-toolbar {
        padding: 0.2rem 0.35rem;
    }

    .tool-btn {
        width: 22px;
        height: 22px;
    }

    .tool-btn i {
        font-size: 0.6rem;
    }

    .tool-select {
        height: 22px;
        font-size: 0.65rem;
        min-width: 72px;
        padding: 0 0.2rem;
    }

    .tool-input {
        height: 22px;
        width: 36px;
        font-size: 0.65rem;
        padding: 0 0.2rem;
    }

    .toolbar-left {
        gap: 0.1rem;
    }

    .toolbar-separator {
        margin: 0 0.1rem;
    }

    .opacity-btn {
        width: 22px;
        height: 22px;
    }

    .opacity-btn i {
        font-size: 0.6rem;
    }

    .tool-color-picker,
    .color-picker-label {
        width: 22px;
        height: 22px;
    }

    .color-picker-label i {
        font-size: 0.6rem;
    }

    .bottom-toolbar {
        padding: 0.2rem 0.35rem;
    }

    .zoom-level {
        font-size: 0.72rem;
    }

    .chat-send-btn {
        width: 24px;
        height: 24px;
    }

    .chat-send-btn i {
        font-size: 0.6rem;
    }

    .chat-attach-btn {
        width: 24px;
        height: 24px;
    }

    .chat-attach-btn i {
        font-size: 0.6rem;
    }

    .chat-input {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .chat-input-wrapper {
        max-width: 350px;
    }

    .chat-header {
        padding: 0.4rem 0.6rem;
    }

    .chat-header h3 {
        font-size: 0.72rem;
    }

    .chat-close-btn {
        font-size: 0.72rem;
    }

    .chat-messages {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .chat-message {
        gap: 0.3rem;
    }

    .message-content p {
        font-size: 0.65rem;
        line-height: 1.35;
        padding: 0.4rem 0.5rem;
    }

    .message-avatar {
        width: 20px;
        height: 20px;
    }

    .message-avatar i {
        font-size: 0.55rem;
    }

    /* Modals */
    .modal-content {
        max-width: 320px;
        border-radius: 8px;
    }

    .modal-header {
        padding: 0.6rem 0.75rem;
    }

    .modal-header h3 {
        font-size: 0.82rem;
    }

    .modal-close {
        font-size: 0.95rem;
        width: 22px;
        height: 22px;
    }

    .modal-body {
        padding: 0.6rem 0.75rem;
    }

    .form-group {
        margin-bottom: 0.55rem;
    }

    .form-group label {
        font-size: 0.68rem;
        margin-bottom: 0.2rem;
    }

    .form-control {
        padding: 0.35rem 0.5rem;
        font-size: 0.68rem;
        border-radius: 5px;
    }

    .form-actions .btn,
    .modal-body .btn {
        padding: 0.3rem 0.55rem;
        font-size: 0.65rem;
    }

    .signup-wizard-form .signup-wizard {
        max-width: 280px;
    }

    .signup-wizard-top {
        min-height: 24px;
        margin: -0.1rem 0 0.4rem 0;
    }

    .signup-wizard-actions {
        margin-top: 0.6rem;
    }

    .muted-text {
        font-size: 0.6rem;
    }

    .google-designation-chip {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .modal-dialog.modal-lg {
        max-width: 580px;
        margin: 2rem auto;
    }

    .modal-dialog.modal-lg .modal-content {
        max-width: 580px !important;
    }

    .sidebar {
        width: 180px;
    }

    .left-nav {
        width: 72px;
    }

    .nav-btn {
        padding: 0.7rem 0.3rem;
        gap: 0.3rem;
        font-size: 0.68rem;
    }

    .nav-btn i {
        font-size: 1.1rem;
    }

    .nav-btn .nav-icon-letter {
        font-size: 1.4rem;
    }

    .panel {
        padding: 0.6rem;
    }

    .chat-sidebar {
        width: 180px;
    }

    #designCanvas {
        max-width: min(58%, 540px);
    }

    .designs-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .new-design-card {
        padding: 0.4rem;
    }

    .new-design-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 0.25rem;
    }

    .new-design-icon i {
        font-size: 0.8rem;
    }

    .new-design-text {
        font-size: 0.68rem;
    }
}

@media (max-width: 1024px) {
    .studio-header {
        height: 34px;
        padding: 0.2rem 0.4rem;
    }

    .logo-img {
        height: 20px;
    }

    .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.62rem;
    }

    .top-toolbar {
        padding: 0.15rem 0.3rem;
    }

    .tool-btn {
        width: 20px;
        height: 20px;
    }

    .tool-btn i {
        font-size: 0.55rem;
    }

    .tool-select {
        height: 20px;
        font-size: 0.6rem;
        min-width: 64px;
        padding: 0 0.15rem;
    }

    .tool-input {
        height: 20px;
        width: 32px;
        font-size: 0.6rem;
        padding: 0 0.15rem;
    }

    .toolbar-left {
        gap: 0.1rem;
    }

    .toolbar-separator {
        margin: 0 0.08rem;
        height: 16px;
    }

    .opacity-btn {
        width: 20px;
        height: 20px;
    }

    .opacity-btn i {
        font-size: 0.55rem;
    }

    .tool-color-picker,
    .color-picker-label {
        width: 20px;
        height: 20px;
    }

    .color-picker-label i {
        font-size: 0.55rem;
    }

    .bottom-toolbar {
        padding: 0.15rem 0.3rem;
    }

    .chat-input-wrapper {
        max-width: 300px;
    }

    .sidebar {
        width: 160px;
    }

    .left-nav {
        width: 64px;
    }

    .nav-btn {
        padding: 0.6rem 0.25rem;
        gap: 0.25rem;
        font-size: 0.65rem;
    }

    .nav-btn i {
        font-size: 1rem;
    }

    .nav-btn .nav-icon-letter {
        font-size: 1.25rem;
    }

    .panel {
        padding: 0.5rem;
    }

    .chat-sidebar {
        width: 180px;
    }

    #designCanvas {
        max-width: min(55%, 480px);
    }

    .canvas-container- {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .studio-header {
        height: 36px;
        padding: 0.25rem 0.4rem;
    }

    .logo-img {
        height: 20px;
    }

    .design-title {
        font-size: 0.72rem;
    }

    .header-actions {
        gap: 0.3rem;
    }

    .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }

    .btn-icon {
        padding: 0.2rem 0.3rem;
        min-width: 24px;
    }

    .message-avatar {
        width: 22px;
        height: 22px;
    }

    .message-avatar i {
        font-size: 0.65rem;
    }

    .top-toolbar {
        padding: 0.2rem 0.35rem;
    }

    .tool-btn {
        width: 18px;
        height: 18px;
    }

    .tool-btn i {
        font-size: 0.5rem;
    }

    .tool-select {
        height: 18px;
        font-size: 0.55rem;
        min-width: 56px;
        padding: 0 0.1rem;
    }

    .tool-input {
        height: 18px;
        width: 28px;
        font-size: 0.55rem;
        padding: 0 0.1rem;
    }

    .toolbar-left {
        gap: 0.08rem;
    }

    .toolbar-separator {
        margin: 0 0.06rem;
        height: 14px;
    }

    .opacity-btn {
        width: 18px;
        height: 18px;
    }

    .opacity-btn i {
        font-size: 0.5rem;
    }

    .tool-color-picker,
    .color-picker-label {
        width: 18px;
        height: 18px;
    }

    .color-picker-label i {
        font-size: 0.5rem;
    }

    .bottom-toolbar {
        padding: 0.15rem 0.25rem;
    }

    .zoom-level {
        font-size: 0.6rem;
        min-width: 30px;
    }

    .chat-send-btn {
        width: 22px;
        height: 22px;
    }

    .chat-send-btn i {
        font-size: 0.55rem;
    }

    .chat-attach-btn {
        width: 22px;
        height: 22px;
    }

    .chat-attach-btn i {
        font-size: 0.55rem;
    }

    .chat-input {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }

    .chat-input-wrapper {
        max-width: 250px;
        margin: 0 0.3rem;
    }

    .chat-header {
        padding: 0.3rem 0.5rem;
    }

    .chat-header h3 {
        font-size: 0.65rem;
    }

    .chat-close-btn {
        font-size: 0.65rem;
    }

    .chat-messages {
        padding: 0.4rem;
        gap: 0.4rem;
    }

    .chat-message {
        gap: 0.25rem;
    }

    .message-content p {
        font-size: 0.6rem;
        line-height: 1.3;
        padding: 0.3rem 0.4rem;
        border-radius: 6px;
    }

    .message-avatar {
        width: 18px;
        height: 18px;
    }

    .message-avatar i {
        font-size: 0.5rem;
    }

    .sidebar {
        width: 140px;
    }

    .left-nav {
        width: 52px;
    }

    .panel {
        padding: 0.4rem;
    }

    .nav-btn {
        padding: 0.5rem 0.2rem;
        gap: 0.2rem;
        font-size: 0.6rem;
    }

    .nav-btn i {
        font-size: 0.9rem;
    }

    .nav-btn .nav-icon-letter {
        font-size: 1.1rem;
    }

    .chat-sidebar {
        width: 180px;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
    }

    #designCanvas {
        max-width: min(90%, 500px);
    }

    .designs-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .new-design-card {
        aspect-ratio: auto;
        padding: 0.4rem 0.5rem;
        flex-direction: row;
        gap: 0.5rem;
    }

    .new-design-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 0;
    }

    .new-design-icon i {
        font-size: 0.75rem;
    }

    .new-design-text {
        font-size: 0.68rem;
    }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background-color: #404040;
    border-radius: 12px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #b0b0b0;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Standalone Terms of Service page (terms.php) — override global body { overflow: hidden } */
html.terms-page-root {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
}

body.terms-standalone-body {
    margin: 0;
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #121212;
    color: #e8e8e8;
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
}

.terms-standalone {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.terms-standalone-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0.75rem 0 0.35rem;
    color: #fff;
}

.terms-meta {
    margin: 0;
    font-size: 0.875rem;
    color: #9a9a9a;
}

.terms-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #7dcea0;
    text-decoration: none;
}

.terms-back-link:hover {
    text-decoration: underline;
}

.terms-lead {
    font-size: 1.02rem;
    color: #dcdcdc;
}

.terms-notice {
    font-size: 0.9rem;
    color: #b0b0b0;
    border-left: 3px solid rgba(125, 206, 160, 0.5);
    padding-left: 1rem;
    margin: 1.25rem 0;
}

.terms-content section {
    margin-top: 1.75rem;
}

.terms-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.5rem;
}

.terms-content p {
    margin: 0.5rem 0;
    color: #c8c8c8;
    font-size: 0.95rem;
}

.terms-content ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.terms-content li {
    margin: 0.65rem 0;
    color: #c8c8c8;
    font-size: 0.95rem;
}

.terms-standalone-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.terms-standalone-footer a {
    color: #7dcea0;
    text-decoration: none;
}

.terms-standalone-footer a:hover {
    text-decoration: underline;
}

/* Modal: Terms links open in new tab */
.modal-body .auth-inline-link[href^="terms"] {
    color: #7dcea0;
}