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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            padding: 30px;
        }

        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
            font-size: 28px;
        }

        .controls {
            display: flex;
            gap: 10px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        input, select, button {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
        }

        select, input {
            min-width: 150px;
        }

        button {
            background: #667eea;
            color: white;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: background 0.3s;
        }

        button:hover {
            background: #5568d3;
        }

        .timetable-wrapper {
            overflow-x: auto;
            margin-bottom: 30px;
            border-radius: 8px;
            border: 2px solid #ddd;
        }

        #printTimetable {
            background: white;
            padding: 3px;
            border-radius: 8px;
        }

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

        th, td {
            border: 2px solid #ddd;
            padding: 12px;
            text-align: center;
            font-weight: 500;
            vertical-align: middle;
        }

        th {
            background: #667eea;
            color: white;
            position: relative;
            min-width: 100px;
        }

        td {
            background: #f9f9f9;
            min-height: 70px;
            position: relative;
            vertical-align: top;
        }

        .time-slot, .day-slot {
            background: #ecf0f1;
            font-weight: 600;
            color: #333;
            cursor: pointer;
            text-decoration: underline;
        }

        .time-slot:hover, .day-slot:hover {
            background: #d5dbdb;
        }

        .class-cell {
            padding: 5px;
            background: #fff;
        }

        .subject {
            background: #3498db;
            color: white;
            padding: 8px;
            margin: 3px;
            border-radius: 6px;
            cursor: move;
            user-select: none;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s;
            display: block;
            position: relative;
            word-break: break-word;
            text-align: center;
        }

        .subject:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        .subject-actions {
            position: absolute;
            top: 2px;
            right: 2px;
            display: flex;
            gap: 3px;
        }

        .edit-btn, .delete-btn {
            background: rgba(255,255,255,0.9);
            color: #333;
            border: none;
            padding: 2px 5px;
            cursor: pointer;
            font-size: 10px;
            border-radius: 3px;
            font-weight: 600;
        }

        .edit-btn:hover {
            background: #3498db;
            color: white;
        }

        .delete-btn:hover {
            background: #e74c3c;
            color: white;
        }

        .subjects-panel {
            margin-top: 30px;
            padding: 20px;
            background: #f5f5f5;
            border-radius: 8px;
        }

        .subjects-panel h3 {
            margin-bottom: 15px;
            color: #333;
        }

        .available-subjects {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .subject-tag {
            padding: 8px 15px;
            border-radius: 20px;
            color: white;
            font-size: 12px;
            font-weight: 600;
            cursor: move;
            user-select: none;
            display: inline-block;
        }

        .subject-tag.physics { background: #e74c3c; }
        .subject-tag.chemistry { background: #f39c12; }
        .subject-tag.maths { background: #27ae60; }
        .subject-tag.english { background: #8e44ad; }
        .subject-tag.biology { background: #16a085; }
        .subject-tag.history { background: #c0392b; }
        .subject-tag.geography { background: #2980b9; }
        .subject-tag.pe { background: #e67e22; }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 10% auto;
            padding: 30px;
            border: 1px solid #888;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        }

        .modal h2 {
            margin-bottom: 20px;
            color: #333;
        }

        .modal input {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .modal button {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
        }

        .modal .save-btn {
            background: #27ae60;
            color: white;
        }

        .modal .cancel-btn {
            background: #95a5a6;
            color: white;
        }

        .col-actions {
            position: absolute;
            top: 5px;
            right: 5px;
            display: none;
            gap: 3px;
        }

        th:hover .col-actions {
            display: flex;
        }

        .col-btn {
            background: #27ae60;
            color: white;
            border: none;
            padding: 3px 6px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 10px;
            font-weight: 600;
        }

        .col-btn.delete {
            background: #e74c3c;
        }

        .row-btn {
            background: #27ae60;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 600;
            margin: 2px;
        }

        .row-btn.delete {
            background: #e74c3c;
        }

        .editable-header {
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 3px;
        }

        .editable-header:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .bottom-controls {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 30px;
        }

        .bottom-controls button {
            background: #27ae60;
        }

        .bottom-controls button.reset {
            background: #e74c3c;
        }
	
		.export-clean .subject {
		  background: transparent !important;
		  border: none !important;
		  box-shadow: none !important;
		  color: #000 !important;
		}

		.export-clean td,
		 {
		  background: transparent !important;
		  border: 1px solid #000 !important; /* optional: keep light outline */
		}

		.export-clean .col-actions,
		.export-clean .row-btn,
		.export-clean .subject-actions {
		  display: none !important;
		}

        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }

            th, td {
                padding: 8px;
                font-size: 11px;
            }

            h1 {
                font-size: 20px;
            }
        }

        @media print {
            body {
                background: white;
            }

            .controls, .subjects-panel, .subject-actions, .bottom-controls, .col-actions, .row-btn {
                display: none !important;
            }

            .container {
                box-shadow: none;
            }
        }
