* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f6f7f9;
    color: #171717;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.muted {
    color: #71717a;
}


/* ==========================================
   LOGIN
========================================== */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 38px;

    border: 1px solid #e4e4e7;
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, 0.07);
}

.brand {
    margin-bottom: 32px;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.login-card h1 {
    margin: 0 0 8px;

    font-size: 30px;
}

.login-card > p {
    margin: 0;
}

.login-card form {
    display: flex;
    flex-direction: column;

    margin-top: 30px;
}

label {
    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 46px;

    margin-bottom: 18px;
    padding: 10px 13px;

    border: 1px solid #d4d4d8;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
}

input:focus {
    border-color: #18181b;

    box-shadow:
        0 0 0 3px
        rgba(24, 24, 27, 0.08);
}

.error-message {
    min-height: 20px;

    margin: 0 0 14px;

    color: #b42318;

    font-size: 14px;
}


/* ==========================================
   BUTTONS
========================================== */

.primary-button,
.secondary-button {
    min-height: 44px;

    padding: 10px 18px;

    border-radius: 9px;

    font-weight: 700;
}

.primary-button {
    border: 1px solid #18181b;

    background: #18181b;
    color: #ffffff;
}

.primary-button:hover {
    background: #27272a;
}

.primary-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}

.secondary-button {
    border: 1px solid #d4d4d8;

    background: #ffffff;
    color: #27272a;
}

.secondary-button:hover {
    background: #f4f4f5;
}


/* ==========================================
   LAYOUT
========================================== */

.app-layout {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        250px
        1fr;
}

.sidebar {
    position: sticky;
    top: 0;

    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 26px 18px;

    border-right: 1px solid #e4e4e7;

    background: #ffffff;
}

.sidebar-brand {
    padding: 0 12px 28px;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.nav-button {
    width: 100%;

    padding: 11px 12px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #52525b;

    text-align: left;
    text-decoration: none;

    font-weight: 600;
}

.nav-button:hover {
    background: #f4f4f5;

    color: #18181b;
}

.nav-button.active {
    background: #18181b;

    color: #ffffff;
}

.sidebar-info {
    margin-top: 30px;

    padding: 20px 12px;

    border-top: 1px solid #eeeeef;
}

.sidebar-info-label {
    display: block;

    margin-bottom: 8px;

    color: #a1a1aa;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sidebar-info p {
    margin: 0;

    color: #71717a;

    font-size: 12px;
    line-height: 1.6;
}

.sidebar-bottom {
    margin-top: auto;

    padding: 20px 8px 0;

    border-top: 1px solid #e4e4e7;
}

.user-name {
    margin-bottom: 3px;

    font-size: 14px;
    font-weight: 700;
}

.user-email {
    overflow: hidden;

    margin-bottom: 14px;

    color: #71717a;

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-bottom .secondary-button {
    width: 100%;
}


/* ==========================================
   CONTENT
========================================== */

.content {
    min-width: 0;

    padding: 42px;
}

.page {
    max-width: 1300px;

    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0 0 7px;

    font-size: 30px;
}

.page-header p {
    margin: 0;
}


/* ==========================================
   WELCOME
========================================== */

.welcome-card {
    padding: 30px;

    border: 1px solid #e4e4e7;
    border-radius: 16px;

    background: #ffffff;
}

.eyebrow {
    display: block;

    margin-bottom: 10px;

    color: #71717a;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.welcome-card h2 {
    margin: 0 0 9px;

    font-size: 24px;
}

.welcome-card p {
    max-width: 650px;

    margin: 0;

    color: #71717a;

    line-height: 1.6;
}


/* ==========================================
   SHOPS
========================================== */

.section-header {
    margin-top: 38px;
    margin-bottom: 18px;
}

.section-header h2 {
    margin: 0 0 6px;

    font-size: 21px;
}

.section-header p {
    margin: 0;
}

.shops-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 18px;
}

.shop-card,
.loading-card,
.empty-card {
    padding: 22px;

    border: 1px solid #e4e4e7;
    border-radius: 14px;

    background: #ffffff;
}

.shop-card {
    min-width: 0;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.shop-card:hover {
    border-color: #d4d4d8;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.05);

    transform:
        translateY(-1px);
}

.shop-card-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.shop-card-title {
    min-width: 0;
}

.shop-card h3 {
    overflow: hidden;

    margin: 0;

    font-size: 18px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-name {
    margin: 8px 0 0;

    color: #71717a;

    font-size: 13px;
}

.shop-meta {
    display: flex;

    gap: 8px;

    margin-top: 22px;
    padding-top: 18px;

    border-top: 1px solid #eeeeef;
}

.shop-id {
    color: #71717a;

    font-size: 12px;
}

.status {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    min-height: 26px;

    padding: 4px 9px;

    border-radius: 999px;

    background: #f4f4f5;
    color: #52525b;

    font-size: 11px;
    font-weight: 700;
}

.status.active {
    background: #ecfdf3;

    color: #067647;
}

.shop-actions {
    margin-top: 18px;
}

.manage-shop-button {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 13px;

    border: 1px solid #18181b;
    border-radius: 9px;

    background: #18181b;
    color: #ffffff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;
}

.manage-shop-button:hover {
    background: #27272a;
}

.loading-card,
.empty-card {
    grid-column:
        1 / -1;

    color: #71717a;
}

.empty-card strong {
    display: block;

    margin-bottom: 6px;

    color: #27272a;
}

.empty-card p {
    margin: 0;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (
    max-width: 1000px
) {

    .shops-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


@media (
    max-width: 800px
) {

    .app-layout {
        display: block;
    }

    .sidebar {
        position: static;

        width: 100%;
        height: auto;
    }

    .sidebar-info {
        display: none;
    }

    .sidebar-bottom {
        margin-top: 24px;
    }

    .content {
        padding: 24px;
    }

}


@media (
    max-width: 600px
) {

    .login-card {
        padding: 28px 22px;
    }

    .shops-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 22px 16px;
    }

}