@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #050607;
    --panel: rgba(15, 17, 19, 0.82);
    --panel-soft: rgba(22, 24, 27, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f2f2f2;
    --muted: #8f9298;
    --orange: #ff6a00;
    --orange-soft: #ff9d2e;
    --purple: #8a45ff;
    --purple-soft: #b48cff;
    --metal: #9ca3af;
}

* {
    box-sizing: border-box;
}

html,
body,
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 38% 22%, rgba(255, 106, 0, 0.22), transparent 30%),
        radial-gradient(circle at 77% 24%, rgba(138, 69, 255, 0.22), transparent 32%),
        linear-gradient(135deg, #030405, #090b0f 55%, #050507);
    color: var(--text);
    font-family: Inter, sans-serif;
}

.desktop-drag-region {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 138px;
    height: 44px;
    z-index: 2147483647;
    -webkit-app-region: no-drag;
    background: rgba(9, 11, 15, 0.01);
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    touch-action: none;
}

.desktop-drag-region.is-dragging {
    cursor: grabbing;
}

.desktop-shell .desktop-drag-region {
    display: block;
}

.desktop-window-controls {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2147483647;
    display: none;
    height: 44px;
    -webkit-app-region: no-drag;
}

.desktop-shell .desktop-window-controls {
    display: flex;
}

.desktop-window-controls button {
    width: 46px;
    height: 44px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #eef0f4;
    font: 18px/1 "Segoe UI", sans-serif;
    cursor: pointer;
}

.desktop-window-controls button:hover {
    background: rgba(255, 255, 255, 0.09);
}

.desktop-window-controls [data-window-close]:hover {
    background: #c42b1c;
    color: white;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    padding: 28px 22px;
    background: linear-gradient(180deg, rgba(12, 15, 17, 0.96), rgba(7, 8, 10, 0.98));
    border-right: 1px solid var(--border);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    z-index: 90;
    transition: left 180ms ease;
}

.sidebar-drag-edge {
    position: fixed;
    inset: 38px auto 0 255px;
    z-index: 2147483646;
    width: 14px;
    cursor: ew-resize;
    touch-action: none;
    transition: left 180ms ease;
}

.sidebar-drag-edge::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 6px;
    width: 2px;
    background: transparent;
    transition: background 150ms ease, box-shadow 150ms ease;
}

.sidebar-drag-edge:hover::after,
body.is-resizing-sidebar .sidebar-drag-edge::after {
    background: rgba(255, 106, 0, 0.72);
    box-shadow: 0 0 12px rgba(255, 106, 0, 0.45);
}

body.is-resizing-sidebar {
    cursor: ew-resize;
    user-select: none;
}

.sidebar-is-collapsed .sidebar {
    left: -260px;
}

.sidebar-is-collapsed .sidebar-drag-edge {
    left: 0;
}

.sidebar-is-dragging .sidebar,
.sidebar-is-dragging .sidebar-drag-edge,
.sidebar-is-dragging .main {
    transition: none !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--orange);
    font-size: 30px;
    text-shadow: 0 0 20px rgba(255, 106, 0, 0.8);
}

.logo-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-subtitle {
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 2px;
}

.sidebar-date {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 28px;
    color: #eef0f4;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.sidebar-date:hover {
    color: var(--orange-soft);
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    color: #b8bcc4;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.2s;
}

.nav-item > .ti {
    width: 18px;
    min-width: 18px;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--orange-soft);
    background: linear-gradient(90deg, rgba(255, 106, 0, 0.16), transparent);
    box-shadow: inset 3px 0 0 var(--orange);
}

.nav-item:hover > .ti,
.nav-item.active > .ti,
.nav-folder:hover .nav-folder-trigger > .ti,
.nav-folder:focus-within .nav-folder-trigger > .ti,
.nav-folder.active .nav-folder-trigger > .ti {
    color: var(--orange-soft);
}


.nav-folder {
    position: relative;
}

.nav-folder::after {
    content: none;
}

.nav-folder-trigger {
    cursor: pointer;
    user-select: none;
}

