body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

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

.login-box, .card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 24px;
}

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

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

.sidebar {
    width: 250px;
    background: #111827;
    color: #fff;
    padding: 24px;
}

.sidebar h2 { margin-top: 0; font-size: 22px; }
.sidebar nav { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.sidebar a {
    color: #d1d5db;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
}
.sidebar a:hover { background: #1f2937; color: #fff; }
.userbox {
    margin-top: 24px;
    padding: 12px;
    background: #1f2937;
    border-radius: 10px;
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.table-wrap, .form-wrap, .toolbar {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.table-scroll { overflow-x: auto; }

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

th, td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

input, select, textarea, button {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
}

label { display: block; margin-bottom: 6px; font-weight: bold; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
button {
    background: #2563eb;
    color: white;
    border: 0;
    cursor: pointer;
}
button:hover { background: #1d4ed8; }
.button-secondary { background: #374151; }
.button-danger { background: #b91c1c; }
.inline-form { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.muted { color: #6b7280; }
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 12px;
}
.rack-visual {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.rack-u, .rack-slot {
    border-bottom: 1px solid #e5e7eb;
    min-height: 42px;
    display: flex;
    align-items: center;
}
.rack-u {
    justify-content: center;
    background: #f9fafb;
    font-weight: bold;
}
.rack-slot {
    padding: 0 12px;
}
.rack-slot.empty { color: #9ca3af; }
.rack-device {
    width: 100%;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 8px 10px;
}
.rack-device small { display: block; color: #1e3a8a; margin-top: 4px; }
.drawing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.drawing-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}
.drawing-preview {
    background: #f3f4f6;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drawing-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.drawing-content { padding: 16px; }
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: auto; }
}

.drawing-stage {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f3f4f6;
}
.drawing-stage img {
    display: block;
    width: 100%;
    height: auto;
}
.drawing-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transform: translate(-50%, -50%);
}
.drawing-marker.type-device { background: #2563eb; }
.drawing-marker.type-cable { background: #16a34a; }
.drawing-marker.type-rack { background: #7c3aed; }
.drawing-marker.type-note { background: #ea580c; }

.sidebar a.active { background: #2563eb; color: #fff; }
.nav-group-title { margin-top: 16px; color: #9ca3af; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.project-pill { background:#1f2937; color:#fff; border:1px solid #374151; padding:8px 10px; border-radius:999px; font-size:13px; margin-bottom:14px; }
.breadcrumbs { color:#6b7280; margin-bottom:12px; }
.card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.project-card { background:white; border-radius:14px; box-shadow:0 10px 20px rgba(0,0,0,0.05); padding:20px; }
.link-card { text-decoration:none; color:inherit; display:block; }


.sidebar-project-box {
    margin-top: 24px;
    padding: 14px;
    background: #172033;
    border: 1px solid #253047;
    border-radius: 14px;
}
.sidebar-project-label {
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}
.sidebar-project-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    word-break: break-word;
}
.sidebar-project-switch,
.top-switch-link {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: #2563eb;
    padding: 9px 12px;
    border-radius: 10px;
}
.sidebar-project-switch:hover,
.top-switch-link:hover {
    background: #1d4ed8;
}
.project-shell-header {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    padding: 22px;
    margin-bottom: 20px;
}
.project-shell-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.project-shell-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
}
.project-shell-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    color: #6b7280;
    margin-top: 8px;
}
.project-shell-meta .dot {
    color: #9ca3af;
}
.project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}
.project-tabs a {
    text-decoration: none;
    color: #374151;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
}
.project-tabs a:hover {
    background: #e5e7eb;
}
.project-tabs a.active {
    background: #2563eb;
    color: #fff;
}
@media (max-width: 900px) {
    .project-shell-top {
        flex-direction: column;
    }
}


.page-header-simple{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:20px;}
.form-grid-project-search{grid-template-columns:2fr 1fr;}
