/* Orbitworks Files: public portal. Colours come from the portal's CSS variables (set in Files → Settings). */
.owf-portal {
	--owf-accent: #04ac89;
	--owf-bg: #f7f9fa;
	--owf-card: #ffffff;
	--owf-text: #16273d;
	--owf-mute: color-mix(in srgb, var(--owf-text) 58%, transparent);
	--owf-line: color-mix(in srgb, var(--owf-text) 10%, transparent);
	--owf-soft: color-mix(in srgb, var(--owf-accent) 10%, var(--owf-card));
	--owf-radius: 18px;
	--owf-font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-family: var(--owf-font);
	color: var(--owf-text);
	background: var(--owf-bg);
	border-radius: 28px;
	padding: 24px;
	box-sizing: border-box;
	line-height: 1.45;
}
.owf-portal *, .owf-portal *::before, .owf-portal *::after { box-sizing: border-box; }
.owf-portal [hidden] { display: none !important; }
.owf-portal button { font: inherit; cursor: pointer; }
.owf-portal input, .owf-portal select { font: inherit; color: inherit; }

/* Buttons */
.owf-btn {
	display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 18px; border: 1px solid var(--owf-line);
	background: var(--owf-card); color: var(--owf-text); font-weight: 600; font-size: 14px; line-height: 1; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.owf-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(22, 39, 61, .35); }
.owf-btn:active { transform: translateY(0); }
.owf-btn-primary { background: var(--owf-accent); border-color: var(--owf-accent); color: #fff; }
.owf-btn-primary:hover { filter: brightness(1.05); }
.owf-btn-ghost { background: transparent; border-color: transparent; color: var(--owf-mute); padding: 10px; }
.owf-btn-ghost:hover { background: var(--owf-line); box-shadow: none; }
.owf-btn-block { width: 100%; justify-content: center; padding: 14px 18px; font-size: 15px; }
.owf-btn[disabled] { opacity: .55; cursor: wait; transform: none; box-shadow: none; }

/* Password gate */
.owf-gate { display: flex; align-items: center; justify-content: center; min-height: 460px; padding: 24px 0; }
.owf-gate-card {
	width: min(440px, 100%); background: var(--owf-card); border: 1px solid var(--owf-line); border-radius: var(--owf-radius); padding: 40px 36px 28px; text-align: center;
	box-shadow: 0 24px 60px -30px rgba(22, 39, 61, .35); animation: owf-rise .45s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes owf-rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.owf-mark { display: inline-flex; width: 72px; height: 72px; border-radius: 50%; background: var(--owf-soft); color: var(--owf-accent); align-items: center; justify-content: center; margin-bottom: 18px; }
.owf-gate-title { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--owf-text); }
.owf-gate-desc { margin: 0 0 26px; color: var(--owf-mute); font-size: 15px; }
.owf-field { display: block; text-align: left; margin-bottom: 14px; }
.owf-field-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--owf-mute); margin: 0 0 6px 4px; }
.owf-field-input { position: relative; display: block; }
.owf-field-input input {
	width: 100%; border: 1px solid var(--owf-line); background: var(--owf-bg); border-radius: 14px; padding: 14px 48px 14px 16px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.owf-field-input input:focus { border-color: var(--owf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--owf-accent) 18%, transparent); background: var(--owf-card); }
