* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #222;
}

.header {
    background: #111827;
    color: white;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.header span {
    font-size: 13px;
    color: #cbd5e1;
}

.layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 220px;
    background: #1f2937;
    padding-top: 20px;
}

.sidebar a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    padding: 14px 22px;
    font-size: 15px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #374151;
    color: white;
}

.content {
    flex: 1;
    padding: 28px;
}

.page-title {
    margin-top: 0;
    font-size: 25px;
}

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

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.card-title {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 30px;
    font-weight: bold;
}

.green {
    color: #16a34a;
}

.red {
    color: #dc2626;
}

.blue {
    color: #2563eb;
}

.orange {
    color: #ea580c;
}

.panel {
    background: white;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

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

.panel-header h2 {
    margin: 0;
    font-size: 19px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-warning {
    background: #ea580c;
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f3f4f6;
    text-align: left;
    padding: 12px;
    font-size: 13px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.badge {
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

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

.badge-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.badge-mac {
    background: #dbeafe;
    color: #1e40af;
}

.badge-voucher {
    background: #fef3c7;
    color: #92400e;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
}

.full {
    grid-column: 1 / -1;
}

.actions {
    display: flex;
    gap: 6px;
}

.search-box {
    padding: 10px;
    width: 280px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        width: 180px;
    }

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

@media (max-width: 600px) {
    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
    }

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

    .content {
        padding: 15px;
        overflow-x: auto;
    }

    .search-box {
        width: 100%;
    }
}

.imsy-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
    color: #e2e8f0;
    font-size: 12px;
}
.imsy-admin-toolbar form { margin: 0; }
.imsy-admin-toolbar button {
    border: 1px solid #64748b;
    border-radius: 7px;
    padding: 8px 12px;
    color: #fff;
    background: #273449;
    font-weight: 700;
    cursor: pointer;
}
.imsy-admin-toolbar button:hover { background: #374b67; }
@media (max-width: 600px) {
    .header { flex-wrap: wrap; gap: 8px; }
    .imsy-admin-toolbar { width: 100%; justify-content: space-between; margin: 4px 0 0; }
    .topbar { flex-wrap: wrap; gap: 8px; }
}
