* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: #0f1117;
    color: #e8eaf0;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 245px;
    min-width: 245px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: #15181e;
    border-right: 1px solid #252a33;
    transition: width .2s, min-width .2s;
}

.sidebar-brand {
    height: 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 16px;
    border-bottom: 1px solid #252a33;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #252a33;
    color: #8797ff;
    font-size: 21px;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
}

.sidebar-toggle {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #929aaa;
}

.sidebar-toggle:hover {
    background: #252a33;
    color: #fff;
}

.sidebar-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .2s;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 17px 10px;
}

.nav-section {
    margin-bottom: 23px;
}

.nav-label {
    display: block;
    padding: 0 10px;
    margin-bottom: 8px;
    color: #737d8e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-item {
    height: 39px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 11px;
    margin-bottom: 3px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #929aaa;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s, color .15s;
}

.nav-item:hover {
    background: #20242c;
    color: #e6e9ef;
}

.nav-item.active {
    background: #252a33;
    border-color: #343b49;
    color: #e6e9ef;
}

.nav-icon {
    width: 19px;
    min-width: 19px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
}

.sidebar-bottom {
    padding: 14px;
    border-top: 1px solid #252a33;
}

.sidebar-version {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px;
    color: #929aaa;
    font-size: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #70b58a;
}

/* COLLAPSED SIDEBAR */

.sidebar.collapsed {
    width: 65px;
    min-width: 65px;
}

.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-version {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .sidebar-toggle {
    position: absolute;
    top: 64px;
    right: -14px;
    z-index: 10;
    background: #252a33;
    border: 1px solid #343b49;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-nav {
    padding: 17px 8px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .nav-icon {
    font-size: 16px;
}

/* MAIN */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */

.topbar {
    height: 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    background: #15181e;
    border-bottom: 1px solid #252a33;
}

.topbar-info,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-info {
    gap: 11px;
    min-width: 0;
}

.topbar-category {
    color: #7889b5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.topbar-separator {
    color: #505968;
}

.topbar-title {
    color: #e6e9ef;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.topbar-right {
    gap: 14px;
}

.global-search {
    width: 230px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    background: #17191f;
    border: 1px solid #30333b;
    border-radius: 7px;
}

.global-search:focus-within {
    border-color: #555e70;
}

.global-search svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #929aaa;
    stroke-width: 2;
    flex-shrink: 0;
}

.global-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 12px;
}

.global-search input::placeholder {
    color: #858995;
}

.search-shortcut {
    padding: 3px 6px;
    border: 1px solid #303643;
    border-radius: 4px;
    color: #858d9e;
    font-size: 11px;
}

.topbar-divider {
    width: 1px;
    height: 25px;
    background: #303641;
}

.topbar-button {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #929aaa;
}

.topbar-button:hover {
    background: #252a33;
    color: #fff;
}

.topbar-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* CONTENT */

.content {
    flex: 1;
    padding: 26px;
    min-width: 0;
}

.dashboard {
    max-width: 1300px;
    margin: 0 auto;
}

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
}

.welcome-section h1 {
    margin: 0 0 8px;
    font-size: 25px;
    font-weight: 650;
}

.welcome-section p {
    margin: 0;
    color: #929aaa;
    font-size: 13px;
}

.dashboard-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.section-header span {
    color: #737d8e;
    font-size: 11px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 12px;
}

/* TOOL CARDS */

.tool-card {
    position: relative;
    min-height: 105px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    background: #171a22;
    border: 1px solid #272c38;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s, border-color .15s,
                transform .15s;
}

.tool-card:hover {
    background: #1d222c;
    border-color: #414b5e;
    transform: translateY(-2px);
}

.tool-card-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: grid;
    place-items: center;
    background: #252a33;
    border-radius: 9px;
    color: #a0add4;
    font-size: 17px;
    font-weight: 600;
}

.tool-card-info {
    min-width: 0;
}

.tool-card-info h3 {
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 600;
}

.tool-card-info p {
    margin: 0;
    color: #929aaa;
    font-size: 11px;
    line-height: 1.5;
}

.tool-card-arrow {
    position: absolute;
    top: 13px;
    right: 14px;
    color: #737d8e;
    font-size: 13px;
    opacity: 0;
    transition: opacity .15s;
}

.tool-card:hover .tool-card-arrow {
    opacity: 1;
}

/* PLACEHOLDER */

.page-placeholder {
    padding: 25px;
    background: #171a22;
    border: 1px solid #272c38;
    border-radius: 10px;
}

.page-placeholder h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.page-placeholder p {
    color: #929aaa;
    font-size: 13px;
}

/* SCROLLBARS */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #303746;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #414b5e;
}

/* RESPONSIVE */

@media (max-width: 750px) {
    .sidebar {
        width: 65px;
        min-width: 65px;
    }

    .sidebar .brand-name,
    .sidebar .nav-text,
    .sidebar .nav-label,
    .sidebar .sidebar-version {
        display: none;
    }

    .sidebar .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

    .sidebar .sidebar-toggle {
        display: none;
    }

    .sidebar .sidebar-nav {
        padding: 17px 8px;
    }

    .sidebar .nav-item {
        justify-content: center;
        padding: 0;
    }

    .content {
        padding: 20px 14px;
    }

    .topbar {
        padding: 0 14px;
    }

    .global-search {
        width: 160px;
    }
}

@media (max-width: 480px) {
    .topbar-category,
    .topbar-separator,
    .topbar-divider,
    .search-shortcut {
        display: none;
    }

    .global-search {
        width: 125px;
    }

    .welcome-section h1 {
        font-size: 21px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card-icon,
.tool-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card-icon img {
    width: 22px;
    height: 22px;
}

.tool-card-arrow img {
    width: 16px;
    height: 16px;
}

.tool-card img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.sidebar-svg,
.nav-icon img {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.brand-icon img {
    width: 22px;
    height: 22px;
}

.topbar-button img {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}