.nav-folder-trigger b {
    margin-left: auto;
    color: rgba(255, 184, 108, 0.75);
    display: grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
    transition: transform 160ms ease, color 160ms ease;
}

.nav-folder:hover .nav-folder-trigger,
.nav-folder:focus-within .nav-folder-trigger,
.nav-folder.active .nav-folder-trigger {
    color: var(--orange-soft);
    background: linear-gradient(90deg, rgba(255, 106, 0, 0.16), transparent);
    box-shadow: inset 3px 0 0 var(--orange);
}

.nav-folder:hover .nav-folder-trigger b,
.nav-folder:focus-within .nav-folder-trigger b,
.nav-folder.active .nav-folder-trigger b {
    transform: rotate(90deg);
    color: #fff;
}

.nav-flyout {
    position: static;
    width: auto;
    max-height: 0;
    margin: 0 0 0 28px;
    padding: 0;
    border-left: 1px solid rgba(255, 138, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-6px);
    transition:
        max-height 260ms cubic-bezier(.2,.8,.2,1),
        margin 260ms cubic-bezier(.2,.8,.2,1),
        padding 260ms cubic-bezier(.2,.8,.2,1),
        opacity 220ms ease,
        transform 220ms cubic-bezier(.2,.8,.2,1),
        visibility 0s linear 220ms;
    z-index: 130;
}

.nav-flyout::before {
    content: none;
}

.nav-folder:hover .nav-flyout,
.nav-folder:focus-within .nav-flyout,
.nav-folder.active .nav-flyout {
    max-height: 330px;
    margin: 6px 0 10px 28px;
    padding: 4px 0 4px 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.nav-flyout-head {
    display: none;
}

.nav-flyout-head strong {
    display: block;
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-flyout-head span {
    display: block;
    margin-top: 4px;
    color: #9da3af;
    font-size: 12px;
}

.nav-flyout-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border-radius: 10px;
    color: #d7dbe4;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-flyout-item + .nav-flyout-item {
    margin-top: 3px;
}

.nav-flyout-item i {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-style: normal;
    color: rgba(255, 184, 108, 0.9);
    background: rgba(255, 106, 0, 0.075);
    border: 1px solid rgba(255, 106, 0, 0.16);
    font-size: 16px;
}

.nav-flyout-item b,
.nav-flyout-item small {
    display: block;
}

.nav-flyout-item b {
    color: #f4f6fb;
    font-size: 13px;
    line-height: 1.15;
}

.nav-flyout-item small {
    margin-top: 2px;
    color: #9aa1ad;
    font-size: 11px;
    line-height: 1.25;
}

.nav-flyout-item:hover,
.nav-flyout-item.active {
    transform: translateX(2px);
    color: #fff;
    border-color: rgba(255, 133, 43, 0.22);
    background: rgba(255, 106, 0, 0.11);
}

.nav-flyout-item.active i {
    color: #111319;
    background: linear-gradient(135deg, #ff7a1a, #ffb156);
    box-shadow: 0 0 16px rgba(255, 106, 0, 0.28);
}

.nav-flyout-item.disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.nav-flyout-item.disabled i {
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-flyout-item.disabled:hover {
    transform: none;
    border-color: rgba(139, 92, 246, 0.18);
    background: rgba(139, 92, 246, 0.08);
}
.sidebar-spacer {
    flex: 1;
    min-height: 28px;
}

.progress {
    height: 6px;
    background: rgba(255,255,255,0.11);
    border-radius: 20px;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange-soft));
    box-shadow: 0 0 18px rgba(255,106,0,0.7);
}

.account-panel,
.account-menu,
.account-login-card {
    position: relative;
    margin-top: 16px;
}

.account-menu summary,
.account-login-card {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 106, 0, 0.28);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 106, 0, 0.18), transparent 55%),
        rgba(255,255,255,0.035);
    color: #f4f4f5;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 14px 36px rgba(0,0,0,0.32), 0 0 0 6px rgba(255,255,255,0.018);
}

