@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
:root { --blue-900: #1e3a8a; --blue-800: #1e40af; --blue-700: #1d4ed8; --blue-600: #2563eb; --blue-100: #dbeafe; --blue-50: #eff6ff; --gray-900: #111827; --gray-800: #1f2937; --gray-700: #374151; --gray-600: #4b5563; --gray-500: #6b7280; --gray-400: #9ca3af; --gray-300: #d1d5db; --gray-200: #e5e7eb; --gray-100: #f3f4f6; --gray-50: #f9fafb;}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--gray-50); color: var(--gray-800); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden;}
a { text-decoration: none; transition: all 0.2s; }
ul { list-style: none; }
/* NAVBAR */
.navbar { background-color: var(--blue-900); color: white; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 50;}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 4rem; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; color: white; }
.nav-brand:hover { opacity: 0.8; }
.brand-logo { width: 2.5rem; height: 2.5rem; background: white; border-radius: 50%; padding: 0.25rem; display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--blue-900); font-size: 1.2rem;}
.brand-text { font-weight: 700; font-size: 1.25rem; }
.nav-menu { display: none; align-items: center; gap: 1.5rem; }
@media(min-width: 768px) { .nav-menu { display: flex; } }
.nav-link { color: var(--blue-100); font-size: 0.875rem; font-weight: 600; }
.nav-link:hover { color: white; }
.nav-link.active { color: white; border-bottom: 2px solid white; padding-bottom: 0.25rem; }
.btn-identita { background: white; color: var(--blue-900); padding: 0.5rem 1.25rem; border-radius: 0.375rem; font-weight: 700; font-size: 0.875rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.btn-identita:hover { background: var(--gray-100); }
/* CONTAINERS */
.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.container-md { max-width: 56rem; margin: 0 auto; padding: 0 1rem; }
/* BUTTONS */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; background: var(--blue-700); color: white; padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; border: none; cursor: pointer; transition: 0.2s;}
.btn-primary:hover { background: var(--blue-800); }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--gray-600); padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; border: 1px solid var(--gray-300); cursor: pointer; transition: 0.2s;}
.btn-outline:hover { background: var(--gray-50); color: var(--gray-900); border-color: var(--gray-400);}
.btn-icon { background: transparent; border: none; cursor: pointer; font-size: 1.125rem; color: var(--gray-400); transition: 0.2s; padding: 0.25rem; border-radius: 0.25rem;}
.btn-icon:hover { color: var(--gray-800); background: var(--gray-200); }
/* CARDS */
.card { background: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border: 1px solid var(--gray-100); padding: 2rem; margin-bottom: 1.5rem; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 0.5rem; }
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--blue-900); margin-bottom: 0.75rem; }
.prose p { margin-top: 1.25rem; margin-bottom: 1.25rem; font-size: 1.125rem; line-height: 1.6; color: var(--gray-600); }
.grid-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media(min-width: 768px) { .grid-layout.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid-layout.cols-2 { grid-template-columns: repeat(2, 1fr); } }
/* REKLAMA BANNER */
.banner-ad { width: 100%; background: transparent; color: var(--gray-400); text-align: center; padding: 1rem; border: 1px dashed var(--gray-300); border-radius: 0.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
/* LOGIN / REGISTER UI */
.login-body { display: flex; justify-content: center; align-items: center; background: var(--gray-100); min-height: 100vh; padding: 2rem 1rem; }
.login-card { width: 100%; max-width: 28rem; background: white; border-radius: 1rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border: 1px solid var(--gray-200); overflow: hidden; }
.login-header { background: var(--blue-900); padding: 2rem 1.5rem; text-align: center; }
.login-logo { width: 4rem; height: 4rem; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--blue-900); font-size: 1.5rem; margin: 0 auto 1rem; }
.login-header h2 { color: white; font-size: 1.5rem; margin-bottom: 0.25rem;}
.login-header p { color: var(--blue-100); font-size: 0.875rem;}
.login-form { padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.5rem; }
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: 0.5rem; font-family: inherit; font-size: 1rem; outline: none; transition: border-color 0.2s;}
.form-input:focus { border-color: var(--blue-600); }
.login-footer { background: var(--gray-50); padding: 1.5rem; text-align: center; border-top: 1px solid var(--gray-200); }
.login-footer a { color: var(--blue-700); font-size: 0.875rem; font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }
.radio-group { display: flex; gap: 1rem; margin-bottom: 1rem;}
.radio-group label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer; color: var(--gray-700); font-weight: 600;}
/* APP LAYOUT */
.app-layout { display: flex; max-width: 80rem; margin: 0 auto; gap: 2rem; padding: 2rem 1rem; flex-grow: 1; width: 100%; height: calc(100vh - 4rem);}
.app-sidebar { width: 16rem; flex-shrink: 0; display: flex; flex-direction: column; gap: 0.5rem; border-right: 1px solid var(--gray-200); padding-right: 1.5rem;}
.app-main { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto;}
.menu-item { padding: 0.75rem 1rem; border-radius: 0.5rem; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: 0.2s; display: flex; justify-content: space-between; align-items: center;}
.menu-item:hover { background: var(--gray-100); }
.menu-item.active { background: var(--blue-50); color: var(--blue-700); }
/* PORTAL */
.portal-top-bar { background: white; padding: 2rem 1rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.02);}
.portal-search { width: 100%; max-width: 50rem; position: relative;}
.portal-search input { width: 100%; padding: 1.25rem 2rem; border-radius: 3rem; border: 1px solid var(--gray-300); font-size: 1.125rem; box-shadow: 0 4px 10px rgba(0,0,0,0.05); outline: none; transition: 0.2s; }
.portal-search input:focus { border-color: var(--blue-600); box-shadow: 0 4px 15px rgba(37,99,235,0.15); }
.portal-search button { position: absolute; right: 0.5rem; top: 0.5rem; bottom: 0.5rem; background: var(--blue-600); color: white; border: none; border-radius: 2.5rem; padding: 0 2rem; font-weight: bold; font-size: 1rem; cursor: pointer; }
.portal-layout { display: flex; max-width: 80rem; margin: 0 auto; width: 100%; padding: 2rem 1rem; gap: 2rem; flex-grow: 1;}
.portal-main-col { flex-grow: 1; display: flex; flex-direction: column; gap: 1.5rem; min-width: 0;}
.portal-side-col { width: 22rem; flex-shrink: 0; display: flex; flex-direction: column; gap: 1.5rem;}
/* HORIZONTAL SCROLL & BIGGER APP BLOCK */
.portal-apps-container-wrapper { width: 100%; overflow-x: auto; padding-bottom: 1rem; padding-top: 1rem; min-height: 160px; display: flex; align-items: center; scrollbar-width: thin; }
.portal-apps { display: flex; flex-wrap: nowrap; gap: 2.5rem; padding: 0 1rem;}
.portal-app-link { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--gray-700); font-weight: 600; width: 5.5rem; position: relative;}
.portal-app-icon-wrapper { position: relative; display: block; }
.portal-app-icon { width: 4.5rem; height: 4.5rem; background: var(--gray-50); border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; border: 1px solid var(--gray-200); transition: 0.2s;}
.portal-app-link:hover .portal-app-icon { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); border-color: var(--blue-300); background: white;}
.portal-app-delete { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; border-radius: 50%; width: 1.5rem; height: 1.5rem; display: none; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem; cursor: pointer; z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.2);}
.edit-mode .portal-app-delete { display: flex; }
.edit-mode .portal-app-icon { animation: shake 0.5s infinite; }
@keyframes shake { 0% { transform: rotate(0deg); } 25% { transform: rotate(-2deg); } 50% { transform: rotate(0deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(0deg); } }
/* WIDGETS */
.widget { background: white; border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--gray-200); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.widget-header { font-weight: 700; color: var(--blue-900); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center;}
.widget-item { padding: 0.75rem 0; border-bottom: 1px solid var(--gray-50); display: flex; justify-content: space-between; align-items: center;}
.widget-item:last-child { border-bottom: none; }
.search-result-item { padding: 1rem; border-bottom: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 0.25rem;}
.search-result-item:last-child { border-bottom: none; }
.search-result-type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--blue-600);}
/* MODALS & OTHERS */
.captcha-box { border: 1px solid var(--gray-300); background: var(--gray-50); padding: 0.75rem; border-radius: 0.5rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem;}
.captcha-checkbox { width: 1.5rem; height: 1.5rem; cursor: pointer; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 9000;}
.modal-overlay.active { display: flex; }
.modal-box { background: white; width: 100%; max-width: 40rem; border-radius: 0.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.2); overflow: hidden; display: flex; flex-direction: column; max-height: 90vh;}
.modal-header { background: var(--gray-900); color: white; padding: 1rem 1.5rem; font-weight: bold; display: flex; justify-content: space-between; align-items: center;}
.modal-close { background: transparent; color: white; border: none; cursor: pointer; font-size: 1.25rem;}
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; overflow-y:auto;}
.modal-textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--gray-300); border-radius: 0.25rem; outline: none; font-family: inherit; min-height: 200px; resize: none;}
/* DOCKED COMPOSE (MAIL) */
.compose-dock { position: fixed; bottom: 0; right: 2rem; width: 450px; background: white; border-radius: 0.5rem 0.5rem 0 0; box-shadow: 0 -4px 15px rgba(0,0,0,0.15); display: none; flex-direction: column; z-index: 100; border: 1px solid var(--gray-300); transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);}
.compose-dock.active { display: flex; }
.compose-dock.maximized { width: 800px !important; height: 80vh !important; bottom: 0 !important; right: 2rem !important; border-radius: 0.5rem 0.5rem 0 0 !important; z-index: 9999 !important; box-shadow: 0 -4px 30px rgba(0,0,0,0.3) !important;}
.compose-dock.maximized .compose-textarea { flex-grow: 1; height: 100%; }
.compose-dock.maximized .compose-body { flex-grow: 1; display:flex; flex-direction:column; }
.compose-header { background: var(--gray-900); color: white; padding: 0.75rem 1rem; border-radius: 0.5rem 0.5rem 0 0; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.compose-dock.maximized .compose-header { border-radius: 0.5rem 0.5rem 0 0 !important; }
.compose-body { padding: 1rem; display: flex; flex-direction: column; }
.compose-input { border: none; border-bottom: 1px solid var(--gray-200); padding: 0.75rem 0; outline: none; font-family: inherit; font-size: 0.95rem;}
.compose-textarea { border: none; outline: none; font-family: inherit; resize: none; height: 250px; padding: 0.75rem 0; font-size: 0.95rem; overflow-y: auto;}
.compose-textarea:empty:before { content: attr(placeholder); color: var(--gray-400); pointer-events: none; display: block; }

/* CHECKBOXES & MULTI-SELECT */
.multi-select-checkbox { width: 1.125rem; height: 1.125rem; cursor: pointer; border-radius: 0.25rem; }
.note-checkbox { position: absolute; bottom: 0.75rem; right: 0.75rem; z-index: 10; display:none; }
.note-card:hover .note-checkbox, .note-checkbox:checked { display:block; }
.bulk-action-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--gray-900); color: white; padding: 1rem 2rem; border-radius: 1rem 1rem 0 0; z-index: 9000; box-shadow: 0 -4px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 2rem; font-weight: 600;}
.bulk-action-bar.active { transform: translateX(-50%) translateY(0); }
/* POZNAMKY (AKTUALIZOVÁNO PRO MENU) */
.note-card { background: white; border: 1px solid var(--gray-200); border-radius: 0.5rem; padding: 1.25rem; padding-top:2.5rem; cursor: pointer; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position:relative;}
.note-card:hover { border-color: var(--blue-300); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.note-title { font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; font-size: 1.125rem;}
.note-preview { font-size: 0.875rem; color: var(--gray-500); line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word; overflow: hidden;}
.note-badge { position: absolute; top: 1rem; left: 1rem; font-size: 0.65rem; background: var(--gray-100); color: var(--gray-600); padding: 0.15rem 0.5rem; border-radius: 1rem; font-weight:bold; text-transform:uppercase;}
.note-menu-btn { position: absolute; top: 0.75rem; right: 0.75rem; font-size: 1.25rem; font-weight: bold; cursor: pointer; color: var(--gray-400); line-height: 1; padding: 0 0.5rem; transition: 0.2s; z-index: 5;}
.note-menu-btn:hover { color: var(--gray-900); }
.note-dropdown { display: none; position: absolute; top: 2.25rem; right: 0.5rem; background: white; border: 1px solid var(--gray-200); border-radius: 0.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 50; flex-direction: column; min-width: 180px; overflow: hidden; }
.note-dropdown.active { display: flex; }
.note-dropdown-item { padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--gray-700); cursor: pointer; border-bottom: 1px solid var(--gray-100); transition: 0.2s; }
.note-dropdown-item:hover { background: var(--gray-50); color: var(--blue-600); }
.note-dropdown-item:last-child { border-bottom: none; }

