* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f8f1f6;
    color: #2c2430;
}

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, #ffd7ea 0, transparent 32%),
        linear-gradient(135deg, #5f2c82, #c96b9d);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.login-card {
    background: rgba(255,255,255,0.96);
    border-radius: 28px;
    padding: 30px 24px;
    box-shadow: 0 24px 60px rgba(46, 22, 65, 0.28);
}

.logo-area {
    text-align: center;
    margin-bottom: 24px;
}

.logo-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d86ba7, #7f3bb5);
    color: white;
    display: grid;
    place-items: center;
    font-size: 34px;
    box-shadow: 0 10px 25px rgba(127, 59, 181, 0.35);
}

.logo-area h1,
.page-title h1,
.hero-card h1 {
    margin: 0;
}

.logo-area p,
.page-title p,
.hero-card p,
.content-card p {
    color: #6f6175;
}

label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #ead8e5;
    border-radius: 16px;
    font-size: 16px;
    outline: none;
    background: #fff;
}

input:focus {
    border-color: #b34b91;
    box-shadow: 0 0 0 4px rgba(179, 75, 145, 0.12);
}

button,
.btn-primary,
.btn-secondary {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button,
.btn-primary {
    background: linear-gradient(135deg, #b34b91, #6d3bb5);
    color: white;
    box-shadow: 0 10px 24px rgba(109, 59, 181, 0.25);
}

.btn-secondary {
    background: #efe5ee;
    color: #4d3b54;
}

.login-help {
    font-size: 13px;
    text-align: center;
    color: #6f6175;
    margin-top: 20px;
}

.alert {
    padding: 13px 14px;
    border-radius: 14px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-error {
    background: #ffe3e3;
    color: #8a1f1f;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ead8e5;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar div {
    display: flex;
    flex-direction: column;
}

.topbar small {
    color: #7a6a7e;
    font-size: 12px;
}

.topbar nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.topbar nav a {
    text-decoration: none;
    color: #4d3b54;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 9px;
    border-radius: 12px;
}

.topbar nav a:hover {
    background: #f0e1ec;
}

.topbar nav .sair {
    color: #b6244f;
}

.app-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 14px 40px;
}

.hero-card,
.content-card,
.form-card,
.list-card,
.stat-card,
.action-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(81, 55, 91, 0.08);
    border: 1px solid #f1e3ee;
}

.hero-card {
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 198, 226, 0.9), transparent 40%),
        linear-gradient(135deg, #ffffff, #fff6fb);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 16px 0;
}

.stat-card,
.action-card {
    padding: 18px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card span {
    color: #6f6175;
    font-size: 14px;
}

.stat-card strong {
    font-size: 38px;
    color: #7f3bb5;
}

.action-card {
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #d86ba7, #7f3bb5);
}

.action-card span {
    font-size: 38px;
    line-height: 1;
}

.content-card {
    padding: 22px;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-title .btn-primary {
    width: auto;
    margin: 0;
    white-space: nowrap;
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.search-box button {
    width: auto;
    margin: 0;
    padding-left: 18px;
    padding-right: 18px;
}

.list-card {
    padding: 8px;
}

.client-item {
    padding: 16px;
    border-bottom: 1px solid #f0e1ec;
}

.client-item:last-child {
    border-bottom: 0;
}

.client-item h3 {
    margin: 0 0 8px;
    color: #3e2d45;
}

.client-item p {
    margin: 4px 0;
    color: #66576c;
    font-size: 14px;
}

.client-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.client-actions a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    background: #f1e5ef;
    color: #6d3bb5;
    padding: 11px;
    border-radius: 14px;
    font-weight: 700;
}

.client-actions .danger {
    color: #b6244f;
    background: #ffe7ed;
}

.form-card {
    padding: 20px;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: #6f6175;
}

.empty-state a {
    color: #7f3bb5;
    font-weight: 700;
}

@media (min-width: 650px) {
    .client-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .client-actions {
        min-width: 190px;
    }
}

@media (max-width: 420px) {
    .topbar {
        align-items: flex-start;
        gap: 8px;
    }

    .topbar nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

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

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }
}