.account-login-card {
    width: 100%;
    height: auto;
    min-height: 64px;
    grid-template-columns: 48px minmax(0, 1fr);
    justify-items: stretch;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
}

.account-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.account-menu > summary.account-profile-card {
    width: 100%;
    height: auto;
    min-height: 78px;
    grid-template-columns: 54px minmax(0, 1fr);
    justify-items: stretch;
    gap: 11px;
    padding: 10px;
    border-radius: 16px;
    margin-top: 0;
    background:
        linear-gradient(110deg, rgba(255, 106, 0, 0.18), rgba(255, 106, 0, 0.055) 58%, rgba(138, 69, 255, 0.08)),
        rgba(255,255,255,0.035);
}

.account-menu {
    width: 100%;
    margin-top: 0;
}

.account-profile-card .account-copy small {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-full-name {
    min-width: 0;
    overflow: hidden;
    color: #aeb3bc;
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-profile-card .account-copy b {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--orange-soft);
    background: rgba(255, 106, 0, 0.12);
    border: 1px solid rgba(255, 106, 0, 0.28);
}

.account-book-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    border-radius: 16px;
    color: var(--orange-soft);
    text-decoration: none;
    font-size: 19px;
    font-weight: 900;
    border: 1px solid rgba(255, 106, 0, 0.28);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 106, 0, 0.16), transparent 55%),
        rgba(255,255,255,0.035);
}

.account-book-button:hover {
    border-color: rgba(255, 106, 0, 0.7);
    background: rgba(255, 106, 0, 0.1);
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu summary::marker {
    content: "";
}

.account-menu summary:hover,
.account-login-card:hover {
    border-color: rgba(255, 106, 0, 0.7);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 106, 0, 0.28), transparent 60%),
        rgba(255, 106, 0, 0.08);
    transform: translateY(-1px);
}

.avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 106, 0, 0.28), rgba(138, 69, 255, 0.2));
    border: 1px solid rgba(255, 106, 0, 0.38);
    color: var(--orange-soft);
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 0 26px rgba(255, 106, 0, 0.16);
}

.avatar-small {
    width: 38px;
    height: 38px;
    font-size: 15px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 3px;
}

.account-copy strong,
.account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong {
    color: #f4f4f5;
    font-size: 15px;
}

.account-copy small {
    color: var(--muted);
    font-size: 12px;
}

.account-dropdown {
    position: absolute;
    left: 0;
    width: 218px;
    bottom: calc(100% + 10px);
    z-index: 20;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(12, 15, 17, 0.98);
    box-shadow: 0 20px 50px rgba(0,0,0,0.42);
}

.account-logout-link {
    color: #ffb4b4 !important;
}

.account-logout-link:hover {
    color: #ffd1d1 !important;
    background: rgba(239, 68, 68, 0.12) !important;
}

.account-menu:not([open]) .account-dropdown {
    display: none;
}

.account-dropdown::after {
    content: "";
    position: absolute;
    left: 22px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(12, 15, 17, 0.98);
    transform: rotate(45deg);
}

.account-dropdown-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 2px;
}

.account-dropdown a {
    padding: 11px 12px;
    border-radius: 10px;
    color: #cfd2d8;
    text-decoration: none;
    font-weight: 700;
}

.account-dropdown a:hover {
    color: var(--orange-soft);
    background: rgba(255, 106, 0, 0.12);
}

.main {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 28px 34px 34px;
    transition: margin-left 180ms ease, width 180ms ease;
}

.sidebar-is-collapsed .main {
    width: 100%;
    margin-left: 0;
}

.messages {
    margin: 18px 0;
    display: grid;
    gap: 10px;
}

.message {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #f4f4f5;
}

.message.success {
    border-color: rgba(34,197,94,0.45);
    color: #bbf7d0;
}

.message.error,
.message.danger {
    border-color: rgba(239,68,68,0.45);
    color: #fecaca;
}

.auth-wrapper {
    min-height: calc(100vh - 110px);
    display: grid;
    place-items: center;
    padding: 34px 0;
}

.auth-card {
    width: min(100%, 500px);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}