/* KALENDAR */
.cal-header-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; flex-shrink: 0; }
.cal-wrapper { flex-grow: 1; display: flex; flex-direction: column; border: 1px solid var(--gray-200); border-radius: 0.5rem; overflow: hidden; background: var(--gray-200); gap: 1px; min-height: 0; }
.cal-days-header { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--gray-100); gap: 1px; flex-shrink: 0;}
.cal-day-title { padding: 0.75rem; text-align: center; font-weight: 600; font-size: 0.875rem; color: var(--gray-600); background: var(--gray-50);}
.cal-grid { flex-grow: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; min-height: 0; } 
.cal-cell { background: white; padding: 0.5rem; display:flex; flex-direction:column; height: 100%; min-height: 80px; cursor:pointer; transition:0.2s;}
.cal-cell:hover { background: var(--blue-50) !important; }
.cal-cell-header { font-weight: 600; font-size: 0.875rem; color: var(--gray-500); text-align: right; margin-bottom: 0.5rem;}
.cal-cell.weekend { background: var(--gray-50); }
.cal-cell.today { background: #fefce8; }
.cal-cell.today .cal-cell-header { color: var(--blue-600); font-weight: 800; }
.event-chip { color: white; background: var(--blue-600); font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; margin-bottom: 0.25rem; cursor:pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.app-main.calendar-main { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
/* MAIL */
.mail-list-panel { flex-grow: 1; width: 100%; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; background: white; }
.mail-list-panel.split { flex-grow: 0; width: 26rem; flex-shrink: 0; }
.mail-item { padding: 1.25rem; border-bottom: 1px solid var(--gray-100); cursor: pointer; display: flex; gap: 1rem; background: white; align-items:center; flex-shrink:0;}
.mail-item:hover { background: var(--gray-50); }
.mail-item.unread { background: var(--blue-50); }
.mail-item.selected { background: var(--blue-50); border-left: 4px solid var(--blue-600); padding-left: calc(1.25rem - 4px); }
.mail-avatar { width: 2.5rem; height: 2.5rem; background: var(--blue-200); color: var(--blue-900); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink:0;}
.mail-content { flex-grow: 1; overflow: hidden;}
.mail-header-row { display: flex; justify-content: space-between; margin-bottom: 0.25rem; align-items:center;}
.mail-sender { font-weight: 800; color: var(--gray-900); }
.mail-time { font-size: 0.75rem; color: var(--gray-500); }
.mail-subject { font-weight: 700; font-size: 0.95rem; color: var(--gray-900); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.mail-snippet { font-size: 0.875rem; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.mail-actions { display: flex; gap: 0.5rem; opacity: 0; transition: opacity 0.2s;}
.mail-item:hover .mail-actions { opacity: 1; }
.mail-detail-pane { display: none; background: white; padding: 2rem; flex-grow: 1; overflow-y:auto;}
/* CHAT MESSENGER */
.chat-messages { flex-grow: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; background: var(--gray-50);}
.chat-bubble { max-width: 75%; padding: 1rem 1.25rem; border-radius: 1rem; font-size: 1rem; line-height: 1.5;}
.chat-bubble.bot { background: white; border: 1px solid var(--gray-200); align-self: flex-start; border-bottom-left-radius: 0;}
.chat-bubble.user { background: var(--blue-600); color: white; align-self: flex-end; border-bottom-right-radius: 0;}
.chat-input-area { padding: 1rem 1.5rem; background: white; border-top: 1px solid var(--gray-200); display: flex; gap: 1rem; }
.chat-input { flex-grow: 1; padding: 1rem 1.5rem; border: 1px solid var(--gray-300); border-radius: 2rem; outline: none; font-size:1rem; }
/* BUILDER UI */
.builder-layout { display: flex; height: calc(100vh - 4.5rem); overflow: hidden; background: #f1f3f4; width: 100%;}
.builder-sidebar-right { width: 320px; background: white; border-left: 1px solid var(--gray-200); display: flex; flex-direction: column; flex-shrink:0; z-index: 10;}
.builder-canvas-area { flex-grow: 1; padding: 2rem; overflow-y: auto; display: flex; flex-direction: column; align-items: center; position:relative; }
.builder-canvas { width: 100%; max-width: 1000px; background: white; min-height: 800px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 0; display:flex; flex-direction:column; }
.gsite-tabs { display:flex; border-bottom:1px solid var(--gray-200); }
.gsite-tab { flex:1; text-align:center; padding: 1rem; font-weight:600; cursor:pointer; color:var(--gray-500); border-bottom: 2px solid transparent;}
.gsite-tab.active { color:var(--blue-700); border-bottom-color: var(--blue-700); }
.gsite-tab-content { padding: 1.5rem; overflow-y:auto; flex-grow:1; }
.gsite-tool-btn { padding: 1rem; background: white; border: 1px solid var(--gray-200); border-radius: 0.5rem; text-align: center; cursor: pointer; font-weight: 600; font-size: 0.875rem; transition:0.2s; color:var(--gray-700);}
.gsite-tool-btn:hover { background: var(--blue-50); border-color: var(--blue-200); color:var(--blue-700);}
.gsite-layout-btn { padding: 1rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 0.5rem; text-align: left; cursor: pointer; font-weight: 600; font-size: 0.875rem; transition:0.2s; color:var(--gray-700);}
.gsite-layout-btn:hover { background: var(--blue-50); border-color: var(--blue-200); color:var(--blue-700);}
.gsite-element { position:relative; transition:0.2s; border: 2px solid transparent; margin: 1.5rem 0;}
.gsite-element:hover { border-color: var(--blue-100); }
.gsite-controls { position:absolute; right: 10px; top: -15px; display:none; flex-direction:row; gap:0.5rem; z-index:100; background:white; padding:0.25rem; border-radius:0.5rem; box-shadow:0 2px 10px rgba(0,0,0,0.1); border:1px solid var(--gray-200);}
.gsite-element:hover .gsite-controls { display:flex; }
.gsite-controls button { background:transparent; border:none; width:30px; height:30px; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:0.25rem; font-size:1rem;}
.gsite-controls button:hover { background:var(--gray-100); }
.footer { background: var(--gray-900); color: var(--gray-400); padding: 1.5rem; text-align: center; font-size: 0.875rem; margin-top: auto; z-index: 100; position:relative;}

/* =====================================================================
   PŘEVZATO Z PŘEDCHOZÍ VERZE – napojení na PHP backend, PlaxMail příloh/HTML,
   kancelářské aplikace a GDPR/cookie prvky (nové UI beta 1.1 tyto třídy nemá,
   ale používají je stránky, které se dnes neupravují, a PlaxMail, kde se
   přílohy/HTML skutečně posílají)
   ===================================================================== */
.mail-view-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.mail-cc-row { color: var(--gray-500); font-size: 0.875rem; margin-top: 0.25rem; }
.mail-html-frame { width: 100%; border: none; display: block; min-height: 3rem; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }
.attachment-chip { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--gray-200); border-radius: 0.5rem; padding: 0.5rem 0.75rem; background: var(--gray-50); cursor: pointer; text-decoration: none; color: var(--gray-800); transition: 0.15s; max-width: 220px; }
.attachment-chip:hover { background: var(--blue-50); border-color: var(--blue-200); }
.attachment-chip .attachment-icon { font-size: 1.5rem; flex-shrink: 0; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; }
.attachment-chip .attachment-icon img { width: 2rem; height: 2rem; object-fit: cover; border-radius: 0.25rem; }
.attachment-chip .attachment-info { overflow: hidden; }
.attachment-chip .attachment-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-chip .attachment-size { font-size: 0.75rem; color: var(--gray-500); }
.compose-toolbar { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); }
.compose-cc-toggle { font-size: 0.8rem; color: var(--blue-600); cursor: pointer; background: none; border: none; padding: 0; }
.compose-attachments { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.compose-attachment-chip { display: flex; align-items: center; gap: 0.4rem; background: var(--gray-100); border-radius: 1rem; padding: 0.3rem 0.6rem 0.3rem 0.75rem; font-size: 0.8rem; max-width: 200px; }
.compose-attachment-chip span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-attachment-chip button { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 1rem; line-height: 1; padding: 0; }
.compose-attachment-chip button:hover { color: var(--gray-900); }

/* Hlášky přihlášení/registrace a chyby načítání dat */
.flash { padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; margin-bottom: 1.25rem; border: 1px solid transparent; }
.flash-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
/* Odhlášení je formulář (POST + CSRF), vypadá jako odkaz */
.inline-form { display: inline; }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--blue-600); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
/* Cloudflare Turnstile – widget potřebuje šířku alespoň 300px */
.turnstile-box { margin-bottom: 1.25rem; min-height: 65px; }
.turnstile-noscript { font-size: 0.875rem; font-weight: 600; color: #991b1b; }
@media (max-width: 400px) { .login-body { padding-left: 0.5rem; padding-right: 0.5rem; } .login-form { padding-left: 1rem; padding-right: 1rem; } }
/* PlaxChat – jméno odesílatele ve skupině */
.chat-sender { display: block; font-size: 0.75rem; font-weight: 700; color: var(--gray-500); margin-bottom: 0.15rem; }
.chat-time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 0.25rem; }
.chat-empty { color: var(--gray-500); text-align: center; margin: auto; }
/* Sdílená poznámka v PlaxChatu – karta uvnitř bubliny, ne prostý text (viz sendNoteChat()). */
.chat-note-card { background: rgba(0,0,0,0.055); border: 1px solid rgba(0,0,0,0.08); border-radius: 0.5rem; padding: 0.75rem 0.9rem; min-width: 200px; }
.chat-note-card-header { display: flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.65; margin-bottom: 0.5rem; }
.chat-note-card-icon { font-size: 0.95rem; }
.chat-note-card-title { font-weight: 700; margin-bottom: 0.35rem; }
.chat-note-card-content { font-size: 0.9rem; white-space: pre-wrap; opacity: 0.9; }

/* =====================================================================
   KANCELÁŘSKÉ APLIKACE (Dokumenty, Tabulky, Prezentace) & COOKIE BANNER
   ===================================================================== */
.doc-card { transition: 0.2s; position: relative; }
.doc-checkbox { position: absolute; bottom: 1.25rem; right: 1.5rem; z-index: 10; display: none; }
.doc-card:hover .doc-checkbox, .doc-checkbox:checked { display: block; }

/* ---------- PLAX TABULKY ---------- */
.sheet-editor-container { display: flex; flex-direction: column; height: 100vh; width: 100%; position: absolute; top: 0; left: 0; z-index: 1000; background: var(--gray-50); }
.sheet-toolbar-btn { background: transparent; border: 1px solid transparent; border-radius: 0.25rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-700); font-weight: 600; transition: 0.2s; font-size: 0.95rem; }
.sheet-toolbar-btn:hover { background: var(--gray-100); color: var(--gray-900); }
.formula-bar { display: flex; padding: 0.5rem 1.5rem; background: white; border-bottom: 1px solid var(--gray-200); align-items: center; gap: 1rem; font-family: monospace; }
.formula-input { flex-grow: 1; border: 1px solid var(--gray-300); padding: 0.35rem 0.75rem; border-radius: 0.25rem; outline: none; font-size: 0.875rem; font-family: inherit; }
.formula-input:focus { border-color: var(--blue-600); }
.sheet-wrapper { flex-grow: 1; overflow: auto; background: white; }
.sheet-table { border-collapse: collapse; min-width: 100%; background: white; table-layout: fixed; }
.sheet-table th, .sheet-table td { border: 1px solid var(--gray-300); min-width: 120px; height: 28px; padding: 0; margin: 0; position: relative; }
.sheet-table th { background: var(--gray-100); text-align: center; color: var(--gray-600); font-weight: 600; font-size: 0.8rem; user-select: none; position: sticky; top: 0; z-index: 10; }
.sheet-table th:first-child { width: 50px; min-width: 50px; left: 0; z-index: 11; }
.sheet-table td:first-child { background: var(--gray-100); text-align: center; color: var(--gray-600); font-weight: 600; font-size: 0.8rem; position: sticky; left: 0; z-index: 9; }
.cell-input { width: 100%; height: 100%; border: none; outline: none; padding: 0 6px; font-family: inherit; font-size: 0.875rem; background: transparent; }
.sheet-table td.selected { border: 2px solid var(--blue-600); z-index: 5; }

/* ---------- PLAX DOKUMENTY ---------- */
.doc-editor-container { display: flex; flex-direction: column; min-height: 100vh; width: 100%; position: absolute; top: 0; left: 0; z-index: 1000; background: var(--gray-100); }
.doc-toolbar-btn { background: transparent; border: 1px solid transparent; border-radius: 0.25rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-700); font-size: 1rem; font-weight: 600; transition: 0.2s; }
.doc-toolbar-btn:hover { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-900); }
.doc-canvas-wrapper { flex-grow: 1; overflow-y: auto; padding: 3rem 1rem; display: flex; flex-direction: column; align-items: center; background: var(--gray-100); gap: 2rem; }
.doc-page {
    width: 21cm;
    height: 29.7cm;
    min-height: 29.7cm;
    max-height: 29.7cm;
    background-color: white;
    padding: 2.5cm;
    outline: none;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-900);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.doc-page:focus { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.doc-page h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; margin-top: 1.5rem; color: var(--gray-900); }
.doc-page h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; margin-top: 1.5rem; color: var(--gray-900); }
.doc-page h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; margin-top: 1.25rem; color: var(--gray-900); }
.doc-page ul, .doc-page ol { margin-left: 2rem; margin-bottom: 1rem; }
.doc-page ul { list-style-type: disc; }
.doc-page ol { list-style-type: decimal; }
.doc-page p { margin-bottom: 1rem; min-height: 1.6em; }

