        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: #f5f5f5;
            color: #333;
            font-size: 15px;
        }

        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        header h1 {
            font-size: 28px;
            margin-bottom: 5px;
        }

        header p {
            font-size: 14px;
            opacity: 0.9;
        }

        .container {
            max-width: 1600px;
            margin: 20px auto;
            padding: 0 20px;
        }

        .status-bar {
            background: white;
            padding: 25px 30px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 18px;
        }

        .status-item {
            display: flex;
            align-items: center;
            gap: 15px;
            font-weight: 500;
        }

        .status-dot {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #4ade80;
            flex-shrink: 0;
        }

        .status-dot.error {
            background: #ef4444;
        }

        h2 {
            font-size: 28px;
            margin: 30px 0 20px 0;
            color: #333;
            font-weight: 600;
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .chargepoints-list {
            width: 100%;
            background: white;
            border-collapse: collapse;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .chargepoints-list th {
            background: #f9fafb;
            padding: 16px 18px;
            text-align: left;
            font-weight: 600;
            color: #333;
            font-size: 14px;
            border-bottom: 2px solid #e5e5e5;
        }

        .chargepoints-list td {
            padding: 15px 18px;
            border-bottom: 1px solid #e5e5e5;
            font-size: 14px;
        }

        .chargepoints-list tr:last-child td {
            border-bottom: none;
        }

        .chargepoints-list tr:hover {
            background: #f9fafb;
        }

        .chargepoints-list .buttons {
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-end;
            gap: 6px;
            margin-top: 0;
        }

        .chargepoints-list button {
            flex: none;
            padding: 8px 12px;
            font-size: 13px;
        }

        .nav-bar {
            background: white;
            border-bottom: 1px solid #e5e5e5;
            display: flex;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .nav-item {
            padding: 14px 24px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            color: #666;
            border-bottom: 3px solid transparent;
            transition: all 0.2s ease;
            user-select: none;
        }

        .nav-item:hover {
            background: #f9fafb;
            color: #333;
        }

        .nav-item.active {
            color: #667eea;
            border-bottom-color: #667eea;
            background: #f5f5ff;
        }

        .card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: box-shadow 0.3s ease;
        }

        .card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
            border-bottom: 1px solid #e5e5e5;
            padding-bottom: 10px;
        }

        .card-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
        }

        .card-status {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }

        .card-status.online {
            background: #d1fae5;
            color: #065f46;
        }

        .card-status.offline {
            background: #fee2e2;
            color: #7f1d1d;
        }

        .card-status.awaiting {
            background: #fed7aa;
            color: #92400e;
            font-weight: bold;
        }

        .approval-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

        button.btn-success {
            background: #22c55e;
            color: white;
            flex: 1;
        }

        button.btn-success:hover {
            background: #16a34a;
        }

        button.btn-warning {
            background: #f59e0b;
            color: white;
            flex: 1;
        }

        button.btn-warning:hover {
            background: #d97706;
        }

        .card-body {
            font-size: 14px;
            line-height: 1.6;
            color: #666;
        }

        .card-body p {
            margin-bottom: 8px;
        }

        .card-body strong {
            color: #333;
        }

        .buttons {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        button {
            flex: 1;
            padding: 10px 14px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        button.btn-primary {
            background: #667eea;
            color: white;
        }

        button.btn-primary:hover {
            background: #5568d3;
        }

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

        button.btn-danger:hover {
            background: #dc2626;
        }

        button.btn-info {
            background: #06b6d4;
            color: white;
        }

        button.btn-info:hover {
            background: #0891b2;
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .loading {
            text-align: center;
            padding: 40px 20px;
            color: #999;
        }

        .error {
            background: #fecaca;
            color: #7f1d1d;
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            background: white;
            border-collapse: collapse;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        th {
            background: #f9fafb;
            padding: 16px 18px;
            text-align: left;
            font-weight: 600;
            color: #333;
            font-size: 14px;
            border-bottom: 2px solid #e5e5e5;
        }

        td {
            padding: 15px 18px;
            border-bottom: 1px solid #e5e5e5;
            font-size: 14px;
        }

        tr:last-child td {
            border-bottom: none;
        }

        tr:hover {
            background: #f9fafb;
        }

        .ws-indicator {
            font-size: 12px;
            color: #666;
        }

        .ws-indicator.connected::before {
            content: '●';
            color: #4ade80;
            margin-right: 5px;
        }

        .ws-indicator.disconnected::before {
            content: '●';
            color: #ef4444;
            margin-right: 5px;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        /* Local Tags can be opened from within the live-status modal - it needs to
           stack above it rather than behind it (configModal already has its own
           inline z-index: 10000, so it's unaffected by this). */
        #localTagsModal {
            z-index: 1100;
        }

        .modal {
            background: white;
            border-radius: 8px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .modal h3 {
            margin: 0 0 20px 0;
            font-size: 18px;
            color: #333;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            font-size: 14px;
            color: #333;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 80px;
        }

        .form-row {
            display: flex;
            gap: 10px;
        }

        .form-row .form-group {
            flex: 1;
        }

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

        button.btn-secondary:hover {
            background: #4b5563;
        }

        /* Login Screen */
        .login-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }

        .login-container {
            background: white;
            border-radius: 12px;
            padding: 40px;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        }

        .login-container h2 {
            margin: 0 0 10px 0;
            font-size: 28px;
            color: #333;
            text-align: center;
        }

        .login-container p {
            margin: 0 0 30px 0;
            text-align: center;
            color: #666;
            font-size: 14px;
        }

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

        .login-form input {
            padding: 12px 14px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 15px;
            font-family: inherit;
            transition: border-color 0.2s ease;
        }

        .login-form input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .login-error {
            background: #fecaca;
            color: #7f1d1d;
            padding: 12px;
            border-radius: 6px;
            font-size: 14px;
            display: none;
        }

        .login-error.show {
            display: block;
        }

        .top-right-bar {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .ops-links {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 12px;
            color: rgba(255,255,255,0.85);
        }

        .ops-links a {
            color: white;
            text-decoration: underline;
        }

        .ops-links a:hover {
            color: rgba(255,255,255,0.7);
        }

        .logout-btn {
            padding: 8px 12px;
            font-size: 13px;
            background: rgba(255,255,255,0.2);
            color: white;
            border: 1px solid rgba(255,255,255,0.4);
            cursor: pointer;
        }

        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 9999;
            pointer-events: none;
            display: flex;
            flex-direction: column-reverse;
            align-items: flex-end;
            gap: 12px;
            max-height: none;
            overflow: visible;
        }

        .toast {
            background: #333;
            color: white;
            padding: 20px 30px;
            border-radius: 8px;
            font-size: 18px;
            font-weight: 500;
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
            min-width: 300px;
            text-align: center;
            margin-bottom: 0;
            pointer-events: auto;
            animation: slideIn 0.3s ease;
            flex-shrink: 0;
        }

        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(400px);
                opacity: 0;
            }
        }

        .toast.removing {
            animation: slideOut 0.3s ease;
        }

        /* Charge point Info modal - photo + details side by side on desktop */
        .cp-info-wrap {
            display: flex;
            gap: 16px;
            margin-bottom: 16px;
        }

        .cp-info-photo {
            width: 192px;
            height: 192px;
            object-fit: cover;
            border-radius: 8px;
            flex-shrink: 0;
            cursor: pointer;
        }

        .cp-info-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
            gap: 12px;
        }

        .cp-info-fields {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 13px;
        }

        .cp-info-edit-btn {
            width: auto;
            flex: none;
            padding: 6px 12px;
            font-size: 12px;
        }

        /* Mobile quick pass - everything below only applies under 768px,
           desktop layout above is completely untouched. */
        @media (max-width: 768px) {
            .container {
                padding: 0 10px;
            }

            header {
                padding: 15px;
            }

            header h1 {
                font-size: 22px;
            }

            h2 {
                font-size: 22px;
                margin: 20px 0 15px 0;
            }

            /* Was position:absolute over the header - on a narrow screen it has no
               room and overlaps the title. Drop it back into normal flow above the
               header, keeping the header's own gradient so the white text stays readable. */
            .top-right-bar {
                position: static;
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                justify-content: center;
                flex-wrap: wrap;
                padding: 10px;
            }

            .ops-links {
                flex-wrap: wrap;
                justify-content: center;
            }

            .nav-bar {
                flex-wrap: wrap;
            }

            .nav-item {
                padding: 10px 14px;
                font-size: 13px;
            }

            .status-bar {
                flex-wrap: wrap;
                gap: 10px;
                padding: 15px 20px;
                font-size: 14px;
            }

            .chargepoints-list th,
            .chargepoints-list td {
                padding: 10px 12px;
                font-size: 13px;
            }

            .form-row {
                flex-direction: column;
                gap: 0;
            }

            .modal {
                padding: 20px;
            }

            .toast-container {
                left: 10px;
                right: 10px;
                align-items: center;
            }

            .toast {
                min-width: unset;
                width: 100%;
            }

            /* Dynamically-injected Configuration modal (built as an HTML string in JS)
               has an inline max-width:900px with no viewport-relative cap - without
               this it overflows the screen edges with no way to scroll to it. */
            #configModal > div {
                max-width: 92vw !important;
                width: 92vw;
            }

            #configModal table {
                display: block;
                overflow-x: auto;
            }

            /* Info modal: photo on top, details below it, edit button full-width below
               the details - instead of the desktop's side-by-side layout. */
            .cp-info-wrap {
                flex-direction: column;
            }

            .cp-info-photo {
                width: 100%;
                height: 180px;
            }

            .cp-info-row {
                flex-direction: column;
            }

            .cp-info-edit-btn {
                width: 100%;
                margin-top: 8px;
                padding: 10px 14px;
                font-size: 14px;
            }

            .cp-status-buttons {
                flex-direction: column;
            }

            .cp-status-buttons button {
                flex: none;
                width: 100%;
            }
        }