.auth-card-wide {
    width: min(100%, 640px);
}

.auth-card h1 {
    margin: 0 0 10px;
    color: var(--orange-soft);
}

.profile-points {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 16px 0 6px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 106, 0, 0.32);
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.14), rgba(138, 69, 255, 0.08));
}

.profile-current {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
}

.profile-current-avatar {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: var(--orange-soft);
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(145deg, rgba(255, 106, 0, 0.28), rgba(138, 69, 255, 0.2));
    border: 1px solid rgba(255, 106, 0, 0.38);
}

.profile-current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-current-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.profile-current-copy strong {
    color: #f4f4f5;
    font-size: 22px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.profile-current-copy span,
.profile-current-copy small {
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.profile-points span {
    color: var(--muted);
    font-weight: 800;
}

.profile-points strong {
    color: var(--orange-soft);
    font-size: 30px;
    line-height: 1;
}

.auth-card p {
    color: var(--muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-field-wide {
    grid-column: 1 / -1;
}

.auth-form label {
    display: grid;
    gap: 8px;
    color: #d7d9de;
    font-weight: 700;
}

.auth-form label span {
    color: #d7d9de;
    font-weight: 800;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font: inherit;
}

.auth-form .errorlist {
    list-style: none;
    margin: 0;
    padding: 0;
    color: #fecaca;
    font-size: 12px;
    font-weight: 700;
}

.auth-form textarea {
    resize: vertical;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: rgba(255,106,0,0.58);
    box-shadow: 0 0 0 3px rgba(255,106,0,0.12);
}

.auth-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 500 !important;
}

.auth-check input {
    width: auto;
    accent-color: var(--orange);
}

.auth-form button,
.auth-link-button,
.settings-tools-form button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid rgba(255,106,0,0.58);
    border-radius: 12px;
    background: rgba(255,106,0,0.1);
    color: var(--orange-soft);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.settings-card {
    width: min(100%, 760px);
}

.settings-section,
.settings-tools-form {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.settings-section-copy {
    display: grid;
    gap: 5px;
}

.settings-section-copy h2,
.settings-section-copy p {
    margin: 0;
}

.settings-section-copy h2 {
    margin: 0 0 8px;
    color: #f4f4f5;
    font-size: 18px;
}

.settings-section-copy p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.vault-setting {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
}

.vault-setting-path {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.vault-setting-path strong,
.vault-setting-path span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-setting-path strong {
    color: #f2f2f3;
}

.vault-setting-path span {
    color: var(--muted);
    font-size: 12px;
}

.vault-setting button {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255,106,0,0.58);
    border-radius: 10px;
    background: rgba(255,106,0,0.1);
    color: var(--orange-soft);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.vault-setting button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.tool-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    color: #d7d9de;
    font-weight: 800;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
}

.tool-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--orange);
}

.tool-toggle.is-locked {
    color: var(--muted);
}

.action-log-card {
    width: min(100%, 760px);
}

.action-log-list {
    display: grid;
    gap: 22px;
    margin-top: 22px;
}

.action-log-day {
    display: grid;
    gap: 10px;
}

.action-log-day-title {
    margin: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.action-log-item {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
}

.action-log-item time {
    color: var(--orange-soft);
    font-size: 12px;
    font-weight: 900;
}

.action-log-item span {
    color: #e5e7eb;
    font-weight: 700;
    line-height: 1.4;
}

.auth-error {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(239,68,68,0.45);
    border-radius: 12px;
    color: #fecaca;
    background: rgba(239,68,68,0.08);
}

.auth-switch {
    margin: 22px 0 0;
    text-align: center;
}

.auth-switch a,
.auth-card a {
    color: var(--orange-soft);
}

.hero {
    min-height: 560px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 0.82fr) minmax(280px, 0.72fr) minmax(250px, 0.82fr);
    grid-template-rows: 72px 150px 1fr 78px;
    align-items: center;
    padding: 26px 42px 34px;
    border-radius: 8px;
    overflow: hidden;
    background: #050607;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 -70px 90px rgba(0,0,0,0.52), 0 20px 60px rgba(0,0,0,0.34);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.98;
    pointer-events: none;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero::before {
    background:
        radial-gradient(circle at 20% 55%, rgba(255, 106, 0, 0.28), transparent 19%),
        radial-gradient(circle at 74% 50%, rgba(138, 69, 255, 0.24), transparent 25%),
        linear-gradient(90deg, rgba(255, 106, 0, 0.14), transparent 42%, rgba(138, 69, 255, 0.14));
    mix-blend-mode: screen;
    opacity: 0.9;
}

.hero::after {
    background:
        linear-gradient(180deg, rgba(0,0,0,0.16), transparent 28%, rgba(0,0,0,0.66)),
        radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.62)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 80px);
    opacity: 0.7;
}

.hero-brand-line {
    grid-column: 1 / 4;
    align-self: start;
    justify-self: center;
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--orange);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 5px;
}

