* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #111827, #020617);
    color: #ffffff;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* =========================
   TOPO DO APLICATIVO
========================= */

.app-header {
    text-align: center;
    margin-bottom: 24px;
}

.header-card {
    position: relative;
    overflow: hidden;
    padding: 22px 18px;
    background: linear-gradient(180deg, #111827, #0f172a);
    border: 1px solid #334155;
}

.header-card::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    width: 220px;
    height: 220px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(34,197,94,0.22), transparent 65%);
    pointer-events: none;
}

.logo-wrap {
    position: relative;
    z-index: 1;
    width: 106px;
    height: 106px;
    margin: 0 auto 14px;
    padding: 5px;
    border-radius: 26px;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 14px 35px rgba(0,0,0,0.45);
}

.app-logo {
    width: 96px;
    height: 96px;
    display: block;
    border-radius: 22px;
    background: #020617;
    object-fit: cover;
}

.header-text {
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    margin: 0;
    font-size: 27px;
    font-weight: bold;
    letter-spacing: -0.4px;
}

h2 {
    text-align: center;
    margin: 8px 0 0;
    font-size: 15px;
    font-weight: normal;
    color: #cbd5e1;
}

h3 {
    margin-top: 0;
}

/* =========================
   DASHBOARD
========================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.dashboard-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}

.dashboard-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.dashboard-item span {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #22c55e;
}

.dashboard-item small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #cbd5e1;
}

/* =========================
   CARDS
========================= */

.card {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #cbd5e1;
}

input,
textarea {
    width: 100%;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 12px;
    background: #020617;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}

textarea {
    height: 72px;
    resize: none;
}

/* =========================
   BOTÕES
========================= */

button {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #22c55e;
    color: #052e16;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(34,197,94,0.22);
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.result-card {
    display: none;
}

.show {
    display: block;
}

.hidden {
    display: none;
}

#loginCard {
    margin-bottom: 20px;
}

#adminPassword {
    margin-bottom: 12px;
}

/* =========================
   LICENÇAS
========================= */

.licenses-list {
    margin-top: 16px;
}

.license-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
}

.license-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.license-header h3 {
    margin: 0;
    font-size: 16px;
    word-break: break-word;
}

.license-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #cbd5e1;
    word-break: break-word;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.status-active {
    background: #22c55e;
    color: #052e16;
}

.status-inactive {
    background: #facc15;
    color: #422006;
}

.status-revoked {
    background: #ef4444;
    color: #450a0a;
}

.license-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.license-actions button {
    width: 100%;
    margin-top: 0;
    padding: 11px 8px;
    font-size: 14px;
    border-radius: 10px;
    white-space: nowrap;
}

.btn-revoke {
    background: #ef4444;
    color: #450a0a;
    box-shadow: 0 8px 18px rgba(239,68,68,0.18);
}

.btn-reactivate {
    background: #38bdf8;
    color: #082f49;
    box-shadow: 0 8px 18px rgba(56,189,248,0.18);
}

.btn-delete {
    background: #991b1b;
    color: #fee2e2;
    box-shadow: 0 8px 18px rgba(153,27,27,0.20);
}