
:root{
  --bg:#f8fafd;
  --surface:#ffffff;
  --surface-2:#f1f4f8;
  --text:#1f1f1f;
  --muted:#667085;
  --border:#e3e7ee;
  --primary:#0b57d0;
  --primary-soft:#c2e7ff;
  --danger:#b3261e;
  --shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);
  --radius:18px;
  --sidebar:248px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
body{overflow-x:hidden}

/* App shell */
.app-shell{min-height:100vh}
.sidebar{
  position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);
  padding:18px 14px;background:var(--bg);z-index:20;
  display:flex;flex-direction:column;gap:12px;border-right:1px solid transparent;
}
.brand-row{display:flex;align-items:center;gap:12px;padding:8px 10px 16px}
.brand-mark{
  width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#0b57d0,#4f8df7);
  position:relative;box-shadow:var(--shadow)
}
.brand-mark:before,.brand-mark:after{content:"";position:absolute;background:#fff;border-radius:2px}
.brand-mark:before{width:16px;height:4px;left:9px;top:10px}
.brand-mark:after{width:16px;height:4px;left:9px;top:19px}
.brand-title{font-size:20px;font-weight:700;letter-spacing:-.2px}
.new-btn{
  display:flex;align-items:center;justify-content:center;gap:10px;
  width:128px;padding:13px 16px;margin:2px 4px 8px;border:0;border-radius:16px;
  background:#fff;box-shadow:var(--shadow);cursor:pointer;font-weight:600;color:#202124
}
.new-btn:hover{background:#f7f9fc}
.plus{font-size:24px;line-height:18px;font-weight:300}
.nav{display:flex;flex-direction:column;gap:4px;margin-top:2px}
.nav a{
  display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:0 22px 22px 0;
  color:#3c4043;font-size:14px
}
.nav a:hover{background:#edf1f6}
.nav a.active{background:var(--primary-soft);color:#001d35;font-weight:600}
.nav-ico{width:20px;text-align:center;font-size:17px}
.sidebar-spacer{flex:1}
.storage-card{padding:13px;color:var(--muted);font-size:12px;line-height:1.5}
.storage-bar{height:5px;background:#e1e5eb;border-radius:999px;overflow:hidden;margin:8px 0}
.storage-bar>span{display:block;width:22%;height:100%;background:var(--primary)}

.main{margin-left:var(--sidebar);min-height:100vh;padding:12px 18px 26px 0}
.topbar{
  height:64px;display:flex;align-items:center;gap:18px;padding:0 6px 0 10px;
  position:sticky;top:0;background:rgba(248,250,253,.95);backdrop-filter:blur(8px);z-index:10
}
.search{
  width:min(720px,70vw);height:48px;background:#edf2fc;border:1px solid transparent;
  border-radius:24px;display:flex;align-items:center;gap:10px;padding:0 16px
}
.search:focus-within{background:#fff;border-color:#d6dce5;box-shadow:var(--shadow)}
.search input{border:0;outline:0;background:transparent;width:100%;font-size:16px;color:var(--text)}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.icon-btn{
  width:40px;height:40px;border:0;border-radius:50%;background:transparent;cursor:pointer;
  display:grid;place-items:center;color:#4b5563;font-size:18px
}
.icon-btn:hover{background:#e9edf3}
.avatar{width:34px;height:34px;border-radius:50%;background:#1f2937;color:#fff;display:grid;place-items:center;font-size:13px;font-weight:700}

.content{
  background:#fff;min-height:calc(100vh - 80px);border-radius:24px;padding:24px 26px;
  border:1px solid #edf0f4;
}
.content-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.page-title{font-size:25px;font-weight:500;margin:0}
.page-subtitle{font-size:13px;color:var(--muted);margin-top:6px}
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;
  border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:#fff;color:#263238;
  cursor:pointer;font-weight:600;font-size:13px
}
.btn:hover{background:#f6f8fb}
.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn.primary:hover{background:#0847aa}
.btn.soft{background:#edf4ff;border-color:#d5e5ff;color:#124f9d}
.btn.danger{color:var(--danger)}
.btn.square{width:38px;padding:0;border-radius:50%}
.mini{font-size:12px;padding:6px 10px;min-height:32px}
.muted{color:var(--muted);font-size:13px}
.notice{padding:11px 13px;border-radius:12px;background:#eef5ff;color:#284b7a;margin-bottom:14px}
.dangertext{color:var(--danger)}

/* Dashboard */
.section-label{font-size:14px;font-weight:600;color:#4b5563;margin:18px 0 10px}
.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.project-card{
  border:1px solid var(--border);border-radius:16px;background:#f8fafd;padding:14px;
  transition:.16s ease;min-height:148px;display:flex;flex-direction:column
}
.project-card:hover{background:#f1f5fb;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.project-top{display:flex;align-items:center;gap:10px}
.folder-icon{
  width:34px;height:26px;border-radius:5px;background:#5f92e8;position:relative;flex:0 0 auto
}
.folder-icon:before{content:"";position:absolute;left:2px;top:-5px;width:14px;height:7px;border-radius:4px 4px 0 0;background:#5f92e8}
.project-name{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-client{margin:12px 0 4px;color:#59636f;font-size:13px}
.project-meta{color:#7b8490;font-size:12px}
.project-actions{margin-top:auto;padding-top:14px;display:flex;gap:8px}

/* Files */
.breadcrumbs{display:flex;align-items:center;gap:5px;flex-wrap:wrap;color:#4b5563;margin-bottom:16px;font-size:14px}
.breadcrumbs a{padding:5px 8px;border-radius:9px}
.breadcrumbs a:hover{background:#f0f3f7}
.breadcrumbs .sep{color:#a0a7b1}
.quickbar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 10px;
  border:1px solid var(--border);border-radius:14px;margin-bottom:14px;background:#fff
}
.quickbar .divider{width:1px;height:24px;background:var(--border);margin:0 2px}
.hidden{display:none!important}
.inline-panel{
  margin:0 0 14px;padding:14px;border:1px solid var(--border);border-radius:14px;background:#fbfcfe
}
.inline-panel form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.field{display:flex;flex-direction:column;gap:6px;min-width:220px}
.field label{font-size:12px;color:#59636f}
.input{
  width:100%;height:40px;padding:9px 12px;border:1px solid #d5dae2;border-radius:10px;background:#fff;outline:0
}
.input:focus{border-color:#87aee8;box-shadow:0 0 0 3px rgba(11,87,208,.08)}
.file-list{border:1px solid var(--border);border-radius:14px;overflow:hidden}
.file-head,.file-row{
  display:grid;grid-template-columns:minmax(250px,2fr) 110px 120px 250px;align-items:center;
  min-height:52px;padding:0 14px;column-gap:12px
}
.file-head{color:#667085;font-size:12px;background:#fbfcfe;border-bottom:1px solid var(--border)}
.file-row{font-size:13px;border-bottom:1px solid #edf0f3}
.file-row:last-child{border-bottom:0}
.file-row:hover{background:#f7f9fc}
.file-name-cell{display:flex;align-items:center;gap:12px;min-width:0}
.item-icon{width:28px;text-align:center;font-size:21px}
.item-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.row-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}
.rename-form{display:flex;gap:5px;max-width:175px}
.rename-form .input{height:32px;padding:5px 8px;font-size:12px}
.empty{padding:50px 20px;text-align:center;color:#7a8491}
.empty .big{font-size:44px;margin-bottom:10px}

/* Share page */
.public-shell{min-height:100vh;background:#f8fafd}
.public-top{height:72px;border-bottom:1px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px}
.public-wrap{max-width:1120px;margin:0 auto;padding:30px 20px}
.public-card{background:#fff;border:1px solid var(--border);border-radius:20px;overflow:hidden}
.public-title{font-size:24px;font-weight:500;margin:0}
.public-headline{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.public-files .file-head,.public-files .file-row{grid-template-columns:minmax(250px,2fr) 120px 210px}
.public-files .row-actions{justify-content:flex-start}

/* Login */
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f8fafd}
.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--border);border-radius:24px;padding:34px;box-shadow:var(--shadow)}
.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}
.login-title{font-size:24px;font-weight:700}
.login-card h1{font-size:22px;font-weight:500;margin:0 0 8px}
.login-card p{color:var(--muted);font-size:13px;margin:0 0 22px}
.login-card .btn{width:100%;border-radius:10px;margin-top:8px}

/* Settings */
.settings-card{max-width:620px;border:1px solid var(--border);border-radius:16px;padding:20px}

@media(max-width:980px){
  :root{--sidebar:78px}
  .brand-title,.nav span.label,.storage-card{display:none}
  .brand-row{justify-content:center;padding-left:0;padding-right:0}
  .new-btn{width:52px;padding:13px 0;margin-left:auto;margin-right:auto}
  .new-btn .new-label{display:none}
  .nav a{justify-content:center;border-radius:18px;padding:11px}
  .main{padding-right:10px}
  .file-head,.file-row{grid-template-columns:minmax(220px,2fr) 90px 210px}
  .file-head>div:nth-child(3),.file-row>div:nth-child(3){display:none}
}
@media(max-width:720px){
  :root{--sidebar:0px}
  .sidebar{display:none}
  .main{margin-left:0;padding:0}
  .topbar{padding:8px 12px;height:auto;gap:8px}
  .search{width:100%;height:44px}
  .top-actions .icon-btn{display:none}
  .content{border-radius:0;border-left:0;border-right:0;padding:18px 14px;min-height:calc(100vh - 60px)}
  .content-head{flex-direction:column;align-items:stretch}
  .project-grid{grid-template-columns:1fr}
  .file-head{display:none}
  .file-list{border:0}
  .file-row{grid-template-columns:1fr;gap:7px;padding:12px;border:1px solid var(--border);border-radius:13px;margin-bottom:8px}
  .file-row>div:nth-child(2),.file-row>div:nth-child(3){display:none}
  .row-actions{justify-content:flex-start;flex-wrap:wrap;padding-left:40px}
  .rename-form{max-width:100%}
  .public-top{padding:0 16px}
  .public-wrap{padding:20px 12px}
  .public-headline{align-items:flex-start;flex-direction:column}
  .public-files .file-row{grid-template-columns:1fr}
  .public-files .row-actions{padding-left:40px}
}
