* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-1: #06111f;
    --bg-2: #0b1630;
    --card: rgba(10, 18, 36, 0.72);
    --card-2: rgba(11, 20, 40, 0.88);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f4f7fb;
    --muted: #b7c1d4;
    --cyan: #23d7f2;
    --blue: #2994ff;
    --purple: #9d4dff;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius: 28px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(35, 215, 242, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(157, 77, 255, 0.16), transparent 35%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    pointer-events: none;
}

.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    pointer-events: none;
    animation: floating 9s ease-in-out infinite;
}

.bg-shape-1 {
    width: 320px;
    height: 320px;
    background: var(--cyan);
    top: 8%;
    left: -80px;
}

.bg-shape-2 {
    width: 360px;
    height: 360px;
    background: var(--purple);
    right: -100px;
    bottom: 5%;
    animation-delay: 1.5s;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.hero-card,
.auth-card {
    width: 100%;
    max-width: 980px;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 36px;
    text-align: center;
    animation: fadeUp 0.9s ease;
}

.logo-wrap,
.auth-logo-wrap {
    margin-bottom: 18px;
}

.logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 12px 25px rgba(35, 215, 242, 0.18));
    animation: pulseLogo 4s ease-in-out infinite;
    border-radius: 20px;
}

.auth-logo {
    width: 100%;
    max-width: 230px;
    height: auto;
    filter: drop-shadow(0 12px 25px rgba(35, 215, 242, 0.18));
    border-radius: 18px;
}

.badge {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: #dbe8ff;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

h1,
.auth-title,
.dashboard-title {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle,
.auth-subtitle,
.dashboard-subtitle {
    max-width: 760px;
    margin: 0 auto 30px;
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--muted);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.btn {
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    color: #fff;
    box-shadow: 0 16px 30px rgba(41, 148, 255, 0.22);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.10);
}

.btn-full {
    width: 100%;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    border-color: rgba(35, 215, 242, 0.35);
    background: rgba(255,255,255,0.07);
}

.feature-box strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.feature-box span {
    font-size: 0.94rem;
    color: var(--muted);
    line-height: 1.5;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    z-index: 2;
}

.auth-card {
    max-width: 560px;
    text-align: left;
}

.auth-back {
    display: inline-block;
    margin-bottom: 26px;
    color: #cfe5ff;
    text-decoration: none;
    font-size: 0.96rem;
}

.auth-title {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.auth-subtitle {
    margin: 0 0 26px 0;
    max-width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: #eaf2ff;
    font-size: 0.96rem;
}

.form-group input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-group input::placeholder {
    color: #97a6c2;
}

.form-group input:focus {
    border-color: rgba(35, 215, 242, 0.45);
    box-shadow: 0 0 0 4px rgba(35, 215, 242, 0.08);
    background: rgba(255,255,255,0.08);
}

.alert-error,
.alert-success {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.96rem;
}

.alert-error {
    background: rgba(255, 77, 109, 0.12);
    border: 1px solid rgba(255, 77, 109, 0.28);
    color: #ffd9e2;
}

.alert-success {
    background: rgba(0, 255, 128, 0.12);
    border: 1px solid rgba(0, 255, 128, 0.28);
    color: #d9ffe8;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    position: relative;
    z-index: 2;
}

.dashboard-sidebar {
    background: rgba(5, 11, 24, 0.88);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

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

.sidebar-brand img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
}

.sidebar-brand strong {
    display: block;
    font-size: 1rem;
    color: #fff;
}

.sidebar-brand span {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
    margin-top: 3px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a,
.sidebar-logout {
    text-decoration: none;
    color: #d9e6ff;
    padding: 12px 14px;
    border-radius: 12px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.sidebar-nav a:hover,
.sidebar-logout:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(2px);
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(35, 215, 242, 0.16), rgba(157, 77, 255, 0.16));
    border: 1px solid rgba(255,255,255,0.08);
}

.dashboard-content {
    padding: 34px 30px;
}

.dashboard-header {
    margin-bottom: 28px;
}

.dashboard-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-top: 8px;
}

.dashboard-subtitle {
    margin: 0;
    max-width: 760px;
}

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

.dashboard-card,
.dashboard-panel {
    background: var(--card-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.dashboard-card strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.dashboard-card span,
.dashboard-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.dashboard-panel h2 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.2rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-18px) translateX(10px);
    }
}

@keyframes pulseLogo {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.018);
    }
}

@media (max-width: 980px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

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

    .hero-card,
    .auth-card {
        padding: 34px 22px;
    }

    .subtitle,
    .auth-subtitle {
        font-size: 1rem;
        line-height: 1.7;
    }

    .actions {
        flex-direction: column;
    }
}
.calc-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 22px;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.calc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.calc-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.result-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
}

.result-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.result-card strong {
    display: block;
    color: #fff;
    font-size: 1.18rem;
    line-height: 1.3;
}

.result-highlight {
    background: linear-gradient(135deg, rgba(35, 215, 242, 0.10), rgba(157, 77, 255, 0.12));
    border-color: rgba(255,255,255,0.12);
}

.calc-empty,
.calc-note {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .calc-grid,
    .calc-results {
        grid-template-columns: 1fr;
    }
}
.history-filter-form {
    margin-bottom: 0;
}

.history-filter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
}

.history-filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.history-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.history-table thead th {
    text-align: left;
    font-size: 0.92rem;
    color: #dce8ff;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}

.history-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--muted);
    font-size: 0.95rem;
    vertical-align: middle;
}

.history-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

@media (max-width: 760px) {
    .history-filter-row {
        grid-template-columns: 1fr;
    }
}