.hero-brand-line::before,
.hero-brand-line::after {
    content: "";
    width: 190px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,106,0,0.55));
}

.hero-brand-line::after {
    background: linear-gradient(90deg, rgba(138,69,255,0.55), transparent);
}

.hero-brand-line span::before,
.hero-brand-line span::after {
    content: "◆";
    color: var(--orange);
    font-size: 10px;
    margin: 0 12px;
}

.hero-main-title {
    grid-column: 1 / 4;
    grid-row: 2;
    position: relative;
    z-index: 8;
    justify-self: center;
    text-align: center;
    text-shadow: 0 8px 28px rgba(0,0,0,0.9);
}

.hero-main-title h1 {
    margin: 0;
    color: #f4f4f5;
    font-size: clamp(42px, 5vw, 78px);
    line-height: 0.95;
    letter-spacing: 2px;
    font-weight: 900;
}

.hero-main-title strong {
    color: var(--orange);
}

.hero-main-title p {
    margin: 16px 0 0;
    color: #c8cbd2;
    font-size: 18px;
    line-height: 1.45;
}

.god {
    position: relative;
    z-index: 8;
    max-width: 420px;
    align-self: end;
}

.god::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 340px;
    height: 360px;
    bottom: 18px;
    border-radius: 48% 52% 42% 58%;
    filter: blur(1px);
    opacity: 0.2;
}

.hephaestus::before {
    left: -130px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 148, 58, 0.52), transparent 16%),
        radial-gradient(ellipse at center, rgba(80, 28, 10, 0.84), rgba(0,0,0,0) 68%);
    box-shadow: 0 0 100px rgba(255, 87, 16, 0.42);
}

.morpheus::before {
    right: -130px;
    background:
        radial-gradient(circle at 45% 18%, rgba(180, 140, 255, 0.42), transparent 16%),
        radial-gradient(ellipse at center, rgba(38, 24, 72, 0.9), rgba(0,0,0,0) 70%);
    box-shadow: 0 0 100px rgba(138, 69, 255, 0.36);
}

.god-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 24px;
}

.god h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 2px;
}

.god h3 {
    font-size: 14px;
    letter-spacing: 1px;
    margin: 8px 0 20px;
}

.god p {
    max-width: 350px;
    color: #d5d7dd;
    line-height: 1.6;
    font-size: 16px;
}

.hephaestus {
    grid-column: 1;
    grid-row: 3;
}

.hephaestus h2,
.hephaestus h3,
.hephaestus .god-icon {
    color: var(--orange);
}

.morpheus {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    text-align: right;
}

.morpheus p {
    margin-left: auto;
}

.morpheus h2,
.morpheus h3,
.morpheus .god-icon {
    color: var(--purple-soft);
}

.morpheus .god-icon {
    margin-left: auto;
}

.orange-btn,
.purple-btn {
    width: min(100%, 390px);
    min-height: 64px;
    display: grid;
    gap: 3px;
    justify-content: start;
    margin-top: 18px;
    padding: 15px 28px;
    border-radius: 5px;
    background: transparent;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
}

.orange-btn span,
.purple-btn span {
    color: #b9bdc6;
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
}

