* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* LOGIN */

.login-body {
    background: linear-gradient(135deg, #0D1B2A, #1B4332);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.login-container {
    width: 100%;
    max-width: 430px;
    padding: 24px;
}

.login-card {
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 26px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
}

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

.logo h1 {
    margin: 0;
    font-size: 34px;
}

.logo p {
    margin: 10px 0 0;
    opacity: 0.85;
    line-height: 1.4;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: 1px solid #ccd8d0;
    outline: none;
    font-size: 16px;
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: #52B788;
    color: #0D1B2A;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #74C69D;
}

.error {
    background: rgba(230,57,70,0.22);
    border: 1px solid rgba(230,57,70,0.45);
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}

.link a {
    color: #95D5B2;
    font-weight: bold;
    text-decoration: none;
}

.link.dark a {
    color: #1B4332;
}

.version {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.65;
}

/* REGISTRO */

.registro-body {
    background: #F4F7F5;
    color: #0D1B2A;
}

.registro-header {
    background: linear-gradient(135deg, #0D1B2A, #1B4332);
    color: white;
    padding: 34px 20px;
    text-align: center;
}

.registro-header h1 {
    margin: 0;
    font-size: 36px;
}

.registro-header p {
    opacity: 0.9;
}

.registro-container {
    max-width: 980px;
    margin: 28px auto;
    padding: 0 20px;
}

.registro-card {
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(13,27,42,0.08);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.section {
    margin-bottom: 28px;
}

.note {
    background: #D8F3DC;
    color: #1B4332;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 22px;
}

.help-icon {
    color: #2563eb;
    font-size: 14px;
    margin-left: 6px;
    cursor: help;
}

.phone-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.phone-prefix {
    width: 115px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F4F7F5;
    border: 1px solid #ccd8d0;
    border-radius: 12px;
    font-weight: 700;
    color: #1B4332;
    flex-shrink: 0;
}

.phone-row input {
    height: 48px;
    flex: 1;
}

/* DASHBOARD */

.dashboard-body {
    background: #F4F7F5;
    color: #0D1B2A;
}

.layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

aside {
    background: #0D1B2A;
    color: white;
    padding: 26px 22px;
}

aside h2 {
    margin: 0 0 30px;
    font-size: 26px;
}

.menu-space {
    height: 18px;
}

nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    margin-bottom: 7px;
    opacity: 0.9;
}

nav a:hover,
nav a.active {
    background: rgba(82,183,136,0.18);
}

main {
    padding: 32px;
}

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

.topbar h1 {
    margin: 8px 0 0;
    font-size: 34px;
}

.logout {
    background: #1B4332;
    color: white;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    background: #D8F3DC;
    color: #1B4332;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 13px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 18px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(13,27,42,0.08);
    min-height: 135px;
}

.card .icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.card .number {
    font-size: 34px;
    font-weight: bold;
    margin-bottom: 8px;
}

.card .label {
    color: #52635A;
    font-size: 15px;
}

.card.warning {
    border-left: 6px solid #FFB703;
}

.card.ai {
    border-left: 6px solid #52B788;
}

.panel {
    margin-top: 24px;
    background: white;
    padding: 26px;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(13,27,42,0.08);
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

@media (max-width: 620px) {
    .phone-row {
        flex-direction: column;
    }

    .phone-prefix {
        width: 100%;
    }
}

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

    main {
        padding: 20px;
    }

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

.flag-cl {
    width: 28px;
    height: 18px;
    display: inline-block;
    border: 1px solid #d1d5db;
    background:
        linear-gradient(to bottom, #ffffff 0 50%, #d52b1e 50% 100%);
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.flag-cl::before {
    content: "";
    position: absolute;
    width: 11px;
    height: 9px;
    background: #0039a6;
    left: 0;
    top: 0;
}

.flag-cl::after {
    content: "★";
    position: absolute;
    color: #ffffff;
    font-size: 6px;
    left: 2px;
    top: 0px;
}

.phone-prefix {
    gap: 8px;
}