        :root {
            --verde-principal: #4CAF50;
            --verde-escuro: #45a049;
            --verde-claro: #f0f8f0;
            --verde-claro-suave: #f8fff8;
            --texto-principal: #333;
            --texto-secundario: #555;
        }

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

        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
            padding: 20px;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
        }

        h1 {
            color: var(--texto-principal);
            margin-bottom: 30px;
        }

        .controls {
            display: flex;
            gap: 20px;
            justify-content: center;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        .sort-box {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
        }

        .sort-btn {
            padding: 10px 16px;
            background-color: #e8e8e8;
            border: 1px solid #bbb;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            color: #333;
            transition: all 0.2s;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 6px;
            text-decoration: none;
        }

        .sort-btn:hover {
            background-color: #d0d0d0;
            border-color: #999;
        }

        .sort-btn.active {
            background-color: var(--verde-principal);
            color: white;
            border-color: var(--verde-escuro);
        }

        .sort-arrow {
            display: inline-block;
            transition: transform 0.3s ease;
            font-size: 12px;
        }

        .sort-btn.desc .sort-arrow {
            transform: rotate(180deg);
        }

        .search-box {
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        .search-box input {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 300px;
            font-size: 14px;
        }

        .search-box button {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            opacity: 0;
            width: 0;
            padding: 0;
            pointer-events: none;
        }

        .grafico-item {
            background-color: white;
            margin-bottom: 20px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: transform 0.2s, box-shadow 0.2s;
              cursor: default;
        }

        .grafico-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

        .grafico-header {
            display: flex;
            gap: 20px;
            padding: 20px;
            align-items: flex-start;
        }

        .grafico-thumbnail {
            flex-shrink: 0;
            position: relative;
        }

        .grafico-thumbnail img {
            width: 320px;
            height: 320px;
            object-fit: contain;
            border-radius: 4px;
            background-color: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
            padding: 2px;
            position: relative;
        }

        .grafico-thumbnail.upload-enabled img {
            cursor: pointer;
            transition: opacity 0.2s ease;
        }

        .grafico-thumbnail.upload-enabled img:hover {
            opacity: 0.82;
        }

        .grafico-thumbnail.drag-over {
            outline: 2px dashed var(--verde-principal);
            outline-offset: 4px;
            border-radius: 6px;
        }

        .inline-image-input {
            display: none;
        }

        .grafico-details {
            flex: 1;
        }

        .grafico-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .grafico-details h2 {
            color: var(--texto-principal);
            font-size: 18px;
            margin: 0;
        }

        .grafico-id {
            color: #999;
            font-size: 14px;
            font-weight: normal;
        }

        .grafico-textos {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .grafico-resumo {
            background-color: var(--verde-claro);
            border-left: 4px solid var(--verde-principal);
            padding: 10px 12px;
            border-radius: 4px;
            font-size: 13px;
            color: var(--texto-secundario);
            line-height: 1.5;
            text-align: justify;
        }

        .grafico-resumo strong {
            display: block;
            margin-bottom: 6px;
            color: var(--texto-principal);
        }

        .inline-edit-field[contenteditable="true"] {
            cursor: text;
            border-radius: 4px;
            transition: background-color 0.2s ease;
            background-color: #fff8dc;
        }

        .inline-edit-field[contenteditable="true"]:hover,
        .inline-edit-field[contenteditable="true"]:focus {
            background-color: #fff8dc;
            outline: none;
        }

        .inline-edit-title[contenteditable="true"] {
            cursor: text;
            border-radius: 4px;
        }

        .inline-edit-title[contenteditable="true"]:focus {
            outline: none;
        }

        .expand-toggle {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: transform 0.3s ease;
            flex-shrink: 0;
            color: var(--verde-principal);
        }

        .grafico-item.expanded .expand-toggle {
            transform: rotate(180deg);
        }

        .grafico-item-new {
            cursor: default;
        }

        .grafico-item-new:hover {
            transform: none;
        }

        .grafico-thumbnail-new {
            width: 320px;
            height: 320px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .grafico-thumbnail-new .grafico-imagem.is-empty {
            background-color: #f7f7f7;
            border: 1px dashed #cfcfcf;
            box-shadow: none;
        }

        .new-image-empty-icon {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: #8a8a8a;
            pointer-events: none;
        }

        .new-title-input {
            border: 1px solid #d8c679;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 18px;
            font-weight: 600;
            color: var(--texto-principal);
            background-color: #fff8dc;
            min-width: 220px;
            max-width: 100%;
        }

        .new-id-input {
            width: 78px;
            border: 1px solid #d8c679;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 14px;
            color: var(--texto-principal);
            background-color: #fff8dc;
            text-align: center;
        }

        .new-id-input:focus {
            outline: none;
            border-color: #c8b35f;
        }

        .new-id-input:focus::placeholder {
            color: transparent;
        }

        .inline-id-input {
            width: 72px;
            border: 1px solid #d2d2d2;
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 12px;
            color: #555;
            background: #fff;
            margin-right: 4px;
        }

        .inline-id-input:focus {
            outline: none;
            border-color: #9f9f9f;
        }

        .new-id-input,
        .inline-id-input {
            appearance: textfield;
            -moz-appearance: textfield;
        }

        .new-id-input::-webkit-outer-spin-button,
        .new-id-input::-webkit-inner-spin-button,
        .inline-id-input::-webkit-outer-spin-button,
        .inline-id-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .new-title-input:focus {
            outline: none;
            border-color: #c8b35f;
        }

        .new-title-input:focus::placeholder {
            color: transparent;
        }

        .new-create-btn {
            border: 0;
            background: var(--verde-principal);
            color: #fff;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
            opacity: 1;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .new-create-btn:disabled {
            opacity: 0.38;
            cursor: not-allowed;
            transform: none;
        }

        .new-blank-field {
            min-height: 20px;
            background-color: #fff8dc;
            border-radius: 4px;
        }

        .infos-container {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background-color: #f9f9f9;
            border-top: 1px solid #eee;
        }

        .grafico-item.expanded .infos-container {
            max-height: 1000px;
        }

        .info-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
        }

        .info-row:last-child {
            border-bottom: none;
        }

        .info-field {
            font-size: 13px;
        }

        .info-field strong {
            color: var(--texto-secundario);
            display: block;
            margin-bottom: 3px;
        }

        .info-field span {
            color: #777;
        }

        .no-results {
            text-align: center;
            padding: 40px;
            color: #999;
            background-color: white;
            border-radius: 8px;
        }

        .status-msg {
            margin: 0 auto 16px;
            max-width: 1000px;
            padding: 10px 12px;
            border-radius: 6px;
            font-size: 14px;
        }

        .status-msg.success {
            background-color: #e9f7ea;
            color: #246b27;
            border: 1px solid #b9dfbb;
        }

        .status-msg.error {
            background-color: #fdecec;
            color: #8b1f1f;
            border: 1px solid #f2bdbd;
        }

        .admin-add-form,
        .admin-edit-form {
            background: #fff;
            border: 1px solid #e1e1e1;
            border-radius: 8px;
            padding: 14px;
        }

        .admin-add-form {
            max-width: 1000px;
            margin: 0 auto 20px;
        }

        .admin-edit-form h4 {
            margin-bottom: 10px;
            color: var(--texto-principal);
        }

        .admin-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .admin-textarea-group {
            display: flex;
            flex-direction: column;
        }

        .admin-textarea-group--with-top-line {
            padding-top: 10px;
            border-top: 1px solid rgba(76, 175, 80, 0.35);
        }

        .admin-add-form label,
        .admin-edit-form label {
            display: block;
            margin: 8px 0 4px;
            font-size: 12px;
            font-weight: bold;
            color: #444;
        }

        .admin-add-form input[type="text"],
        .admin-add-form input[type="file"],
        .admin-add-form select,
        .admin-add-form textarea,
        .admin-edit-form input[type="text"],
        .admin-edit-form select,
        .admin-edit-form textarea {
            width: 100%;
            border: 1px solid #d2d2d2;
            border-radius: 6px;
            padding: 8px;
            font-size: 13px;
            font-family: Arial, sans-serif;
        }

        .admin-add-form textarea,
        .admin-edit-form textarea {
            min-height: 180px;
            resize: vertical;
            border-left: 4px solid var(--verde-principal);
            background-color: var(--verde-claro-suave);
        }

        .admin-add-form button,
        .admin-edit-form button {
            margin-top: 10px;
            border: 0;
            background: var(--verde-principal);
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
        }

        .admin-add-form button {
            display: block;
            margin-left: auto;
        }

        .admin-edit-form {
            margin: 12px 20px 16px;
        }

        .id-nome-row {
            display: grid;
            grid-template-columns: 120px 1fr;
            gap: 10px;
            align-items: end;
        }

        .id-curto {
            width: 100%;
            max-width: 120px;
        }

        .descricao-expand {
            padding: 14px 20px;
            border-bottom: 1px solid #eee;
            font-size: 13px;
            color: #555;
            line-height: 1.6;
            text-align: justify;
            background: #fff;
        }

        .status-inline-select {
            border: 1px solid #d2d2d2;
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 12px;
            color: #555;
            background: #fff;
            margin-left: 4px;
        }

        @media (max-width: 768px) {
            .controls {
                flex-direction: column;
                gap: 15px;
            }

            .search-box input {
                width: 100%;
            }

            .sort-box {
                justify-content: center;
            }
        }

