* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

button,
input {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   LAYOUT
========================= */

:root {
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden;
}


.sidebar-nav,
.main-content,
.content-wrapper,
.page-section {
    min-width: 0;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: var(--sidebar-width);
    background: #111827;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
}


.sidebar-logo {
    height: 90px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #263244;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.sidebar-logo h2 {
    font-size: 17px;
}

.sidebar-logo span {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 25px 14px;
    flex: 1;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #6b7280;
    padding: 14px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 3px;
    transition: .2s;
}

.nav-item:hover {
    background: #1f2937;
    color: #fff;
}

.nav-item.active {
    background: #2563eb;
    color: #fff;
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid #263244;
}

.security-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 15px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.logout-button {
    width: 100%;
    background: transparent;
    border: 1px solid #374151;
    color: #cbd5e1;
    padding: 9px;
    border-radius: 7px;
    cursor: pointer;
}

.logout-button:hover {
    background: #1f2937;
}


/* =========================
   MAIN
========================= */

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.topbar {
    min-height: 90px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.breadcrumb {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 5px;
}

.breadcrumb-separator {
    margin: 0 7px;
}

.page-heading h1 {
    font-size: 23px;
}

.page-heading p {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.admin-info strong {
    display: block;
    font-size: 13px;
}

.admin-info span {
    display: block;
    font-size: 11px;
    color: #9ca3af;
}

.account-arrow {
    color: #9ca3af;
    margin-left: 5px;
}


/* =========================
   CONTENT
========================= */

.content-wrapper {
    padding: 35px;
}

.page-section {
    max-width: 1200px;
    margin: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 20px;
}

.section-header p {
    color: #6b7280;
    font-size: 13px;
    margin-top: 5px;
}


/* =========================
   READER STATUS
========================= */

.reader-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 600;
}


/* =========================
   OPERATION CARDS
========================= */

.card-operation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.operation-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
}

.operation-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.operation-content h3 {
    font-size: 15px;
    margin-bottom: 7px;
}

.operation-content p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 18px;
}


/* =========================
   BUTTONS
========================= */

.primary-button,
.secondary-button,
.danger-button {
    border: 0;
    border-radius: 7px;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.primary-button {
    background: #2563eb;
    color: #fff;
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    background: #f3f4f6;
    color: #374151;
}

.secondary-button:hover {
    background: #e5e7eb;
}

.danger-button {
    background: #fef2f2;
    color: #dc2626;
}

.danger-button:hover {
    background: #fee2e2;
}


/* =========================
   CARD STATUS
========================= */

.card-status-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 25px;
}

.panel-header {
    padding: 22px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.panel-header h2 {
    font-size: 16px;
}

.panel-header p {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.status-item {
    padding: 22px 25px;
    border-right: 1px solid #e5e7eb;
}

.status-item:last-child {
    border-right: none;
}

.status-label {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    margin-bottom: 7px;
}

.status-item strong {
    font-size: 13px;
}

.status-success {
    color: #059669;
}


/* =========================
   CONFIGURATION
========================= */

.configuration-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.configuration-header {
    padding: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.configuration-header h3 {
    font-size: 16px;
}

.configuration-header p {
    color: #6b7280;
    font-size: 12px;
    margin-top: 5px;
}

.configuration-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
}

.form-group input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    font-size: 13px;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
}

.form-group input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 11px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}


/* =========================
   PROFILE
========================= */

.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
}

.profile-preview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    height: fit-content;
}

.large-avatar {
    width: 85px;
    height: 85px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 600;
}

.profile-preview-card h3 {
    font-size: 16px;
}

.profile-preview-card > p {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
}

.profile-divider {
    border-top: 1px solid #e5e7eb;
    margin: 25px 0;
}

.profile-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.profile-info span {
    color: #9ca3af;
}

.profile-info strong {
    font-weight: 600;
}

.alert {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 5px;
    align-items: center;
    margin: 1rem;
}

.success {
    color: #0a3622;
    background-color: #d1e7dd;
    border: 1px solid #a3cfbb;
}

.error {
    color: #58151c;
    background-color: #f8d7da;
    border: 1px solid #f1aeb5;
}

.closeAlertBtn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2rem;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    :root {
        --sidebar-width: 220px;
    }

    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-item {
        border-bottom: 1px solid #e5e7eb;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .configuration-card,
    .card,
    .content-card {
        max-width: 100%;
        min-width: 0;
    }

    input,
    select,
    textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
}


@media (max-width: 750px) {

    :root {
        --sidebar-width: 70px;
    }

    .sidebar-logo div:not(.logo-icon),
    .nav-item span:not(.nav-icon),
    .nav-section-title,
    .security-status,
    .logout-button {
        display: none;
    }

    .sidebar-logo {
        justify-content: center;
        padding: 15px;
    }

    .sidebar-nav {
        padding: 20px 10px;
        min-width: 0;
    }

    .nav-item {
        justify-content: center;
        min-width: 0;
    }

    .main-content {
        min-width: 0;
    }

    .topbar {
        padding: 18px;
        min-width: 0;
    }

    .content-wrapper {
        padding: 20px;
        min-width: 0;
    }

    .card-operation-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-info,
    .account-arrow {
        display: none;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}