:root {
    --bg: #070b14;
    --panel: rgba(11, 17, 31, .67);
    --panel-strong: rgba(15, 23, 42, .9);
    --panel-hover: rgba(28, 39, 63, .82);
    --line: rgba(255, 255, 255, .11);
    --line-strong: rgba(255, 255, 255, .18);
    --text: #f3f6ff;
    --muted: #9ca8bf;
    --accent: #d34f74;
    --accent-soft: rgba(211, 79, 116, .18);
    --success: #58ca9b;
    --danger: #f07178;
    --shadow: 0 20px 55px rgba(0, 0, 0, .28);
    font-family: Inter, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body,
#app {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 72% 15%, rgba(66, 91, 161, .32), transparent 30%),
        radial-gradient(circle at 22% 80%, rgba(78, 29, 86, .3), transparent 34%),
        linear-gradient(140deg, #070a12, #111a2e 55%, #090d17);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

[v-cloak] {
    display: none !important;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

.sidebar {
    width: 88px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 0;
    border-right: 1px solid var(--line);
    background: rgba(4, 8, 18, .58);
    backdrop-filter: blur(18px);
}

.sidebar-logo,
.sidebar-button {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: var(--muted);
    transition: .2s ease;
}

.sidebar-logo {
    color: var(--text);
    background: var(--accent-soft);
    border-color: rgba(211, 79, 116, .35);
    margin-bottom: 32px;
}

.sidebar-button:hover,
.sidebar-button.active {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
    border-color: var(--line);
}

.workspace-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.sidebar-bottom {
    margin-top: auto;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 40px;
}

.topbar {
    max-width: 1480px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.eyebrow {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 3px;
}

.workspace-heading h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 600;
}

.top-actions {
    display: flex;
    padding: 4px;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
    backdrop-filter: blur(16px);
}

.top-action,
.icon-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
    transition: .2s ease;
}

.top-action:hover,
.top-action.active,
.icon-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .1);
}

.top-action.active {
    color: #fff;
    background: var(--accent);
}

.top-action.disabled {
    opacity: .42;
}

.dashboard {
    position: relative;
    max-width: 1480px;
    min-height: calc(100vh - 130px);
    margin: 0 auto;
}

.grid-stack {
    min-height: 300px;
}

.grid-stack-item-content {
    overflow: visible !important;
    inset: 8px !important;
}

.widget {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.widget::-webkit-scrollbar {
    width: 5px;
}

.widget::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 10px;
}

.widget-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.widget-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.widget-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.grid-stack-item.ui-draggable-dragging .widget,
.grid-stack-item.ui-resizable-resizing .widget {
    border-color: rgba(211, 79, 116, .75);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .48);
}

.empty-dashboard {
    position: absolute;
    z-index: 0;
    inset: 80px 0 auto;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
}

.empty-dashboard h2 {
    color: var(--text);
    font-size: 20px;
    margin: 16px 0 6px;
}

.empty-dashboard p {
    margin: 0;
}

.empty-widget {
    display: flex;
    align-items: center;
    min-height: 58px;
    color: var(--muted);
    font-size: 13px;
}

.widget-search {
    justify-content: center;
}

.widget-search .widget-header {
    display: none;
}

.search-form,
.todo-add-form {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 9px 7px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, .14);
}

.search-form > i {
    color: var(--muted);
}

.search-form input,
.todo-add-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.search-form input::placeholder,
.todo-add-form input::placeholder {
    color: var(--muted);
}

.widget-clock {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.widget-clock .widget-header {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
}

.clock-value {
    font-size: clamp(38px, 6vw, 78px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.08em;
}

.clock-date {
    margin-top: 12px;
    color: var(--muted);
    font-size: 15px;
}

.quick-links-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
    align-content: start;
    gap: 10px;
    min-height: 0;
}

.quick-link {
    position: relative;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, .045);
    transition: .2s ease;
}

.quick-link:hover {
    border-color: var(--line);
    background: var(--panel-hover);
}

.quick-link.dragging {
    opacity: .45;
    border-color: var(--accent);
}

.quick-link a {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    font-size: 12px;
}

.quick-link img,
.link-letter {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, .08);
}

.link-letter {
    font-size: 16px;
    font-weight: 700;
}

.quick-link a span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-link-edit-actions {
    position: absolute;
    display: flex;
    gap: 2px;
    top: 4px;
    right: 4px;
}

.quick-link-edit-actions button {
    width: 25px;
    height: 25px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: rgba(0, 0, 0, .4);
    color: var(--text);
}

.quick-add-button {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 11px;
    border: 1px dashed var(--line-strong);
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
}

.quick-add-button:hover {
    color: var(--text);
    border-color: var(--accent);
}

