.cabinet-grid-container {
    overflow-x: auto;
    padding: 10px;
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cabinet-grid {
    display: grid;
    grid-template-rows: 40px repeat(<?= $cabinet['columns'] ?>, 150px);
    grid-template-columns: 40px repeat(<?= $cabinet['size'] ?>, 40px);
    gap: 4px;
}
.grid-header {
    grid-row: 1;
    grid-column: 1;
}
.row-header {
    padding: 8px;
    font-weight: bold;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    height: 150px;
}
.column-header {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1;
    width: 40px;
}
.grid-cell {
    position: relative;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
    overflow: visible;
    width: 40px;
    height: 150px;
}
.grid-cell.occupied {
    border: none;
    background-color: transparent;
}
.grid-cell.breaker-start {
    z-index: 2;
    cursor: pointer;
}
.grid-cell.occupied.breaker-start:hover {
    z-index: 5;
}
.grid-cell.occupied.breaker-start:hover .breaker-visual {
    box-shadow: 0 0 0 4px #0d6efd;
}
.grid-cell .position-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 10px;
    color: #000000;
    z-index: 3;
}
.breaker-visual {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: 1px solid #555;
    border-radius: 4px;
    transition: box-shadow 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2);
    z-index: 2;
    overflow: hidden;
    background: linear-gradient(to bottom, #ececec, #f7f7f7);
    color: #333;
}
.breaker-visual.size-1 { width: 40px; }
.breaker-visual.size-2 { width: 84px; }
.breaker-visual.size-3 { width: 128px; }
.breaker-visual.size-4 { width: 172px; }