.owf-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--owf-mute); padding: 8px; border-radius: 10px; }
.owf-eye:hover { background: var(--owf-line); color: var(--owf-text); }
.owf-gate-error { margin: 12px 0 0; color: #c2410c; font-size: 14px; font-weight: 500; }
.owf-gate-foot { margin: 22px 0 0; font-size: 12.5px; color: var(--owf-mute); }
.owf-gate-card.is-shake { animation: owf-shake .4s ease; }
@keyframes owf-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Browser bar */
.owf-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--owf-card); border: 1px solid var(--owf-line); border-radius: var(--owf-radius); padding: 10px 12px 10px 16px; position: relative; z-index: 5;
	box-shadow: 0 10px 30px -22px rgba(22, 39, 61, .4);
}
.owf-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; font-size: 14px; }
.owf-crumb { border: 0; background: transparent; color: var(--owf-mute); padding: 6px 10px; border-radius: 999px; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owf-crumb:hover { background: var(--owf-line); color: var(--owf-text); }
.owf-crumb.is-current { color: var(--owf-text); font-weight: 700; background: var(--owf-soft); }
.owf-crumb-sep { color: var(--owf-mute); opacity: .6; }
.owf-bar-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.owf-search { display: flex; align-items: center; gap: 8px; background: var(--owf-bg); border: 1px solid var(--owf-line); border-radius: 999px; padding: 0 14px; color: var(--owf-mute); height: 40px; min-width: 210px; }
.owf-search:focus-within { border-color: var(--owf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--owf-accent) 16%, transparent); }
.owf-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--owf-text); }
.owf-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.owf-select { height: 40px; border-radius: 999px; border: 1px solid var(--owf-line); background: var(--owf-bg); padding: 0 34px 0 14px; font-size: 14px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2354657a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.owf-seg { display: inline-flex; background: var(--owf-bg); border: 1px solid var(--owf-line); border-radius: 999px; padding: 3px; }
.owf-seg button { border: 0; background: transparent; color: var(--owf-mute); padding: 7px 10px; border-radius: 999px; display: inline-flex; }
.owf-seg button.is-active { background: var(--owf-card); color: var(--owf-text); box-shadow: 0 1px 3px rgba(22, 39, 61, .18); }

.owf-count { margin: 14px 4px 8px; font-size: 13px; color: var(--owf-mute); }

/* Items */
.owf-items { display: grid; gap: 14px; }
.owf-items-grid { grid-template-columns: repeat(var(--owf-cols, 4), minmax(0, 1fr)); }
.owf-items-list { grid-template-columns: 1fr; gap: 6px; }
@media (max-width: 900px) { .owf-items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .owf-items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .owf-portal { padding: 14px; border-radius: 20px; } .owf-bar { padding: 10px; } .owf-search { min-width: 0; flex: 1; } }

.owf-item {
	position: relative; background: var(--owf-card); border: 1px solid var(--owf-line); border-radius: var(--owf-radius); overflow: hidden; cursor: pointer; text-align: left; padding: 0; width: 100%; color: inherit;
	transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease, border-color .18s ease; animation: owf-rise .35s both;
}
.owf-item:hover, .owf-item:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(22, 39, 61, .45); border-color: color-mix(in srgb, var(--owf-accent) 40%, var(--owf-line)); outline: none; }
.owf-item-thumb { aspect-ratio: 4 / 3; background: var(--owf-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.owf-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.owf-item-body { padding: 12px 14px 13px; }
.owf-item-name { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.owf-item-meta { font-size: 12px; color: var(--owf-mute); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.owf-item-meta .owf-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owf-glyph { width: 54px; height: 66px; border-radius: 10px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #fff; text-transform: uppercase; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.owf-glyph::before { content: ""; position: absolute; right: 0; top: 0; width: 16px; height: 16px; background: rgba(255,255,255,.28); border-bottom-left-radius: 8px; }
.owf-glyph.t-image { background: linear-gradient(160deg, #18c99e, #038f72); }
.owf-glyph.t-pdf { background: linear-gradient(160deg, #fa571f, #c73e0c); }
.owf-glyph.t-doc { background: linear-gradient(160deg, #3b82f6, #1d4ed8); }
.owf-glyph.t-sheet { background: linear-gradient(160deg, #22c55e, #15803d); }
.owf-glyph.t-slides { background: linear-gradient(160deg, #f59e0b, #b45309); }
.owf-glyph.t-video { background: linear-gradient(160deg, #8b5cf6, #5b21b6); }
.owf-glyph.t-audio { background: linear-gradient(160deg, #ec4899, #9d174d); }
.owf-glyph.t-zip { background: linear-gradient(160deg, #64748b, #334155); }
.owf-glyph.t-design { background: linear-gradient(160deg, #f97316, #9a3412); }
.owf-glyph.t-cad { background: linear-gradient(160deg, #0ea5e9, #075985); }
.owf-glyph.t-file { background: linear-gradient(160deg, #24384f, #16273d); }
.owf-folder-icon { width: 64px; height: 50px; position: relative; }
.owf-folder-icon::before { content: ""; position: absolute; inset: 0 0 0 0; top: 6px; background: color-mix(in srgb, var(--owf-accent) 75%, #000 0%); border-radius: 8px; }
.owf-folder-icon::after { content: ""; position: absolute; left: 0; top: 0; width: 42%; height: 12px; background: color-mix(in srgb, var(--owf-accent) 75%, #000 0%); border-radius: 6px 6px 0 0; }
.owf-folder-icon span { position: absolute; inset: 12px 0 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--owf-accent) 85%, #fff), var(--owf-accent)); border-radius: 8px; }
.owf-item.is-folder .owf-item-thumb { background: var(--owf-soft); }

/* List view */
.owf-items-list .owf-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border-radius: 12px; animation: none; }
.owf-items-list .owf-item:hover { transform: none; }
.owf-items-list .owf-item-thumb { aspect-ratio: 1; width: 44px; height: 44px; border-radius: 10px; }
.owf-items-list .owf-glyph { width: 28px; height: 34px; font-size: 8px; padding-bottom: 4px; border-radius: 6px; }
.owf-items-list .owf-glyph::before { width: 9px; height: 9px; border-bottom-left-radius: 4px; }
.owf-items-list .owf-folder-icon { width: 30px; height: 24px; }
.owf-items-list .owf-folder-icon::after { height: 6px; }
.owf-items-list .owf-folder-icon span { inset: 6px 0 0 0; }
.owf-items-list .owf-item-body { padding: 0; min-width: 0; }
.owf-items-list .owf-item-name { -webkit-line-clamp: 1; }
.owf-items-list .owf-item-meta { margin-top: 1px; }
.owf-items-list .owf-item-size { font-size: 12.5px; color: var(--owf-mute); white-space: nowrap; }

/* Empty + loading */
.owf-empty { text-align: center; padding: 64px 20px; color: var(--owf-mute); }
.owf-empty svg { opacity: .5; margin-bottom: 8px; }
.owf-empty p { margin: 0; font-size: 15px; }
.owf-loader { display: flex; justify-content: center; padding: 40px; }
.owf-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--owf-line); border-top-color: var(--owf-accent); animation: owf-spin .8s linear infinite; }
@keyframes owf-spin { to { transform: rotate(360deg); } }
.owf-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--owf-text, #16273d); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 10000; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); font-family: var(--owf-font); }

/* Lightbox */
.owf-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.owf-lightbox-backdrop { position: absolute; inset: 0; background: rgba(10, 19, 32, .78); backdrop-filter: blur(6px); }
.owf-lightbox-panel { position: relative; background: var(--owf-card); color: var(--owf-text); border-radius: 22px; width: min(1100px, 100%); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); animation: owf-rise .3s both; }
.owf-lightbox-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(22,39,61,.55); color: #fff; font-size: 24px; line-height: 1; }
.owf-lightbox-body { flex: 1; min-height: 240px; display: flex; align-items: center; justify-content: center; background: #0a1320; }
.owf-lightbox-body img, .owf-lightbox-body video { max-width: 100%; max-height: 74vh; display: block; }
.owf-lightbox-body iframe { width: 100%; height: 74vh; border: 0; background: #fff; }
.owf-lightbox-generic { text-align: center; color: #fff; padding: 60px 30px; }
.owf-lightbox-generic .owf-glyph { margin: 0 auto 16px; }
.owf-lightbox-generic p { margin: 0; opacity: .7; }
.owf-lightbox-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--owf-line); }
.owf-lightbox-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .owf-portal *, .owf-portal *::before, .owf-portal *::after { animation: none !important; transition: none !important; } }
