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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

.app {
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: #111827;
    padding: 25px 18px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 35px;
}

.logo span {
    display: block;
    color: #94a3b8;
    font-size: 14px;
    margin-top: 3px;
}

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

.sidebar nav a {
    padding: 12px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    cursor: pointer;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #1e293b;
    color: white;
}

.content {
    margin-left: 250px;
    padding: 30px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

header h1 {
    font-size: 30px;
}

header p {
    color: #94a3b8;
    margin-top: 4px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.card {
    background: #1e293b;
    border-radius: 16px;
    padding: 20px;
}

.card span {
    color: #94a3b8;
    display: block;
}

.card strong {
    font-size: 32px;
    display: block;
    margin-top: 8px;
}

.card.danger {
    border-left: 4px solid #ef4444;
}

.card.warning {
    border-left: 4px solid #f59e0b;
}

.forecast {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.forecast div {
    background: #1e293b;
    border-radius: 16px;
    padding: 20px;
}

.forecast span {
    color: #94a3b8;
}

.forecast strong {
    display: block;
    font-size: 25px;
    margin-top: 7px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.quick-actions button {
    border: 0;
    background: #1e293b;
    color: #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
}

.quick-actions span {
    background: #334155;
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 5px;
}

.clients {
    margin-top: 30px;
    background: #111827;
    border-radius: 18px;
    padding: 20px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.section-title input {
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 11px 13px;
    border-radius: 9px;
    width: 280px;
}

.client-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.client {
    background: #1e293b;
    padding: 14px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.client-info strong {
    display: block;
    margin-bottom: 4px;
}

.client-info span {
    color: #94a3b8;
    display: block;
    font-size: 14px;
}

.client-info small {
    color: #64748b;
}

.client-actions {
    display: flex;
    gap: 8px;
}

.client-actions a,
.client-actions button {
    border: 0;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp {
    background: #16a34a;
    color: white;
}

.client-actions button {
    background: #2563eb;
    color: white;
}

.mobile-nav {
    display: none;
}

@media (max-width: 768px) {

    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        padding: 18px 14px 90px;
    }

    header h1 {
        font-size: 24px;
    }

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

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

    .section-title {
        flex-direction: column;
        align-items: stretch;
    }

    .section-title input {
        width: 100%;
    }

    .client {
        flex-direction: column;
        align-items: stretch;
    }

    .client-actions {
        width: 100%;
    }

    .client-actions a,
    .client-actions button {
        flex: 1;
        text-align: center;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #111827;
        border-top: 1px solid #334155;
        justify-content: space-around;
        padding: 9px 3px;
        z-index: 50;
    }

    .mobile-nav a {
        color: #cbd5e1;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 18px;
    }

    .mobile-nav span {
        font-size: 10px;
    }
}


/* ==========================================
   GESTOR WEB V2
========================================== */

a {
    color: inherit;
}

.card {
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #334155;
    color: white;
    padding: 10px 14px;
    border-radius: 9px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.btn.primary {
    background: #2563eb;
}

.btn.whatsapp,
.whatsapp {
    background: #16a34a;
    color: white;
}

.btn.full {
    width: 100%;
}

.btn.big {
    margin-top: 18px;
}

.quick {
    border: 0;
    background: #1e293b;
    color: #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    text-decoration: none;
}

.quick span {
    background: #334155;
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 5px;
}

.client-name {
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.client-name:hover {
    text-decoration: underline;
}

.status {
    padding: 3px 7px;
    border-radius: 50px;
    margin-left: 5px;
    font-size: 11px;
}

.status.active {
    background: #14532d;
    color: #bbf7d0;
}

.status.expired {
    background: #7f1d1d;
    color: #fecaca;
}

.status.today {
    background: #78350f;
    color: #fde68a;
}

.status.inactive {
    background: #334155;
    color: #cbd5e1;
}

.search-form {
    display: flex;
    gap: 7px;
}

.search-form input {
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 11px 13px;
    border-radius: 9px;
    min-width: 280px;
}

.flash {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.flash.success {
    background: #14532d;
}

.flash.error {
    background: #7f1d1d;
}

.form-card {
    background: #111827;
    border-radius: 18px;
    padding: 22px;
    max-width: 900px;
}

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

.form-card label {
    display: block;
    color: #94a3b8;
    margin-bottom: 7px;
    font-size: 13px;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    border-radius: 9px;
    padding: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.detail-card {
    background: #1e293b;
    border-radius: 14px;
    padding: 16px;
}

.detail-card span {
    display: block;
    color: #94a3b8;
    margin-bottom: 6px;
    font-size: 13px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.history {
    max-width: 900px;
}

.history h2 {
    margin-bottom: 17px;
}

.history-row {
    display: flex;
    justify-content: space-between;
    background: #1e293b;
    border-radius: 10px;
    padding: 13px;
    margin-bottom: 8px;
}

.history-row span {
    display: block;
    color: #94a3b8;
    margin-top: 4px;
    font-size: 13px;
}

.renew-current {
    background: #1e293b;
    padding: 18px;
    border-radius: 13px;
    margin-bottom: 24px;
}

.renew-current span {
    display: block;
    color: #94a3b8;
}

.renew-current strong {
    display: block;
    font-size: 25px;
    margin: 6px 0;
}

.renew-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.form-note {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-card hr {
    border: 0;
    border-top: 1px solid #334155;
    margin: 25px 0;
}

.copy-area {
    height: 210px;
    margin-top: 10px;
    resize: vertical;
}

.renew-result {
    font-size: 28px;
    font-weight: bold;
    margin: 12px 0 25px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #111827;
    padding: 30px;
    border-radius: 20px;
}

.login-logo {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 30px;
}

.login-logo span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
}

.login-card h1 {
    margin-bottom: 5px;
}

.login-card p {
    color: #94a3b8;
    margin-bottom: 22px;
}

.login-card label {
    display: block;
    margin: 13px 0 6px;
    color: #94a3b8;
}

.login-card input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    padding: 13px;
    border-radius: 9px;
    color: white;
}

.login-card button {
    margin-top: 20px;
}

.empty {
    color: #94a3b8;
    padding: 30px;
    text-align: center;
}


@media (max-width: 768px) {

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

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

    .header-actions {
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        min-width: 0;
        flex: 1;
    }

    header {
        align-items: flex-start;
        gap: 12px;
    }

    .renew-buttons form {
        flex: 1;
    }

    .renew-buttons button {
        width: 100%;
    }

}


@media (max-width: 460px) {

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

}

.server-box {
    margin-bottom: 18px;
}

.server-box h2 {
    margin-bottom: 10px;
}

.server-rule {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 20px;
}

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.plan-row {
    display: grid;
    grid-template-columns: 1fr 170px 100px;
    gap: 12px;
    align-items: center;
    background: #1e293b;
    padding: 13px;
    border-radius: 11px;
}

.plan-name strong,
.plan-name span {
    display: block;
}

.plan-name span {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 3px;
}

.plan-price {
    display: flex;
    align-items: center;
    gap: 7px;
}

.plan-price input {
    width: 100%;
}

.renew-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.renew-plan-card {
    background: #1e293b;
    border-radius: 14px;
    padding: 17px;
}

.renew-plan-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.renew-plan-title span {
    color: #94a3b8;
}

.renew-plan-value {
    font-size: 23px;
    font-weight: bold;
    margin: 14px 0;
}

.base-option {
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 10px 0;
    cursor: pointer;
}

.base-option input {
    width: auto !important;
}

.not-configured {
    color: #f59e0b;
    font-size: 13px;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 768px) {

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

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

}


/* ===== GESTOR WEB V3 ===== */

.sidebar nav a {
    transition: .15s;
}

.sidebar nav a:hover {
    transform: translateX(2px);
}

.header-actions form {
    margin: 0;
}

.card small {
    color: #94a3b8;
    display: block;
    margin-top: 5px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.quick.selected {
    background: #2563eb;
}

.two-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-top: 18px;
}

.bar-item {
    margin-top: 17px;
}

.bar-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
}

.bar-track {
    width: 100%;
    height: 9px;
    border-radius: 99px;
    background: #334155;
    overflow: hidden;
}

.bar-fill {
    min-width: 4px;
    height: 100%;
    background: #2563eb;
    border-radius: 99px;
}

.period-box {
    background: #1e293b;
    border-radius: 13px;
    padding: 25px;
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
    margin-top: 15px;
}

.finance-table {
    margin-top: 18px;
}

.finance-row {
    display: grid;
    grid-template-columns:
        170px
        1fr
        1fr
        1fr
        110px;

    gap: 10px;
    align-items: center;

    padding: 12px;
    border-bottom: 1px solid #253047;
}

.finance-head {
    color: #94a3b8;
    font-size: 12px;
    font-weight: bold;
}

.report-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    background: #1e293b;

    padding: 12px 14px;
    margin-top: 8px;

    border-radius: 9px;
}

.focus-client {
    max-width: 850px;
    background: #111827;
    border-radius: 20px;
    padding: 25px;
}

.focus-name span {
    color: #94a3b8;
    font-size: 13px;
}

.focus-name h2 {
    font-size: 32px;
    margin-top: 5px;
}

.focus-name p {
    color: #94a3b8;
    margin-top: 5px;
}

.focus-data {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 12px;
    margin-top: 25px;
}

.focus-data > div {
    background: #1e293b;
    border-radius: 13px;
    padding: 16px;
}

.focus-data span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 5px;
}

.focus-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
    margin-top: 18px;
}

.big-action {
    min-height: 48px;
}

.focus-process {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.success-btn {
    background: #15803d;
}

.empty-day {
    text-align: center;
}

.done-icon {
    font-size: 45px;
    margin-bottom: 15px;
}

.settings-section {
    margin-top: 18px;
}

.settings-label {
    margin-top: 22px;
}

.settings-textarea {
    min-height: 180px;
    resize: vertical;
}

.tag-help {
    color: #64748b;
    font-size: 12px;
    margin-top: 7px;
}


@media (max-width: 900px) {

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

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

    .finance-head {
        display: none;
    }

}


@media (max-width: 768px) {

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

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

    .focus-process {
        flex-direction: column;
    }

    .focus-process form,
    .focus-process button {
        width: 100%;
    }

    .finance-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;

        background: #1e293b;
        border: 0;
        border-radius: 10px;

        margin-top: 8px;
    }

}