.orange-btn {
    color: var(--orange-soft);
    border: 1px solid rgba(255,106,0,0.72);
    background: linear-gradient(90deg, rgba(255,106,0,0.22), rgba(255,106,0,0.04));
    box-shadow: inset 0 0 30px rgba(255,106,0,0.06);
}

.purple-btn {
    justify-content: end;
    margin-left: auto;
    color: var(--purple-soft);
    border: 1px solid rgba(138,69,255,0.72);
    background: linear-gradient(270deg, rgba(138,69,255,0.22), rgba(138,69,255,0.04));
    box-shadow: inset 0 0 30px rgba(138,69,255,0.06);
}

.hammer {
    grid-column: 2;
    grid-row: 2 / 5;
    position: relative;
    z-index: 5;
    height: 390px;
    align-self: end;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-28deg) translateY(12px);
    filter: drop-shadow(0 0 30px rgba(255,106,0,0.28)) drop-shadow(0 0 42px rgba(138,69,255,0.22));
}

.hammer::before {
    content: "";
    position: absolute;
    width: 540px;
    height: 5px;
    top: 235px;
    left: 50%;
    transform: translateX(-50%) rotate(28deg);
    background: linear-gradient(90deg, transparent, rgba(255, 106, 0, 0.96) 42%, rgba(180, 140, 255, 0.92) 58%, transparent);
    box-shadow: 0 0 24px rgba(255,106,0,0.7), 0 0 24px rgba(138,69,255,0.65);
}

.hammer img {
    width: min(680px, 48vw);
    max-width: none;
    transform: rotate(28deg) translateY(4px);
    mix-blend-mode: screen;
    opacity: 0.94;
    -webkit-mask-image: radial-gradient(ellipse at 50% 52%, #000 42%, rgba(0,0,0,0.82) 56%, transparent 76%);
    mask-image: radial-gradient(ellipse at 50% 52%, #000 42%, rgba(0,0,0,0.82) 56%, transparent 76%);
}

.hero-title {
    grid-column: 1 / 4;
    grid-row: 4;
    position: relative;
    z-index: 8;
    justify-self: center;
    align-self: end;
    text-align: center;
}

.hero-title::before,
.hero-title::after {
    content: "";
    position: absolute;
    top: 15px;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,106,0,0.65));
}

.hero-title::before {
    right: calc(100% + 16px);
}

.hero-title::after {
    left: calc(100% + 16px);
    background: linear-gradient(90deg, rgba(138,69,255,0.65), transparent);
}

.hero-title p {
    margin: 0 0 8px;
    color: #f0f1f4;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 900;
}

.hero-title span {
    color: #b7bac2;
}

.dashboard {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.card {
    min-height: 190px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}

.card h3 {
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 15px;
}

.card span,
.card p,
.muted {
    color: var(--muted);
}

.card h2 {
    font-size: 18px;
    line-height: 1.4;
}

.row {
    display: flex;
    justify-content: space-between;
}

.row b,
.card a {
    color: var(--orange);
}

.battle-line {
    height: 5px;
    display: flex;
    margin: 24px 0;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
}

.orange-side {
    width: 72%;
    background: linear-gradient(90deg, var(--orange), var(--orange-soft));
}

.purple-side {
    width: 28%;
    background: linear-gradient(90deg, var(--purple), var(--purple-soft));
}

.battle-numbers {
    display: flex;
    justify-content: space-between;
}

.battle-numbers strong {
    display: block;
    margin-top: 8px;
    font-size: 32px;
}

.battle-numbers div:first-child strong {
    color: var(--orange);
}

.battle-numbers div:last-child {
    text-align: right;
}

.battle-numbers div:last-child strong {
    color: var(--purple);
}

.habits-card ul,
.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.habits-card li,
.plan-card li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: #d6d8dd;
}

.habits-card b {
    color: #b2b5bd;
    font-size: 13px;
}

.energy-card {
    text-align: center;
}

