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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            transition: background-color 0.3s, color 0.3s;
        }

        :root {
            --bg-primary: #0a0a0a;
            --bg-secondary: #1a1a1a;
            --bg-tertiary: #2a2a2a;
            --text-primary: #e0e0e0;
            --text-secondary: #b0b0b0;
            --text-muted: #888;
            --accent: #ff1493;
            --accent-hover: #e01080;
            --border: #2a2a2a;
        }

        body.light-theme {
            --bg-primary: #f5f5f5;
            --bg-secondary: #ffffff;
            --bg-tertiary: #e8e8e8;
            --text-primary: #222222;
            --text-secondary: #555555;
            --text-muted: #999999;
            --border: #dddddd;
        }

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

        .header {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .header h1 {
            margin-bottom: 0;
            color: var(--accent);
            font-size: 30px;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .user-info {
            font-size: 14px;
            opacity: .8
        }

        .login-form {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            padding: 30px;
            border-radius: 8px;
            max-width: 400px;
            margin: 100px auto
        }

        .login-form .btn-primary {
            width: 100%
        }

        .login-form h2 {
            margin-bottom: 20px;
            color: var(--accent)
        }

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

        .form-group label {
            display: block;
            margin-bottom: 5px;
            color: var(--text-primary);
            font-weight: 500
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 4px;
            font-size: 14px;
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: 0;
            border-color: var(--accent)
        }

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

        .form-group input[type=file] {
            padding: 8px
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all .3s
        }

        .btn-primary {
            background: var(--accent);
            color: #fff;
        }

        .btn-primary:hover {
            background: var(--accent-hover)
        }

        .btn-success {
            background: var(--accent);
            color: #fff
        }

        .btn-success:hover {
            background: var(--accent-hover)
        }

        .btn-danger {
            background: transparent;
            color: var(--accent);
            border: 1px solid var(--accent)
        }

        .btn-danger:hover {
            background: var(--accent);
            color: #fff
        }

        .btn-secondary {
            background: var(--bg-tertiary);
            color: var(--text-secondary)
        }

        .btn-secondary:hover {
            background: var(--border)
        }

        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap
        }

        .tab {
            padding: 12px 24px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 4px;
            cursor: pointer;
            transition: all .3s;
            color: var(--text-secondary)
        }

        .tab:hover {
            border-color: var(--accent)
        }

        .tab.active {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent)
        }

        .content {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            padding: 25px;
            border-radius: 8px
        }

        .table-container {
            overflow-x: auto
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            font-size: 12px
        }

        td,
        th {
            padding: 8px;
            text-align: left;
            border-bottom: 1px solid var(--border)
        }

        th {
            background: var(--bg-primary);
            font-weight: 600;
            color: var(--accent);
            cursor: pointer;
            user-select: none;
            position: relative
        }

        th:hover {
            background: var(--bg-tertiary)
        }

        th.sorted-asc::after {
            content: " ↑"
        }

        th.sorted-desc::after {
            content: " ↓"
        }

        tr:hover {
            background: var(--bg-tertiary)
        }

        .actions {
            display: flex;
            gap: 5px;
            flex-wrap: wrap
        }

        .actions button {
            padding: 6px 12px;
            font-size: 12px
        }

        .search-box {
            margin-bottom: 15px;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .search-box input {
            max-width: 400px;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 4px;
            background: var(--bg-primary);
            color: var(--text-primary);
            flex: 1;
        }

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

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center
        }

        .modal-content {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            padding: 30px;
            border-radius: 8px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto
        }

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

        .modal-header h3 {
            color: var(--accent)
        }

        .close {
            font-size: 28px;
            cursor: pointer;
            color: var(--text-secondary)
        }

        .close:hover {
            color: var(--accent)
        }

        .error {
            color: var(--accent);
            padding: 10px;
            background: var(--bg-tertiary);
            border: 1px solid var(--accent);
            border-radius: 4px;
            margin-bottom: 15px
        }

        .success {
            color: var(--accent);
            padding: 10px;
            background: var(--bg-tertiary);
            border-radius: 4px;
            margin-bottom: 15px;
            position: fixed;
            top: 0;
            left: 20%;
            width: 60%;
            text-align: center;
            animation: fadout 2s forwards;
            z-index: 3000;
        }

        @keyframes fadout {
            0% {
                opacity: 1
            }

            70% {
                opacity: 1
            }

            100% {
                opacity: 0;
                display: none
            }
        }

        .add-btn {
            margin-bottom: 20px
        }

        .readonly-section {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .readonly-section h4 {
            margin-bottom: 0;
            color: var(--text-secondary)
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 10px
        }

        .checkbox-group input[type=checkbox] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
            cursor: pointer
        }

        .checkbox-group label {
            cursor: pointer
        }

        .file-info {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 5px
        }

        .current-files {
            margin-top: 5px;
            padding: 10px;
            background: var(--bg-primary);
            border-radius: 4px;
            cursor: pointer;
        }

        .current-files img {
            max-width: 100px;
            max-height: 100px;
            margin: 5px;
            border-radius: 4px;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .current-files img:hover {
            transform: scale(1.1);
        }

        .current-files a {
            color: var(--accent);
            cursor: pointer;
        }

        #qr-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .8);
            z-index: 1001
        }

        #qr-modal.active {
            display: flex;
            align-items: center;
            justify-content: center
        }

        .qr-content {
            background: #fff;
            padding: 30px;
            border-radius: 8px;
            text-align: center
        }

        .qr-content h3 {
            margin-bottom: 20px;
            color: #333
        }

        #qrcode {
            margin: 20px
        }

        .qr-actions {
            margin-top: 20px;
            display: flex;
            gap: 10px;
            justify-content: center
        }

        .csv-actions {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
            flex-wrap: wrap
        }

        .csv-actions input[type=file] {
            display: none
        }

        .import-info {
            font-size: 12px;
            color: var(--text-muted);
            margin-left: 10px
        }

        .media-viewer {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        .media-viewer.active {
            display: flex;
        }

        .media-viewer-content {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
        }

        .media-viewer img,
        .media-viewer video {
            max-width: 100%;
            max-height: 100%;
        }

        .media-viewer-close {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: hotpink;
            border: none;
            font-size: 30px;
            cursor: pointer;
            padding: 5px 15px;
            border-radius: 4px;
        }

        .weekday-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 10px;
            font-weight: bold;
            margin-right: 5px;
            background: var(--bg-tertiary);
        }

        .group-header {
            background: var(--bg-primary);
            padding: 12px;
            font-weight: bold;
            border-top: 2px solid var(--accent);
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            user-select: none;
        }

        .group-header:hover {
            background: var(--bg-tertiary);
        }

        .group-toggle {
            margin-right: 10px;
            font-family: monospace;
        }