/* =========================
   RESET
========================= */

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

:root {

    --primary: #1e40af;
    --primary-light: #dbeafe;

    --bg: #f4f7fb;
    --card: #ffffff;

    --text: #0f172a;
    --text-light: #64748b;

    --border: #e2e8f0;

    --success: #10b981;
    --danger: #ef4444;
    --purple: #7c3aed;

    --shadow:
        0 2px 10px rgba(15, 23, 42, 0.06);

    --radius: 12px;
}

/* =========================
   BODY
========================= */

body {

    font-family:
        "Segoe UI",
        Tahoma,
        Geneva,
        Verdana,
        sans-serif;

    background: var(--bg);

    color: var(--text);

    line-height: 1.5;

    overflow-x: hidden;
}

/* =========================
   HEADER
========================= */

.header {

    height: 64px;

    background: white;

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 24px;

    position: sticky;

    top: 0;

    z-index: 1000;
}

.logo {

    font-size: 22px;

    font-weight: 700;

    color: var(--primary);
}

/* =========================
   LAYOUT
========================= */

.main-container {

    display: flex;

    min-height: calc(100vh - 64px);
}

/* =========================
   SIDEBAR
========================= */

.sidebar {

    width: 250px;

    background: white;

    border-right: 1px solid var(--border);

    padding: 18px 0;
}

.menu-item {

    padding: 14px 22px;

    cursor: pointer;

    color: var(--text);

    transition: 0.2s;

    font-size: 15px;

    font-weight: 500;

    border-left: 4px solid transparent;
}

.menu-item:hover {

    background: #f8fbff;

    color: var(--primary);
}

.menu-item.active {

    background: var(--primary-light);

    color: var(--primary);

    border-left-color: var(--primary);

    font-weight: 600;
}

/* =========================
   CONTENT
========================= */

.content {

    flex: 1;

    padding: 24px;

    overflow-y: auto;
}

iframe {

    width: 100%;

    height: calc(100vh - 115px);

    border: none;

    border-radius: var(--radius);

    background: white;

    box-shadow: var(--shadow);
}

/* =========================
   TITLES
========================= */

h1 {

    font-size: 28px;

    margin-bottom: 24px;

    color: var(--primary);
}

h2 {

    font-size: 20px;

    margin-bottom: 18px;

    color: var(--text);
}

h3 {

    margin-bottom: 14px;
}

/* =========================
   CARDS / FORMS
========================= */

.form-container {

    background: white;

    padding: 28px;

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    margin-bottom: 28px;

    max-width: 620px;
}

/* =========================
   INPUTS
========================= */

label {

    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 600;

    color: var(--text);
}

input,
select,
textarea {

    width: 100%;

    padding: 12px 14px;

    margin-bottom: 20px;

    border: 1px solid #cbd5e1;

    border-radius: 10px;

    background: white;

    font-size: 14px;

    transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea {

    min-height: 120px;

    resize: vertical;
}

/* =========================
   BUTTONS
========================= */

button,
.btn {

    border: none;

    border-radius: 10px;

    padding: 10px 16px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;

    transition: 0.2s;
}

button:hover,
.btn:hover {

    opacity: 0.95;
}

.btn-password {

    background: #2563eb;

    color: white;
}

.btn-active {

    background: var(--success);

    color: white;
}

.btn-inactive {

    background: var(--danger);

    color: white;
}

.btn-update {

    background: var(--purple);

    color: white;
}

.btn-whatsapp {

    background: #25d366;

    color: white;
}

/* =========================
   TABLES
========================= */

table {

    width: 100%;

    border-collapse: separate;

    border-spacing: 0;

    background: white;

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow: var(--shadow);

    margin-top: 20px;
}

thead {

    background: var(--primary);
}

th {

    color: white;

    text-align: left;

    padding: 16px;

    font-size: 14px;

    font-weight: 600;
}

td {

    padding: 18px 16px;

    border-bottom: 1px solid var(--border);

    vertical-align: middle;

    font-size: 14px;
}

tr:last-child td {

    border-bottom: none;
}

tbody tr:hover {

    background: #f8fbff;
}

/* =========================
   ALERTS
========================= */

.message {

    padding: 14px 18px;

    border-radius: 10px;

    margin-bottom: 20px;

    font-weight: 500;
}

.success {

    background: #ecfdf5;

    color: #065f46;
}

/* =========================
   MODAL
========================= */

#passwordModal {

    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.6);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 9999;

    padding: 20px;
}

#passwordModal > div {

    background: white;

    width: 100%;

    max-width: 440px;

    padding: 28px;

    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.2);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1024px) {

    .sidebar {

        width: 220px;
    }
}

@media (max-width: 768px) {

    .main-container {

        flex-direction: column;
    }

    .sidebar {

        width: 100%;

        display: flex;

        overflow-x: auto;

        padding: 0;

        border-right: none;

        border-bottom: 1px solid var(--border);
    }

    .menu-item {

        white-space: nowrap;

        border-left: none;

        border-bottom: 3px solid transparent;
    }

    .menu-item.active {

        border-left: none;

        border-bottom-color: var(--primary);
    }

    .content {

        padding: 14px;
    }

    iframe {

        height: calc(100vh - 170px);
    }

    table {

        display: block;

        overflow-x: auto;
    }

    .form-container {

        max-width: 100%;
    }
}

@media (max-width: 480px) {

    .header {

        padding: 0 14px;
    }

    .logo {

        font-size: 18px;
    }

    h1 {

        font-size: 22px;
    }

    h2 {

        font-size: 18px;
    }

    .form-container {

        padding: 18px;
    }

    button,
    .btn {

        width: 100%;
    }
}
.warning-row {

    background: #ffdddd !important;

    animation:
        warningFlash 1s infinite;
}

@keyframes warningFlash {

    0% {

        background: #ffdddd;
    }

    50% {

        background: #ff4d4d;
    }

    100% {

        background: #ffdddd;
    }
}