.circle {
    width: 140px;
    height: 140px;
    margin: 10px auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111 55%, transparent 56%),
        conic-gradient(var(--orange) var(--energy, 78%), rgba(255,255,255,0.09) 0);
    font-size: 38px;
    font-weight: 800;
}

.circle span {
    color: white;
    font-size: 20px;
}

.plan-card input {
    accent-color: var(--orange);
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    color: var(--muted);
}

.days div {
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

.days .today {
    color: var(--orange);
    border-color: rgba(255,106,0,0.75);
    box-shadow: 0 0 20px rgba(255,106,0,0.22);
}

.mini-chart {
    height: 54px;
    margin-top: 18px;
    border-radius: 12px;
    background:
        linear-gradient(120deg, transparent 0 10%, rgba(255,106,0,0.4) 11% 13%, transparent 14% 25%, rgba(138,69,255,0.4) 26% 28%, transparent 29%),
        rgba(255,255,255,0.03);
}

.bars {
    height: 110px;
    display: flex;
    align-items: end;
    gap: 13px;
    margin-top: 20px;
}

.bars span {
    flex: 1;
    min-height: 4px;
    background: linear-gradient(180deg, var(--orange), rgba(255,106,0,0.16));
    border-radius: 6px 6px 0 0;
}

.journal-card {
    grid-column: span 2;
    position: relative;
    overflow: hidden;
}

.journal-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(138,69,255,0.35), transparent 65%);
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
        gap: 30px;
        padding: 28px;
    }

    .hero-brand-line,
    .hero-main-title,
    .hephaestus,
    .morpheus,
    .hammer,
    .hero-title {
        grid-column: 1;
        grid-row: auto;
    }

    .hammer {
        height: 240px;
        transform: rotate(-22deg);
    }

    .morpheus {
        justify-self: start;
        text-align: left;
    }

    .morpheus p,
    .morpheus .god-icon,
    .purple-btn {
        margin-left: 0;
    }

    .purple-btn {
        justify-content: start;
    }

    .hero-title {
        position: static;
        transform: none;
    }

    .hero-title::before,
    .hero-title::after,
    .hero-brand-line::before,
    .hero-brand-line::after {
        display: none;
    }
}
.sync-setting-field {
    display: grid;
    gap: 7px;
    color: #c7cbd3;
    font-weight: 800;
}

.sync-setting-field input,
.sync-setting-field select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    color: var(--text);
    color-scheme: dark;
    font: inherit;
}

.sync-device-state {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255,255,255,0.025);
}

.sync-device-state code {
    color: #c7cbd3;
    overflow-wrap: anywhere;
}

.sync-connection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,124,31,0.1), rgba(132,92,255,0.11));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.sync-connection-card strong,
.sync-connection-card span {
    display: block;
}

.sync-connection-card strong {
    color: var(--text);
    font-size: 1rem;
}

.sync-connection-card span {
    margin-top: 4px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.sync-connection-card b {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    color: #07110b;
    background: #68f5a0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sync-connection-card.is-disconnected b {
    color: #160b04;
    background: #ff8a2a;
}

.desktop-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 122, 10, 0.26);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 122, 10, 0.12), rgba(132, 92, 255, 0.1)),
        rgba(255,255,255,0.025);
}

.desktop-download-card strong,
.desktop-download-card span {
    display: block;
}

.desktop-download-card strong {
    color: var(--text);
    font-size: 1.02rem;
}

.desktop-download-card span {
    margin-top: 5px;
    color: var(--muted);
}

.desktop-download-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255, 122, 10, 0.55);
    border-radius: 12px;
    color: #130801;
    background: linear-gradient(135deg, #ff7a0a, #ffb15d);
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(255, 122, 10, 0.16);
}

.desktop-download-button:hover {
    transform: translateY(-1px);
    color: #130801;
}

.sync-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sync-result {
    padding: 12px 14px;
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 10px;
    color: #bbf7d0;
    background: rgba(34,197,94,0.08);
    overflow-wrap: anywhere;
}

.sync-result.is-error {
    border-color: rgba(239,68,68,0.35);
    color: #fecaca;
    background: rgba(239,68,68,0.08);
}

