* {
    box-sizing: border-box;
}

:root {
    --orange: #ff6d00;
    --orange-dark: #e85f00;
    --black: #111111;
    --text: #202020;
    --muted: #6e6e73;
    --border: #e3e3e3;
    --background: #f5f5f5;
    --card: #ffffff;
    --success: #18864b;
    --success-bg: #eaf7ef;
    --waiting: #806000;
    --waiting-bg: #fff6d7;
    --shadow: 0 18px 45px rgba(17, 17, 17, 0.07);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Lato", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

/* LOGIN */

.language-switch {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

.language-switch a {
    color: #000;
    text-decoration: none;
}

.language-switch a.active {
    color: #ff6d00;
}

.login-language-switch {
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 18px;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(255, 109, 0, 0.05), transparent 34%),
        #f6f6f6;
}

.login-layout {
    width: 100%;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(520px, 100%);
    padding: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.login-logo {
    display: block;
    width: 195px;
    max-width: 65%;
    height: auto;
    margin: 0 auto 34px;
}

.login-heading {
    width: 100%;
    text-align: center;
}

.login-heading h1 {
    margin: 0 auto;
    color: var(--black);
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.08;
    letter-spacing: -1px;
    font-weight: 700;
    text-align: center;
}

.login-heading p {
    max-width: 390px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
    text-align: center;
}

.login-form {
    display: grid;
    gap: 20px;
    margin-top: 32px;
}

.field {
    display: grid;
    gap: 9px;
}

.field > span {
    color: var(--black);
    font-weight: 700;
    font-size: 15px;
}

.field input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid #d4d4d4;
    border-radius: 11px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder {
    color: #a1a1a1;
}

.field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 109, 0, 0.12);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    padding: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button,
.secondary-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.primary-button {
    border: 1px solid var(--orange);
    background: var(--orange);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
}

.secondary-button {
    border: 1px solid var(--border);
    background: #f4f4f4;
    color: var(--black);
}

.secondary-button:hover {
    border-color: #cfcfcf;
    background: #ececec;
}

.primary-button:active,
.secondary-button:active {
    transform: translateY(1px);
}

.login-button {
    width: 100%;
    min-height: 52px;
    margin-top: 2px;
    font-size: 16px;
}

.alert {
    margin-top: 24px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.alert.error {
    border: 1px solid #efc4c4;
    background: #fff0f0;
    color: #9b2525;
}

/* PANEL */

.panel-page {
    background:
        radial-gradient(circle at top left, rgba(255, 109, 0, 0.035), transparent 25%),
        var(--background);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.topbar-inner {
    width: min(1240px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar-logo-link {
    display: inline-flex;
    align-items: center;
}

.topbar-logo {
    display: block;
    width: 195px;
    height: auto;
}

.account-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.account-text {
    display: grid;
    gap: 3px;
    text-align: right;
}

.account-text strong {
    color: var(--black);
    font-size: 14px;
}

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

.logout-link {
    color: var(--orange);
    font-weight: 700;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}

.dashboard {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 64px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.dashboard-heading h1 {
    margin: 0;
    color: var(--black);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.05;
    letter-spacing: -1.2px;
    font-weight: 700;
}

.dashboard-heading p {
    max-width: 720px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.access-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid #cce7d7;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 13px;
    font-weight: 700;
}

.access-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(24, 134, 75, 0.12);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feed-card {
    min-width: 0;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(17, 17, 17, 0.045);
}

.feed-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.format-icon {
    min-width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 109, 0, 0.1);
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pill.ready {
    background: var(--success-bg);
    color: var(--success);
}

.status-pill.waiting {
    background: var(--waiting-bg);
    color: var(--waiting);
}

.feed-card h2 {
    margin: 0;
    color: var(--black);
    font-size: 25px;
    font-weight: 900;
}

.feed-description {
    min-height: 50px;
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.feed-meta {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    color: #818181;
    font-size: 12px;
}

.url-box {
    min-width: 0;
    padding: 13px;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    background: #f5f5f5;
}

.url-text {
    display: block;
    overflow: hidden;
    color: #555555;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    margin-top: 16px;
}

.copy-button {
    width: 100%;
}

.status-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 22px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(17, 17, 17, 0.04);
}

.status-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 109, 0, 0.1);
    color: var(--orange);
    font-weight: 900;
}

.status-card h2 {
    margin: 0 0 5px;
    color: var(--black);
    font-size: 17px;
}

.status-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.copy-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    padding: 13px 17px;
    border-radius: 10px;
    background: var(--black);
    color: #ffffff;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 950px) {
    .feed-grid {
        grid-template-columns: 1fr;
    }

    .feed-description {
        min-height: auto;
    }
}

@media (max-width: 700px) {
    .login-page {
        padding: 18px;
    }

    .login-card {
        padding: 30px 24px;
        border-radius: 16px;
    }

    .login-logo {
        width: 165px;
        margin-bottom: 27px;
    }

    .dashboard {
        width: min(100% - 28px, 1240px);
        padding-top: 34px;
    }

    .topbar-inner {
        width: calc(100% - 28px);
        min-height: 68px;
    }

    .topbar-logo {
        width: 155px;
    }

    .account-text {
        display: none;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .feed-card {
        padding: 20px;
    }
}

@media (max-width: 430px) {
    .feed-actions {
        grid-template-columns: 1fr;
    }
}
