/* Cloud nach Entwurf (Cloud.dc.html). Werte 1:1 aus den Inline-Styles des Entwurfs. */
.cl-page .ph.cl-ph { margin-bottom: 24px; }
/* Entwurf: Titel und die beiden Knoepfe bleiben auch am Handy in einer Zeile */
.cl-page .ph.cl-ph .tt { flex: 1 1 auto; }
.cl-page .ph.cl-ph .acts { flex: 0 0 auto; }
.cl-page .ph.cl-ph .acts .btn.primary { flex: none; }
.cl-kicker a { color: inherit; text-decoration: none; }
.cl-kicker a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.cl-ksep { margin: 0 6px; opacity: .6; }

/* Raster: Hauptspalte und rechts 300px (ab 1180), darunter einspaltig */
.cl-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1180px) { .cl-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (min-width: 1600px) { .cl-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.cl-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cl-main > .msg:empty { display: none; }

/* Werkzeugleiste */
.cl-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cl-tools .btn.cl-t { height: 44px; padding: 0 14px; gap: 6px; border-radius: 12px; border-color: #D3C8B7; background: #FBF9F5; font-size: 14px; font-weight: 600; }
.cl-tools .btn.cl-t.danger { color: #A8432F; }
.cl-tools .cl-o3 { order: 3; }
.cl-search { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid #D3C8B7; border-radius: 12px; background: #FBF9F5; cursor: text; min-width: 0; }
.cl-search .ic { font-size: 17px; color: #736B5F; }
.cl-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: 400 15px/1 var(--sans); color: var(--ink); outline: none; }
.cl-search input::placeholder { color: #8E8474; }
.cl-search input::-webkit-search-cancel-button { opacity: .5; }
.cl-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.cl-view { display: flex; gap: 2px; background: #EFE9DF; border-radius: 12px; padding: 4px; flex: none; }
.cl-view button { width: 38px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cl-view button .ic { font-size: 16px; }
.cl-view button.on { background: #FBF9F5; box-shadow: 0 1px 3px rgba(46, 44, 41, .12); }

/* Symbolkachel je Art */
.cl-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; font-size: 24px; }
.cl-ic.k-folder { background: #FDE8D7; color: #A9763F; }
.cl-ic.k-pdf { background: #F8E9E4; color: #A8432F; }
.cl-ic.k-image { background: #EEF3E8; color: #5F7F40; }
.cl-ic.k-other { background: #EFE9DF; color: #5A544B; }
.cl-more { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #5A544B; cursor: pointer; }
.cl-more .ic { font-size: 18px; }
.cl-more:hover { background: #EFE9DF; }
.cl-more-sp { width: 36px; flex: none; }
.cl-n { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-m { display: block; font-size: 13px; color: #736B5F; }

/* Kacheln */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.cl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 18px; border: 1px solid #E2DACB; border-radius: 18px; background: #FBF9F5; text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.cl-card:hover { border-color: #C9BBA5; background: #FFFDF9; }
.cl-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cl-card .cl-top { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cl-card .cl-tx { min-width: 0; width: 100%; }
.cl-card[data-trash], .cl-row[data-trash] { opacity: .8; }

/* Liste */
.cl-listbox { background: #FBF9F5; border: 1px solid #E2DACB; border-radius: 18px; overflow: hidden; }
.cl-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 10px 10px 16px; border-top: 1px solid #EAE3D6; background: transparent; text-align: left; cursor: pointer; }
.cl-row:first-child { border-top: 0; }
.cl-row:hover { background: #FFFDF9; }
.cl-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cl-row .cl-ic { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; }
.cl-row > .cl-n { flex: 1; min-width: 0; }
.cl-row > .cl-m { white-space: nowrap; }
.cl-row .cl-more { width: 36px; height: 36px; }
@media (max-width: 767px) { .cl-row > .cl-m { max-width: 46%; overflow: hidden; text-overflow: ellipsis; } }

/* Uploads */
.cl-uploads .cl-row { cursor: default; }
.cl-uploads .cl-row:hover { background: transparent; }
.cl-upmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-progress { display: block; height: 6px; border-radius: 5px; background: rgba(46, 44, 41, .06); overflow: hidden; }
.cl-progress i { display: block; width: 100%; height: 100%; background: #FBC49D; border-radius: inherit; transform-origin: left center; transition: transform 200ms var(--ease-out); }
.cl-up.done .cl-progress i { background: #6F8F4E; }
.cl-err { color: #A8432F; font-weight: 600; }
.cl-upfoot { display: flex; justify-content: flex-end; padding: 6px 10px; border-top: 1px solid #EAE3D6; }
@media (max-width: 767px) { .cl-up { flex-wrap: wrap; } .cl-up > .cl-m { order: 3; flex: 1 1 100%; padding-left: 52px; max-width: none; } }

.cl-empty { padding: 24px; text-align: center; color: #736B5F; font-size: 14px; }
.cl-found { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5A544B; font-size: 14px; }
.cl-hint { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: #5A544B; font-size: 14px; }
.cl-hint .ic { font-size: 17px; color: #A9763F; margin-top: 2px; }

/* Ablageflaeche */
.cl-drop { display: flex; align-items: center; gap: 16px; width: 100%; padding: 22px; border: 1.5px dashed #D3C8B7; border-radius: 18px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.cl-drop:hover, .cl-drop.over { border-color: #A9763F; background: #FDF6EF; }
.cl-drop .cl-ic { font-size: 22px; }
.cl-drop b { display: block; font-weight: 600; }
.cl-drop .s { display: block; font-size: 14px; color: #736B5F; }

/* Rechte Spalte */
.cl-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cl-store { background: #FDF1E7; color: var(--ink); border: 1px solid #F3D5BB; border-radius: 20px; padding: 22px; }
.cl-store .k { font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #A9763F; }
.cl-store .v { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cl-store .v b { font: 400 40px/1 var(--serif); }
.cl-store .v span { color: #5A544B; font-size: 14px; }
.cl-meter { height: 8px; border-radius: 5px; background: rgba(46, 44, 41, .06); margin-top: 14px; overflow: hidden; }
.cl-meter i { display: block; height: 100%; background: #FBC49D; border-radius: 5px; }
.cl-trashbtn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid #E2DACB; border-radius: 16px; background: #FBF9F5; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color 150ms ease; }
.cl-trashbtn:hover { background: #FFFDF9; }
.cl-trashbtn .ic { font-size: 18px; color: #736B5F; }
.cl-trashbtn b { flex: 1; font-weight: 600; }
.cl-trashbtn span { font-size: 13px; color: #736B5F; }
.cl-trashbtn.on { background: #FDE8D7; border-color: #F6CFAF; }

/* Aktionsblatt (max 400) */
@media (min-width: 768px) { .dlg.cl-act { max-width: 400px; } .dlg.cl-namedlg { max-width: 420px; } }
.dlg.cl-act .dlg-h { align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid #E2DACB; }
.dlg.cl-act .dlg-h .cl-ic { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; }
.cl-acthead { flex: 1; min-width: 0; }
.cl-acthead .cl-n { font-weight: 700; font-size: 16px; }
.dlg.cl-act .dlg-b { padding: 8px; }
.cl-acts { display: flex; flex-direction: column; }
.cl-acts button { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 600 15px/1.2 var(--sans); text-align: left; cursor: pointer; }
.cl-acts button .ic { font-size: 19px; }
.cl-acts button:hover:not(:disabled) { background: #F4F1EA; }
.cl-acts button.danger { color: #A8432F; }
.cl-moves button { height: 48px; padding-left: calc(14px + var(--d, 0) * 20px); }
.cl-moves button .ic { color: #A9763F; }
.cl-moves button:disabled { cursor: default; color: #736B5F; }
.cl-moves button .tag { margin-left: auto; }
.cl-move-h { padding: 6px 14px 6px; font-size: 14px; font-weight: 600; }
.cl-deltxt { margin: 0; padding: 10px 14px; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.btn.cl-danger { background: #A8432F; border-color: #A8432F; color: #FBF9F5; font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .btn.cl-danger:hover:not(:disabled) { background: #93391F; border-color: #93391F; } }

/* Name-Dialog */
.cl-nf { display: flex; flex-direction: column; gap: 8px; }
.cl-dup { font-size: 13px; color: #A8432F; font-weight: 600; }
.btn.cl-off { opacity: .5; }

/* Vorschau */
.cl-preview { display: flex; justify-content: center; align-items: center; min-height: 200px; background: #EFE9DF; border-radius: 14px; overflow: hidden; }
.cl-pv-img { display: block; max-width: 100%; max-height: 68vh; object-fit: contain; }
.cl-pv-frame { display: block; width: 100%; height: 68vh; border: 0; background: #fff; }

/* Ablegen ueberall */
.cl-page.cl-dragging .cl-drop { border-color: #A9763F; background: #FDF6EF; }