.todo-add-form {
    margin-bottom: 10px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.todo-task {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 9px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
}

.todo-task > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.todo-task.completed > span {
    color: var(--muted);
    text-decoration: line-through;
}

.todo-toggle,
.todo-edit,
.todo-delete {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
}

.todo-toggle:hover,
.todo-edit:hover,
.todo-delete:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .09);
}

.todo-task.completed .todo-toggle {
    color: var(--success);
}

.todo-completed-area {
    margin-top: auto;
    padding-top: 12px;
}

.todo-completed-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
}

.completed-list {
    margin-top: 6px;
}

.modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(2, 5, 12, .66);
    backdrop-filter: blur(6px);
}

.modal-card,
.confirm-card {
    width: min(100%, 540px);
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: #111a2a;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .5);
}

.confirm-card {
    width: min(100%, 420px);
    text-align: center;
}

.confirm-card > i {
    color: #efc272;
}

.confirm-card h2 {
    margin: 12px 0 8px;
    font-size: 20px;
}

.confirm-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.confirm-card .modal-actions {
    justify-content: center;
    margin-top: 22px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

label,
.label-title {
    display: block;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 13px;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;
    outline: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .055);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(211, 79, 116, .8);
    box-shadow: 0 0 0 3px rgba(211, 79, 116, .12);
}

input:disabled {
    opacity: .6;
}

textarea {
    resize: vertical;
}

.check-row,
.radio-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-row {
    margin: 10px 0;
    color: var(--muted);
    font-size: 13px;
}

.check-row input {
    width: auto;
    margin: 0;
}

.radio-row {
    gap: 18px;
    margin: 8px 0 12px;
}

.radio-row .check-row {
    margin: 0;
}

.input-with-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-action input {
    flex: 1;
}

.input-with-action .icon-button {
    flex: 0 0 auto;
    margin-top: 7px;
    border: 1px solid var(--line);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
}

.modal-spacer {
    flex: 1;
}

.primary-button,
.secondary-button,
.danger-button {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
}

.primary-button {
    color: #fff;
    background: var(--accent);
}

.primary-button:hover {
    background: #df607f;
}

.secondary-button {
    border-color: var(--line);
    background: rgba(255, 255, 255, .07);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, .13);
}

.danger-button {
    color: #ffd8dc;
    border-color: rgba(240, 113, 120, .32);
    background: rgba(240, 113, 120, .13);
}

.danger-button:hover {
    background: rgba(240, 113, 120, .24);
}

.full {
    width: 100%;
}

.widget-catalog {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.catalog-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    text-align: left;
    background: rgba(255, 255, 255, .035);
}

.catalog-item:hover {
    border-color: rgba(211, 79, 116, .6);
    background: rgba(255, 255, 255, .08);
}

.catalog-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--accent-soft);
}

.catalog-item strong {
    display: block;
    margin-bottom: 4px;
}

.catalog-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.settings-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.separator {
    height: 1px;
    margin: 24px 0;
    border: 0;
    background: var(--line);
}

.danger-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffb7bd;
    text-decoration: none;
    font-size: 14px;
}

.toast {
    position: fixed;
    z-index: 2000;
    right: 20px;
    bottom: 20px;
    max-width: min(430px, calc(100vw - 40px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
    background: rgba(16, 26, 43, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    font-size: 14px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-shell {
    width: min(100%, 410px);
}

.auth-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(10, 16, 29, .8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 19px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: #fff;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 27px;
}

.muted {
    color: var(--muted);
    line-height: 1.5;
}

.auth-card > .muted {
    margin: 0 0 22px;
    font-size: 14px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
}

.auth-tabs button {
    padding: 9px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
}

.auth-tabs button.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.form-error {
    padding: 10px 11px;
    border-radius: 10px;
    color: #ffc5ca;
    background: rgba(240, 113, 120, .13);
    font-size: 13px;
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        z-index: 100;
        bottom: 0;
        left: 0;
        width: 100%;
        min-height: 66px;
        height: 66px;
        flex-direction: row;
        padding: 8px 12px;
        border-top: 1px solid var(--line);
        border-right: 0;
    }

    .sidebar-logo {
        display: none;
    }

    .workspace-nav {
        flex: 1;
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .sidebar-bottom {
        margin: 0 0 0 8px;
    }

    .sidebar-button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .main-content {
        padding: 20px 16px 90px;
    }

    .topbar {
        margin-bottom: 10px;
    }

    .workspace-heading h1 {
        font-size: 21px;
    }

    .grid-stack-item-content {
        inset: 5px !important;
    }
}

@media (max-width: 560px) {
    .topbar {
        align-items: flex-start;
    }

    .top-actions {
        transform: scale(.92);
        transform-origin: top right;
    }

    .widget {
        padding: 15px;
        border-radius: 17px;
    }

    .quick-links-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-card {
        padding: 25px;
    }
}