* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: "Inter", Arial, sans-serif; font-size: 14px; line-height: 1.5; background: #f1f3f4; color: #202124; }
a { color: #1a0dab; cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
#app { height: 100%; }
.hidden { display: none !important; }

.topbar { position: fixed; top: 0; left: 0; right: 0; height: 44px; background: #fff; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; padding: 2px 48px; gap: 18px; z-index: 100; }
.topbar a { color: #1a0dab; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar a.active { color: #202124; font-weight: bold; text-decoration: none; }
.topbar strong { color: #202124; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-right a { color: #1a0dab; text-decoration: none; }
.topbar-right a:hover { text-decoration: underline; }
.topbar-right span { color: #777; }

.searchbar-row { position: fixed; top: 44px; left: 0; right: 0; background: #fff; padding: 10px 48px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #e0e0e0; z-index: 100; min-height: 56px; }
button, input[type="submit"] { padding: 3px 10px; font-size: 13px; }
.clibr-wordmark { font-size: 28px; font-family: "Pacifico", cursive, sans-serif; font-weight: normal; line-height: 1; white-space: nowrap; }
.clibr-wordmark span { color: #000; }
#search-input, #web-search-input, .home-search-input { width: 440px; padding: 4px 8px; }

.layout { display: flex; height: 100%; padding-top: 100px; overflow: hidden; }
.layout.no-searchbar { padding-top: 44px; }
.sidebar { width: 200px; flex-shrink: 0; background: #fff; border-right: 1px solid #e0e0e0; padding: 6px 0; overflow-y: auto; }
.sidebar a { display: block; padding: 8px 32px 8px 48px; color: #1a0dab; text-decoration: none; white-space: nowrap; }

.sidebar a:hover { text-decoration: underline; }
.sidebar a.active { font-weight: bold; color: #202124; text-decoration: none; }
.sidebar .badge { font-weight: bold; padding-left: 4px; color: #202124; }
.sidebar hr { border: none; border-top: 1px solid #e0e0e0; margin: 8px 0; }
.sidebar-label { padding: 6px 32px 4px 48px; font-weight: bold; font-size: 12px; color: #202124; text-transform: uppercase; letter-spacing: 0.5px; }

.main { flex: 1; background: #fff; display: flex; flex-direction: column; overflow: hidden; padding-right: 48px; }
.mail-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 32px; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; min-height: 52px; }

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #202124; }
.toolbar-right a { color: #1a0dab; text-decoration: none; }
.toolbar-right a:hover { text-decoration: underline; }

#ml-scroll { flex: 1; overflow-y: auto; }
#mail-main { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
#drive-main { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }
.email-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.email-table tr { border-bottom: 1px solid #e8e8e8; cursor: pointer; }
.email-table tr:hover { background: #f5f5f5; }
.email-table tr.unread td.col-sender,
.email-table tr.unread td.col-subject .subj { font-weight: 600; }
.email-table td { padding: 12px 16px; vertical-align: middle; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.col-cb { width: 30px; padding-left: 32px !important; }
.col-star { width: 22px; }
.col-sender { width: 250px; }
.col-subject { width: auto; }
.col-subject .subj { color: #202124; }
.col-subject .prev { color: #777; font-weight: normal; font-size: 13px; }
.col-date { width: 100px; text-align: right; padding-right: 24px !important; color: #777; font-weight: normal; }
.email-table tr.unread .col-date { color: #202124; font-weight: bold; }
.col-star .star { color: #ccc; cursor: pointer; }
.col-star .star.on { color: #f9ab00; }

#drive-main .dt-bar { display: flex; align-items: center; gap: 8px; padding: 0 32px; border-bottom: 1px solid #e0e0e0; min-height: 52px; }
#drive-main .dt-path { padding: 8px 32px; border-bottom: 1px solid #e0e0e0; }
.drive-item { display: flex; align-items: center; gap: 8px; padding: 10px 32px; cursor: pointer; }
.drive-item:hover { background: #f5f5f5; }
.drive-item .di-icon { width: 22px; text-align: center; }
.drive-item .di-name { color: #1a0dab; text-decoration: underline; }
#drive-scroll { flex: 1; overflow-y: auto; min-height: 0; }

#todo-view, #onenote-view, #calendar-view { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #999; padding: 40px; text-align: center; background: #fff; }
#todo-view h2, #onenote-view h2, #calendar-view h2 { font-size: 18px; color: #555; }

#search-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.search-home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.search-home .big-logo { font-size: 72px; font-weight: normal; letter-spacing: -2px; line-height: 1; margin-bottom: 24px; font-family: "Pacifico", cursive, sans-serif; }
.search-home .big-logo span { color: #000; }
.search-home .search-btns { margin-top: 14px; display: flex; gap: 8px; justify-content: center; }

/* ─── Search Results (2005 Google style) ─── */
.sr-page { display: flex; flex-direction: column; height: 100%; width: 100%; min-height: 0; align-self: stretch; }
.sr-page .sr-header { background: #fff; padding: 10px 48px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; min-height: 56px; }
.sr-page .sr-logo { font-size: 28px; font-family: "Pacifico", cursive, sans-serif; font-weight: normal; color: #000; cursor: pointer; line-height: 1; white-space: nowrap; }
.sr-page .sr-search-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sr-page .sr-body-wrap { display: flex; flex: 1; overflow-y: auto; padding: 24px 48px; min-height: 0; }
.sr-page .sr-main-col { flex: 1; padding-left: 4px; min-height: 0; }
.sr-page .sr-result { margin-bottom: 24px; }
.sr-page .sr-result-title { margin-bottom: 0; }
.sr-page .sr-result-title a { font-size: 15px; color: #1a0dab; text-decoration: none; font-weight: normal; }
.sr-page .sr-result-title a:hover { text-decoration: underline; }
.sr-page .sr-result-snippet { font-size: 13px; color: #000; margin: 2px 0; line-height: 1.4; }
.sr-page .sr-result-url { font-size: 11px; color: #006621; }
.sr-page .sr-result-footer { font-size: 11px; color: #666; }
.sr-page .sr-result-footer a { color: #1a0dab; text-decoration: none; }
.sr-page .sr-result-footer a:hover { text-decoration: underline; }
.sr-page .sr-right-col { width: 220px; flex-shrink: 0; padding-left: 16px; }
.sr-page .sr-sponsored-label { font-size: 11px; font-weight: bold; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-bottom: 8px; }
.sr-page .sr-ad { margin-bottom: 12px; }
.sr-page .sr-ad-title a { font-size: 13px; color: #1a0dab; text-decoration: none; }
.sr-page .sr-ad-title a:hover { text-decoration: underline; }
.sr-page .sr-ad-text { font-size: 11px; color: #000; line-height: 1.3; }
.sr-page .sr-ad-url { font-size: 11px; color: #006621; }

#compose-overlay, #msg-overlay { position: fixed; inset: 0; z-index: 200; }
#compose-panel, #msg-panel { position: fixed; right: 0; bottom: 0; width: 520px; height: calc(100% - 100px); background: #fff; border-left: 1px solid #e0e0e0; display: flex; flex-direction: column; z-index: 210; }
#msg-body { flex: 1; padding: 16px; overflow-y: auto; font-size: 13px; line-height: 1.6; }
#compose-panel .cp-header, #msg-panel .cp-header { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid #e0e0e0; background: #f1f3f4; min-height: 52px; }
#compose-panel .cp-header h3, #msg-panel .cp-header h3 { flex: 1; color: #202124; }
#compose-panel .cp-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
#compose-panel .cp-body textarea { width: 100%; }
#compose-panel .cp-body textarea { flex: 1; resize: none; min-height: 120px; }
#compose-panel .cp-footer, #msg-panel .cp-footer { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-top: 1px solid #e0e0e0; min-height: 52px; }


#auth-loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 999; font-size: 18px; color: #555; background: #fff; }