/* ---------- PLAX PREZENTACE ---------- */
.editor-main-area { display: flex; flex-grow: 1; overflow: hidden; }
.slides-sidebar { width: 16rem; background: var(--gray-50); border-right: 1px solid var(--gray-200); padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; flex-shrink: 0; }
.slide-thumb-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; background: white; border: 2px solid var(--gray-200); border-radius: 0.25rem; cursor: pointer; overflow: hidden; transition: 0.2s; }
.slide-thumb-wrapper:hover { border-color: var(--blue-300); }
.slide-thumb-wrapper.active { border-color: var(--blue-600); box-shadow: 0 0 0 2px var(--blue-100); }
.slide-thumb-content { width: 1280px; height: 720px; transform-origin: 0 0; pointer-events: none; padding: 3rem; box-sizing: border-box; }
.slide-thumb-delete { position: absolute; top: 0.25rem; right: 0.25rem; background: rgba(239, 68, 68, 0.9); color: white; width: 1.5rem; height: 1.5rem; border-radius: 0.25rem; display: none; align-items: center; justify-content: center; font-size: 0.875rem; border: none; cursor: pointer; z-index: 10; }
.slide-thumb-wrapper:hover .slide-thumb-delete { display: flex; }
.slide-page { width: 100%; max-width: 1280px; aspect-ratio: 16/9; background-color: white; padding: 4rem; outline: none; font-size: 1.5rem; line-height: 1.4; color: var(--gray-900); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: 0.2s; }
.slide-page:focus { box-shadow: 0 8px 30px rgba(0,0,0,0.15); border: 1px solid var(--blue-200); }
.slide-page h1 { font-size: 4.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--gray-900); }
.slide-page h2 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; color: var(--gray-900); }
.slide-page h3 { font-size: 2rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--gray-900); }
.slide-page ul, .slide-page ol { margin-left: 3rem; margin-bottom: 1.5rem; text-align: left; }
.slide-page ul { list-style-type: disc; }
.slide-page p { margin-bottom: 1.5rem; min-height: 1.4em; }