.breaker-top, .breaker-bottom {
    height: 15px;
    background: #e0e0e0;
    border-bottom: 1px solid #b0b0b0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}
.breaker-bottom {
    border-top: 1px solid #b0b0b0;
    border-bottom: none;
}
.breaker-pole-screw {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a9a9a94f;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3), 0 1px 1px rgba(255,255,255,0.1);
    position: relative;
}
.breaker-pole-screw::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 4px;
    background: #777;
    border-radius: 1px;
}
.breaker-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    position: relative;
    text-align: center;
}
.breaker-label-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}
.breaker-brand-small {
    font-size: 7px;
    font-weight: bold;
    color: #555;
}
.breaker-amperage {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    flex-grow: 1;
    text-align: right;
    padding-right: 2px;
}
.breaker-indicator-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eee;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.breaker-indicator-led.active-red {
    background: #dc3545;
    border: 1px solid #991f2c;
    box-shadow: inset 0 0 5px rgba(255, 0, 0, 0.5), 0 0 5px rgba(255, 0, 0, 0.5);
}
.breaker-toggle-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    position: relative;
}
.breaker-toggle {
    width: 99%;
    height: 25px;
    background-color: #214b89;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    position: relative;
    border: 1px solid #0a58ca;
}
.toggle-text {
    position: absolute;
    bottom: 1px;
    font-size: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.breaker-test-button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 15px;
    height: 15px;
    background-color: #0d6efd;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.breaker-bottom-label {
    margin-top: auto;
    font-size: 8px;
    color: #000000;
    line-height: 1.2;
    text-align: left;
    width: 100%;
    padding: 0 5px;
}
.breaker-bottom-label .small-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.breaker-visual.type-A {
    background: linear-gradient(to bottom, #f2f2f2, #ffffff);
    color: #444;
}
.breaker-compact-top {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: linear-gradient(to bottom, #b0c8e3, #b0c8e3);
    border-bottom: 1px solid #c0c0c0;
    position: relative;
}
.breaker-compact-top .breaker-brand {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}
.breaker-compact-top .breaker-model {
    font-size: 8px;
    color: #666;
    margin-bottom: 10px;
}
.breaker-handle-area {
    position: relative;
    background: #ccc;
    border-radius: 4px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.breaker-handle {
    width: 60px;
    height: 25px;
    background: #1e437b;
	color:#ffffff;
    border-radius: 5px;
    position: absolute;
    left: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}
.breaker-amperage-text {
    position: absolute;
    right: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    background: #ffc107;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #e0b000;
}
.breaker-details-compact {
    display: flex;
    flex-direction: column;
    font-size: 8px;
    color: #000000;
    margin-top: 10px;
}
.breaker-compact-bottom {
    flex: 1;
    background: linear-gradient(to bottom, #e9e9e9, #f2f2f2);
    padding: 2px;
}
.breaker-terminals {
    display: flex;
    gap: 5px;
}
.breaker-terminals .terminal {
    background: #ddd;
    border: 1px solid #ccc;
    padding: 2px 5px;
    font-size: 8px;
    border-radius: 3px;
}
.breaker-visual.type-B {
    background: linear-gradient(to bottom, #b4cdc2, #d1e7dd);
    color: #0f5132;
}
.breaker-visual.type-C {
    background: linear-gradient(to bottom, #f2f2e0, #e6e6c7);
    color: #664d03;
}
.breaker-visual.type-D {
    background: linear-gradient(to bottom, #f2e0e0, #e6c7c7);
    color: #842029;
}
.breaker-visual.type-M {
    background: linear-gradient(to bottom, #e7e0f2, #d1c7e6);
    color: #5d3d82;
}
.breaker-visual.type-PLC {
    background: linear-gradient(to bottom, #e0f2f2, #c7e6e6);
    color: #084298;
}
.legend-color {
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* CSS for list view */
.breakers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}
.breaker-card {
    width: 150px;
    height: 180px;
    border: 1px solid #777;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: linear-gradient(to bottom, #dcdcdc, #ededed);
}
.breaker-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.breaker-card .breaker-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.breaker-card .breaker-amperage {
    font-weight: bold;
    font-size: 1.5rem;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}
.breaker-card .breaker-type {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    width: auto;
    display: inline-block;
}
.breaker-card .breaker-info-text {
    font-size: 0.8rem;
    color: #555;
    text-align: left;
    width: 100%;
}
.breaker-card .breaker-info-text p {
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Colors for different breaker types */
.breaker-card.type-B { background: linear-gradient(to bottom, #d1e7dd, #b3d9c7);}
.breaker-card.type-C { background: linear-gradient(to bottom, #fff3cd, #ffe8a8);}
.breaker-card.type-D { background: linear-gradient(to bottom, #f8d7da, #f1b7bc);}
.breaker-card.type-PLC { background: linear-gradient(to bottom, #cfe2ff, #b6d3ff);}
.breaker-card.type-B .breaker-type { background: #a3c9b8; color: #0f5132;}
.breaker-card.type-C .breaker-type { background: #f0dca0; color: #664d03;}
.breaker-card.type-D .breaker-type { background: #e6a7ac; color: #842029;}
.breaker-card.type-PLC .breaker-type { background: #a6c3f0; color: #084298;}
:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
}
body {
    background-color: #f5f7fa;
    min-height: 100vh;
}
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s;
}
.login-card:hover {
    transform: translateY(-5px);
}
.login-header {
    background: linear-gradient(135deg, #2d4f83 0%, #1b427b 100%);
    color: white;
    padding: 25px;
    text-align: center;
}
.admin-header {
    background: linear-gradient(135deg, var(--danger) 0%, #bb2d3b 100%);
}
.breaker-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ffc107;
}
.admin-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ffc107;
}
.breaker-outline {
    position: absolute;
    border: 2px solid #0d6efd;
    pointer-events: none;
    z-index: 5;
    box-sizing: border-box;
}
.grid-container {
    position: relative;
}
.stat-card {
    text-align: center;
    padding: 2px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    margin-bottom: 20px;
    background: white;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.stat-card .number {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
}
.stat-card .label {
    color: var(--secondary);
    font-size: 0.8rem;
}
.card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    margin-bottom: 25px;
    border: none;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2d4f83 0%, #1b427b 100%);
    color: white;
}
.admin-card .card-header {
    background: linear-gradient(135deg, var(--danger) 0%, #bb2d3b 100%);
}
.breaker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.breaker-item:hover {
    background: #d8e2f9;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.breaker-label {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 0.9rem;
}
.breaker-details {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 3px;
}
.breaker-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
}
.type-B { background: #d1e7dd; color: #0f5132;}
.type-C { background: #fff3cd; color: #664d03;}
.type-D { background: #f8d7da; color: #842029;}
.type-A { background: #b0c8e3; color: #000000;}
.type-kA { background: #664d03; color: #000000;}
.type-M  { background: #efd7f8; color: #000000;}
.navbar {
    background: linear-gradient(135deg, #2d4f83 0%, #1b427b 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}
.admin-navbar {
    background: linear-gradient(135deg, var(--danger) 0%, #bb2d3b 100%);
}
.sidebar {
    background: linear-gradient(180deg, #343a40 0%, #212529 100%);
    color: white;
    height: 100%;
    padding-top: 20px;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 12px 12px 0;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 25px;
    margin: 5px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}
.sidebar .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}
.admin-actions .btn {
    padding: 5px 10px;
    font-size: 0.875rem;
}
.btn-login {
    background: #22477e;
    border: none;
    transition: all 0.3s;
}
.logo{
	width:190px;
	height:150px;
	
}
.logo2{
	width:60px;
	height:50px;
	
}
.text-dark
 {
    --bs-text-opacity: 1;
    color: #ffffff !important;
}
.btn-login:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
}
.btn-admin {
    background: #dc3545;
    border: none;
    transition: all 0.3s;
}
.btn-admin:hover {
    background: #bb2d3b;
    transform: translateY(-2px);
}
.admin-link {
    color: #6c757d;
    transition: color 0.3s;
}
.admin-link:hover {
    color: #0d6efd;
    text-decoration: none;
}
.user-link {
    color: #6c757d;
    transition: color 0.3s;
}
.user-link:hover {
    color: #dc3545;
    text-decoration: none;
}
.main-content {
    margin-left: 250px;
    padding: 20px;
    background-color: #f5f7fa;
    min-height: 100vh;
}
.stat-card.users {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}
.stat-card.objects {
    background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%);
    color: white;
}
.stat-card.cabinets {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    color: #333;
}
.stat-card.breakers {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #333;
}





.breakers-grid1 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 10px;
}

.breaker-card1 {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.breaker-card1:hover {
    transform: scale(1.02);
    background-color: #eef;
}

.breaker-body1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.breaker-amperage1 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.breaker-type1 {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    margin-bottom: 10px;
}

.breaker-info-text1 p {
    margin: 3px 0;
    font-size: 14px;
    color: #444;
}

.alert {
    margin-top: 20px;
}

.card-body1 {
    padding: 20px;
}
