:root {
    --bg: #0b1120;
    --panel: #101827;
    --panel-dark: #08101f;
    --border: rgba(255, 255, 255, .08);

    --accent: white
    --accent-light: #60a5fa;
    --glass: rgba(255, 255, 255, .04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    min-height: 100vh;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at top left, #1e3a8a 0%, transparent 25%),
        radial-gradient(circle at bottom right, #2563eb 0%, transparent 20%),
        var(--bg);
}

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, .02);
}

.topbar {
    position: relative;
    z-index: 10000;
}

.datetime {
    width: 220px;
    font-size: 14px;
    opacity: .8;
}

.search {
    flex: 1;
    max-width: 700px;
    position: relative;
    pointer-events: auto;
}

.search input {
    width: 100%;
    height: 48px;
    border: none;
    outline: none;
    border-radius: 14px;
    background: var(--glass);
    color: white;
    padding-left: 48px;
    font-size: 15px;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 420px;
    overflow: auto;
    background: rgba(15, 23, 42, .98);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
    padding: 18px;
    z-index: 9999;
    backdrop-filter: blur(20px);
    pointer-events: auto;
}

.search-results a {
    display: block;
    color: inherit;
}

.search-result-item {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255,255,255,.06);
    color: white;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    pointer-events: auto;
    position: relative;
}

.search-results.visually-hidden {
    display: none;
}

.search-results .search-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.search-results .search-results-header h2 {
    font-size: 14px;
    margin: 0;
    color: #e5e7eb;
}

.search-results .search-results-header p {
    font-size: 12px;
    margin: 0;
    opacity: .72;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255,255,255,.06);
    color: white;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    pointer-events: auto;
}

.search-result-item:hover,
.search-result-item:focus-visible {
    background: rgba(255,255,255,.14);
    border-color: rgba(96, 165, 250, .35);
    transform: translateY(-1px);
    outline: none;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
}

.search-result-meta {
    font-size: 13px;
    opacity: .72;
    line-height: 1.4;
}

.search i {
    position: absolute;
    left: 18px;
    top: 16px;
    opacity: .6;
}

.profile {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.layout {
    display: flex;
    height: calc(100vh - 72px);
}

.primary-nav {
    width: 85px;
    background: var(--panel);
    border-right: 1px solid var(--border);
}

.nav-item {
    height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: .25s;
    color: white;
}

.nav-item:hover {
    background: rgba(37, 99, 235, .2);
}

.nav-item.active {
    background: rgba(37, 99, 235, .25);
    border-left: 4px solid var(--accent);
}

.nav-item span {
    font-size: 11px;
}

.nav-logo {
    height: 32px;
    width: auto;
    max-width: 50px;
    object-fit: contain;
    filter: brightness(1.2);
}

.secondary-nav {
    width: 220px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 24px;
}

.secondary-title {
    color: var(--accent-light);
    margin-bottom: 20px;
}

.sub-menu {
    list-style: none;
}

.sub-menu li {
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    transition: .25s;
}

.sub-menu li:hover {
    background: rgba(37, 99, 235, .15);
    transform: translateX(4px);
}

.sub-menu li.active {
    background: rgba(37, 99, 235, .20);
    border: 1px solid rgba(96, 165, 250, .3);
}

.workspace {
    flex: 1;
    overflow: auto;
    position: relative;
}

.workspace::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.page-header {
    position: relative;
    z-index: 2;
    padding: 35px 40px 20px;
}

.page-header h1 {
    font-size: 34px;
    font-weight: 600;
}

.page-header p {
    margin-top: 8px;
    opacity: .6;
}

.page-content {
    position: relative;
    z-index: 2;
    padding: 0 40px 40px;
    max-width: 1600px;
}

.widget-header {
    margin-bottom: 16px;
}

.widget-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.widget-header p {
    opacity: .6;
    font-size: 13px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.quick-tile {
    height: 90px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: .2s ease;
}

.quick-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, .35);
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.quick-tile i {
    font-size: 22px;
    margin-bottom: 8px;
    color: #60A5FA;
}

.quick-tile span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    padding: 0 6px;
}

.detail-panel {
    position: fixed;
    top: 72px;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: calc(100vh - 72px);
    background: rgba(17, 24, 39, .98);
    border-left: 1px solid rgba(255, 255, 255, .08);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .35);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.detail-panel.open {
    transform: translateX(0);
}

.detail-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.detail-panel-header h3 {
    font-size: 18px;
    margin: 0;
}

.detail-panel-close {
    appearance: none;
    border: none;
    background: transparent;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.detail-panel-frame {
    flex: 1;
    width: 100%;
    border: none;
    display: none;
}

.detail-panel-empty {
    flex: 1;
    width: 100%;
    padding: 24px;
    color: rgba(255, 255, 255, .75);
    display: block;
}

.embed-wrap {
    width: 100%;
    height: calc(100vh - 160px);
    background: transparent;
}

.embed-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Weather Widget Styles */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.weather-card {
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: .2s ease;
}

.weather-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, .35);
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.weather-location {
    font-size: 13px;
    opacity: .8;
    margin-bottom: 8px;
    font-weight: 500;
}

.weather-icon {
    font-size: 32px;
    margin: 8px 0;
    color: #60A5FA;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-temp {
    font-size: 24px;
    font-weight: 600;
    margin: 4px 0;
}

.weather-condition {
    font-size: 11px;
    opacity: .7;
    margin-top: 4px;
}