/* ---------- COOKIE BANNER ---------- */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--gray-900); color: white; padding: 1rem 1.5rem; z-index: 99999; box-shadow: 0 -4px 15px rgba(0,0,0,0.15); border-top: 1px solid var(--gray-800); }
.cookie-banner-inner { max-width: 80rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cookie-banner-text { font-size: 0.875rem; color: var(--gray-300); line-height: 1.5; flex-grow: 1; }
.cookie-banner-text a { color: var(--blue-300); text-decoration: underline; }
.cookie-banner-text a:hover { color: white; }
.cookie-banner-actions { display: flex; gap: 0.75rem; align-items: center; flex-shrink: 0; }
.cookie-btn-accept { background: var(--blue-600); color: white; border: none; padding: 0.5rem 1.25rem; border-radius: 0.375rem; font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: 0.2s; }
.cookie-btn-accept:hover { background: var(--blue-700); }
.cookie-btn-info { background: transparent; color: var(--gray-300); border: 1px solid var(--gray-600); padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; text-decoration: none; transition: 0.2s; }
.cookie-btn-info:hover { color: white; border-color: var(--gray-400); }


/* =====================================================================
   MOBIL A TABLET – přizpůsobení pro menší obrazovky (2026-09-26, Beta 1.1)
   ===================================================================== */
@media (hover: none), (pointer: coarse) {
    .mail-actions { opacity: 1; }
    .doc-checkbox { display: block; }
    .slide-thumb-delete { display: flex; }
    .gsite-controls { display: flex; }
    .portal-app-delete { display: none; }
    .edit-mode .portal-app-delete { display: flex; }
}
@media (max-width: 1024px) {
    .nav-menu { display: flex; }
    .doc-canvas-wrapper, .sheet-wrapper { overflow-x: auto; }
}
@media (max-width: 768px) {
    .nav-inner { padding: 0 0.75rem; height: 3.5rem; }
    .brand-text { font-size: 1rem; }
    .brand-logo { width: 2rem; height: 2rem; font-size: 1rem; }
    .nav-menu { gap: 0.75rem; }
    .btn-identita { padding: 0.4rem 0.75rem; font-size: 0.8rem; white-space: nowrap; }
    .portal-top-bar { padding: 1rem 0.75rem; }
    .portal-search input { padding: 0.9rem 1.25rem; font-size: 1rem; }
    .portal-search button { padding: 0 1.25rem; font-size: 0.9rem; }
    .portal-layout { flex-direction: column; padding: 1rem 0.75rem; gap: 1rem; }
    .portal-side-col { width: 100%; }
    .portal-apps { gap: 1.25rem; }
    .portal-app-icon { width: 3.75rem; height: 3.75rem; font-size: 1.5rem; }
    .portal-app-link { width: 4.5rem; font-size: 0.8rem; }
    .app-layout { padding: 0.75rem 0.5rem; gap: 0.75rem; height: auto; min-height: calc(100vh - 3.5rem); }
    .app-layout > div[style*="display:flex"] { flex-direction: column !important; height: auto !important; }
    .app-sidebar {
        width: 100%; max-height: 40vh; overflow-y: auto;
        border-right: none; border-bottom: 1px solid var(--gray-200);
        padding-right: 0; padding-bottom: 0.75rem; flex-shrink: 0;
    }
    .app-main { height: auto; min-height: 60vh; }
    .app-main.calendar-main { min-height: 70vh; }
    .mail-list-panel.split { display: none; }
    .mail-detail-pane { padding: 1.25rem 1rem; width: 100%; }
    .mail-detail-pane h1 { font-size: 1.35rem !important; }
    .mail-detail-pane > div:first-child > div[style*="justify-content:space-between"] {
        flex-direction: column !important; align-items: flex-start !important; gap: 0.25rem;
    }
    .mail-item { padding: 1rem 0.75rem; }
    .compose-dock {
        left: 0; right: 0; bottom: 0; width: 100% !important; max-width: 100%;
        border-radius: 0.75rem 0.75rem 0 0; max-height: 85vh;
    }
    .compose-dock.maximized { height: 92vh !important; }
    .compose-body { padding: 0.85rem; }
    .compose-toolbar { flex-wrap: wrap; gap: 0.5rem !important; }
    .compose-toolbar button { padding: 0.4rem 0.6rem !important; font-size: 0.8rem !important; }
    .cal-cell { padding: 0.25rem; min-height: 56px; }
    .cal-cell-header { font-size: 0.75rem; margin-bottom: 0.25rem; }
    .cal-day-title { padding: 0.4rem 0.15rem; font-size: 0.7rem; }
    .event-chip { font-size: 0.65rem; padding: 0.15rem 0.3rem; }
    .cal-header-row { flex-wrap: wrap; gap: 0.5rem; }
    .chat-bubble { max-width: 88%; }
    .chat-note-card { min-width: 0; }
    .chat-messages { padding: 1rem 0.75rem; }
    .chat-input-area { padding: 0.75rem; }
    #active-chat-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #active-chat-actions { gap: 0.35rem !important; flex-shrink: 0; }
    #active-chat-actions button { padding: 0.35rem 0.5rem !important; font-size: 0.7rem !important; white-space: nowrap; }
    .login-header { padding: 1.5rem 1rem; }
    .login-form { padding: 1.5rem 1.25rem; }
    .modal-box { max-width: calc(100% - 1.5rem); margin: 0 0.75rem; }
    .builder-layout { flex-direction: column; height: auto; min-height: calc(100vh - 4.5rem); }
    .builder-sidebar-right { width: 100%; border-left: none; border-top: 1px solid var(--gray-200); }
    .builder-topbar { flex-wrap: wrap; height: auto !important; padding: 0.75rem !important; gap: 0.5rem; }
    .slides-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--gray-200); }
    .slides-sidebar .slide-thumb-wrapper { width: 8rem; flex-shrink: 0; }
    .editor-main-area { flex-direction: column; }
    .doc-page { padding: 1.25cm; }
    .doc-toolbar-btn, .sheet-toolbar-btn { width: 36px; height: 36px; }
    .footer p:last-child { line-height: 1.8; }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-banner-actions a, .cookie-banner-actions button { flex: 1; text-align: center; }
}
@media (max-width: 400px) {
    .brand-text { display: none; }
    .portal-app-icon { width: 3.25rem; height: 3.25rem; font-size: 1.25rem; }
    .portal-app-link { width: 4rem; }
    .cal-cell { min-height: 44px; }
}
