html, body {
	height: 100%;
}

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    overflow-x:hidden;
}

body{
    overflow-x:hidden;
}

body {
	margin: 0;
	font-family: Arial, sans-serif;
	background: #f4f6fb;
	color: #1f1f1f;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.topbar {
	position: fixed;
	top: 0;
	width: 100%;
	background: #0c4da2;
	color: white;
	padding: 12px 0;
	font-weight: 600;
	z-index: 10;
}

.topbar-inner {
	max-width: 1100px;
	margin: auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	position: relative;
}

.topbar-title {
	font-weight: 600;
	flex: 1;
}

.topbar-links {
	display: flex;
	gap: 14px;
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.topbar-links a {
	color: white;
	text-decoration: none;
	font-size: 13px;
	opacity: 0.85;
	white-space: nowrap;
}

.topbar-links a:hover {
	opacity: 1;
	text-decoration: underline;
}

.container {
	max-width: 1100px;
	width: 100%;
	margin: 80px auto 0;
	padding: 0 16px;
	flex: 1;
}

.panel {
	background: white;
	border-radius: 10px;
	padding: 14px;
	box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.filters-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

input, select {
	padding: 9px;
	border: 1px solid #d6dbe6;
	border-radius: 6px;
}

input {
	flex: 1;
}

button {
	background: #0c4da2;
	color: white;
	border: none;
	padding: 9px 14px;
	border-radius: 6px;
	cursor: pointer;
}

button:disabled {
	background: #a9c1ea;
}

#searchBtn {
    background: #0c4da2;
	color: #F4FFFF;
}

#searchBtn:hover:not(:disabled) {
    background: #2b5fa4;
}

#searchBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#dobroBtn {
    background: #550577;
    color: #F4FFFF;
}

#dobroBtn:hover:not(:disabled) {
    background: #712F8E;
}

#dobroBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination-row {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
	align-items: center;
}

.limit {
	font-size: 13px;
	color: #444;
}

.pages {
	display: flex;
	gap: 6px;
}

.page {
	padding: 5px 9px;
	border: 1px solid #d6dbe6;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	background: white;
}

.page:hover {
	background: #eef4ff;
}

.page.active {
	background: #0c4da2;
	color: white;
}

.table-wrap {
	margin-top: 14px;
	margin-bottom: 24px;
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 6px rgba(0,0,0,0.06);
	width: 100%;
}

.table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.table th {
	text-align: left;
	background: #f1f4fa;
	padding: 10px;
	font-size: 13px;
}

.table td {
	padding: 10px;
	border-top: 1px solid #eef1f6;
	font-size: 13px;
	word-wrap: break-word;
}

.table tbody tr:hover {
	background: #f6f9ff;
}

.table-empty{
    text-align:center;
    padding:24px;
    color:#6b7280;
    font-style:italic;
}

.footer {
	margin-top: auto;
	border-top: 1px solid #e6e9ef;
	background: #ffffff;
}

.footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #6b7280;
}

input.invalid {
	border: 1px solid #e74c3c;
	background: #fff5f5;
}

.login-panel {
	max-width: 460px;
	margin: 70px auto 30px;
	background: #fff;
	border-radius: 10px;
	padding: 28px;
	box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.login-panel h2 {
	margin: 0;
	color: #0c4da2;
	font-size: 24px;
}

.login-text {
	margin: 10px 0 24px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.5;
}

.login-panel form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.login-panel label {
	font-size: 14px;
	font-weight: 600;
}

.login-panel input {
	width: 100%;
	box-sizing: border-box;
}

.login-panel button {
	margin-top: 8px;
	width: 100%;
	padding: 11px;
	font-size: 15px;
}

.login-error {
	background: #fff4f4;
	border: 1px solid #f3bcbc;
	color: #c0392b;
	border-radius: 6px;
	padding: 10px;
	font-size: 13px;
}

.footer-stats {
	color: #6b7280;
	font-size: 13px;
	white-space: nowrap;
}

.login-message {
	width: 100%;
	max-width: 518px;
	margin: 18px auto 0;
	padding: 14px 18px;
	box-sizing: border-box;
	border-radius: 12px;
	background: rgba(255, 80, 80, .12);
	border: 1px solid rgba(255, 80, 80, .35);
	color: #ffb3b3;
	text-align: center;
}

.order-link {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #eef4ff;
    color: #0c4da2;
    text-decoration: none;
    font-weight: 600;
    transition: .2s;
}

.order-link:hover {
    background: #dce9ff;
}

.order-link::after {
    content: " ↗";
    font-size: 11px;
    opacity: .7;
}


/* ===========================
    АДАПТИВ
=========================== */

@media (max-width:900px){

    .topbar{
        position:relative;
        padding:14px 0;
    }

    .container{
        margin-top:20px;
    }

    .topbar-inner{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

    .topbar-title{
        width:100%;
        line-height:1.4;
    }

    .topbar-links{
        position:static;
        transform:none;
        width:100%;
        display:flex;
        flex-wrap:wrap;
        gap:10px;
    }

    .filters-row{
        display:flex;
        flex-direction:column;
        align-items:stretch;
    }

    .filters-row input,
    .filters-row select,
    .filters-row button{
        width:100%;
    }

    .pagination-row{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
    }

    .pages{
        display:flex;
        flex-wrap:wrap;
    }

    .footer-inner{
        display:flex;
        flex-direction:column;
        gap:8px;
    }

}

@media (max-width:600px){

    .container{
        padding:0 12px;
    }

    .panel{
        padding:12px;
    }

    .topbar-title{
        font-size:18px;
    }

    .topbar-links a{
        font-size:12px;
    }

    .table-wrap{
        width:100%;
        max-width:100%;
        overflow-x:auto;
        overflow-y:hidden;
        -webkit-overflow-scrolling:touch;
    }

    .table{
        width:700px;
        min-width:700px;
    }

    .table th,
    .table td{
        white-space:nowrap;
    }

    .limit{
        width:100%;
    }

    .limit select{
        width:100%;
        margin-top:6px;
    }

    .pages{
        width:100%;
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:5px;
    }

    .page{
        flex:0 0 auto;
    }

    .login-panel{
        width:100%;
        margin:20px auto;
        padding:20px;
    }

    .login-message{
        width:100%;
    }

    .footer-inner{
        text-align:center;
    }

}

.request-link {
    color:#0c4da2;
    font-weight:600;
    text-decoration:none;
}

.request-link:hover {
    text-decoration:underline;
}