body {
    margin: 0;
    padding: 40px;
    font-family: Arial, sans-serif;
    background: #f3f5f8;
    color: #1f2933;
}

.page-header {
    margin-bottom: 30px;
}

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

.page-header p {
    margin-top: 8px;
    color: #657786;
}

main {
    max-width: 1200px;
}

section {
    margin-bottom: 30px;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.10);
}

.stat {
    width: 180px;
    text-align: center;
}

.stat h1 {
    margin: 10px 0;
    font-size: 50px;
    color: #1f4e79;
}

.stat h3 {
    margin-top: 0;
}

.stat p {
    margin-bottom: 0;
    color: #657786;
    font-size: 14px;
}

.last-upload {
    max-width: 700px;
}

.details {
    margin: 0;
}

.details div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.details div:last-child {
    border-bottom: none;
}

.details dt {
    font-weight: bold;
}

.details dd {
    margin: 0;
    word-break: break-word;
}

.status {
    font-weight: bold;
}

.status-ok_fa3 {
    color: #16803c;
}

.status-invalid_xml,
.status-invalid_xsd {
    color: #b42318;
}

.status-duplicate {
    color: #b26a00;
}

@media (max-width: 700px) {
    body {
        padding: 20px;
    }

    .stat {
        width: 100%;
    }

    .details div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

table{

width:100%;

border-collapse:collapse;

}

th{

background:#1f4e79;

color:white;

padding:12px;

text-align:left;

}

td{

padding:10px;

border-bottom:1px solid #ddd;

}

tr:hover{

background:#f6f6f6;

}

.login-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card input {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
}

button {
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    background: #1f4e79;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #173b5c;
}

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

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

.form-card {
    max-width: 560px;
}

.form-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-card input {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
}

.form-card small {
    margin-top: -6px;
    color: #657786;
}

.button-link {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    background: #1f4e79;
    color: white;
}

.button-link:hover {
    background: #173b5c;
    text-decoration: none;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.user-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.user-active {
    background: #dcfce7;
    color: #166534;
}

.user-locked {
    background: #fee2e2;
    color: #991b1b;
}


button.danger{

background:#c62828;

margin-left:10px;

}

button.success{

background:#2e7d32;

margin-left:10px;

}


.users-table {
    min-width: 1100px;
}

.count {
    display: inline-block;
    min-width: 28px;
    padding: 5px 8px;
    border-radius: 999px;
    text-align: center;
    font-weight: bold;
}

.count-ok {
    background: #dcfce7;
    color: #166534;
}

.count-error {
    background: #fee2e2;
    color: #991b1b;
}

.count-warning {
    background: #fef3c7;
    color: #92400e;
}

.operations {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.operations form {
    margin: 0;
}

button.danger {
    background: #b42318;
}

button.danger:hover {
    background: #8f1c13;
}

button.success {
    background: #16803c;
}

button.success:hover {
    background: #126832;
}

.app-body {
    margin: 0;
    padding: 0;
    background: #f4f7fb;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    display: flex;
    flex-direction: column;
    background: #163a5f;
    color: white;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand strong {
    display: block;
    font-size: 18px;
}

.sidebar-brand small {
    display: block;
    margin-top: 4px;
    color: #bfd0e1;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: white;
    color: #163a5f;
    font-size: 22px;
    font-weight: bold;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #dce8f4;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav a.active {
    background: white;
    color: #163a5f;
    font-weight: bold;
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.logged-user {
    margin-bottom: 12px;
    color: #dce8f4;
    font-size: 14px;
}

.logout-button {
    width: 100%;
    background: #b42318;
}

.logout-button:hover {
    background: #8f1c13;
}

.content-area {
    width: calc(100% - 250px);
    margin-left: 250px;
}

.topbar {
    padding: 28px 34px 20px;
    background: white;
    border-bottom: 1px solid #e3e9f0;
}

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

.topbar p {
    margin: 7px 0 0;
    color: #64748b;
}

.page-content {
    max-width: 1500px;
    padding: 30px 34px;
}

.page-actions {
    margin-bottom: 22px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(300px, 700px);
    gap: 22px;
}

.section-heading {
    margin-top: 30px;
}

.stat {
    flex: 1 1 180px;
    width: auto;
    min-width: 170px;
}

.stat h2 {
    margin: 8px 0;
    font-size: 44px;
    color: #1f4e79;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .app-layout {
        display: block;
    }

    .content-area {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-nav a {
        margin-bottom: 0;
    }

    .page-content,
    .topbar {
        padding-left: 20px;
        padding-right: 20px;
    }
}


.client-body {
    margin: 0;
    padding: 0;
    background: #f4f7fb;
}

.client-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 32px;
    background: #163a5f;
    color: white;
}

.client-header h1 {
    margin: 0;
}

.client-header p {
    margin: 6px 0 0;
    color: #dce8f4;
}

.client-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 36px 24px;
}

.client-upload-card {
    margin-bottom: 24px;
}

.upload-placeholder {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 25px;
    border: 2px dashed #86a3bd;
    border-radius: 14px;
    background: #f8fbfe;
    color: #163a5f;
    text-align: center;
}

.upload-placeholder strong {
    font-size: 20px;
}

.upload-placeholder span {
    color: #64748b;
}

@media (max-width: 700px) {
    .client-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
